@nebula.js/sn-combo-chart 1.32.6 → 1.33.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
1
  /*
2
- * @nebula.js/sn-combo-chart v1.32.6
2
+ * @nebula.js/sn-combo-chart v1.33.1
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-chart-modules/react","qlik-object-conversion"],(function(e){"use strict";var t,n,r,i,o,a,s,l,c,u,d,m,p,h,f,g,y,v,b,x,S,E,M,C,T,O,A,w,N,R,k,L,I,P,q,D,z,$,F,B,j,_,H,U,V,Y,W,X,G,K,J;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useModel,s=e.useStaleLayout,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,d=e.useEmbed,m=e.useOptions,p=e.useTranslator,h=e.useTheme,f=e.useDeviceType,g=e.useConstraints,y=e.useLayout,v=e.useAction,b=e.useSelections,x=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.setValue,C=e.cache,T=e.debouncer,O=e.throttler,A=e.colorService,w=e.disclaimerService,N=e.tooltipService,R=e.layoutService,k=e.alternativeService,L=e.dockService,I=e.themeService,P=e.pluginService,q=e.storage,D=e.selectionService,z=e.fontResolver},function(e){$=e.default},function(e){F=e.default},function(e){B=e.default},function(e){j=e.default,_=e,H=e.isValidElement,U=e.cloneElement,V=e.Children},function(e){Y=e,W=e.default},function(e){X=e.reactRenderer,G=e.axisTitleComponent,K=e.disclaimerComponent},function(e){J=e.default}],execute:function(){e("default",(function(e){var i;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(Z).forEach((t=>{e.add(Z[t])}))}}(e.translator);const{flags:a}=e,s=null===(i=e.anything)||void 0===i||null===(i=i.sense)||void 0===i?void 0:i.isUnsupportedFeature,l=gS();return{qae:vT(e),ext:WT(e),component(){const e=function(){const[e,t]=n();return r((()=>t(C())),[]),e}(),i=function(){const[e,t]=n();return r((()=>{t(q({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),c=function(){const e=m(),t=p(),i=d(),o=h(),[a,s]=n(),l=f();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:i,deviceType:l})}),[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),u=function(){const e=g(),[t,i]=n(!1),[o,a]=n(!1),[s,l]=n(!1),c=function(){const e=g(),[t,i]=n(!1),[o,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&i(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=o[e])||void 0===n?void 0:n.indexOf(t);r>-1&&o[e].splice(r,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),u=function(){var e;const t=g(),[i,o]=n(!1),[a,s]=n(!1),l=y(),c=p(),u=!!l.qSelectionInfo.qInSelections,d=!(null===(e=l.qHyperCube)||void 0===e||null===(e=e.qDimensionInfo)||void 0===e||null===(e=e[0])||void 0===e||!e.qIsOneAndOnlyOne);r((()=>{t&&o(!t.select&&!t.active)}),[t]);const m=e=>{s("boolean"==typeof e?e:!a)};return v((()=>({key:"lasso",label:c.get(a?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:lT,hidden:!i||!u||d,active:a,action:m})),[u,d,a,i,c.language()]),{action:m,enabled:()=>i,active:()=>a}}();let d=cT;r((()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=n({});return m.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||cT}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=u,m.select=c,m}(),b=function({picasso:e,environment:i}){const o=t(),[a,s]=n();return r((()=>{if(!i)return;o.style.overflow="hidden";const t=e({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[i]),a}({picasso:l,environment:c}),x=mT({chart:b,actions:u}),S=sT({picasso:l,chart:b,environment:c,flags:a,viewState:i,viewCache:e,actions:u,selectionService:x});!function({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:c,onZoomChange:u}}=Wd,[,d]=o((async()=>{if(!(null!=t&&t.update&&n&&r&&a&&s))return;const{layoutService:o,colorService:d,continuousModel:m,discreteModel:p,refLineModel:h,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:y}=f.meta,{options:v}=r,{viewState:b={}}=v,{legendScrollOffset:x,scrollOffset:S}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):b;a.preventSet("scrollOffset",S),a.preventSet("legendScrollOffset",x),a.preventSet("title",o.getLayoutValue("title"));const E=()=>{h&&h.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...fm,...y]}),g.meta.isPartialUpdating=!1};function M(o=!1){const c=pm({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}),u=o&&[gm({models:n}),...ym({models:n}),...d.getData()];o?(t.layoutComponents({settings:c,data:u}),g.meta.hasSlicedHats=c.components.filter((e=>"box-sliced-hat"===e.type)).length>0):t.update({settings:c,data:u})}a.onChanged("scrollOffset",E),o.meta.isContinuous&&(a.onChanged("zoom",u({layoutService:o,continuousDataModel:m},E)),a.intercept("zoom",c({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),M(!0),o.setDataPages(C),o.meta.isContinuous||await p.command.initialize(),M(!1),ka.cacheProperties({viewCache:s,layout:o.getLayout()})}),[null==t?void 0:t.update,n,r]);if(d)throw d}({picasso:l,chart:b,models:S,environment:c,flags:a,viewState:i,viewCache:e,actions:u}),hm({picasso:l,chart:b,models:S,environment:c,flags:a,viewState:i,viewCache:e,actions:u,isUnsupportedFeature:s}),bT({models:S,chart:b,viewState:i})}}}));var Z={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"en-US":"The chart is not displayed because it contains only negative values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。","zh-CN":"未显示图表,因为它仅包含负值。","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения."}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"en-US":"The data set contains negative values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值。","zh-CN":"数据集包含无法在此图表中显示的负值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function Q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee=Object.prototype.hasOwnProperty,te=Object.prototype.toString,ne=Object.defineProperty,re=Object.getOwnPropertyDescriptor,ie=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===te.call(e)},oe=function(e){if(!e||"[object Object]"!==te.call(e))return!1;var t,n=ee.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ee.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ee.call(e,t)},ae=function(e,t){ne&&"__proto__"===t.name?ne(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},se=function(e,t){if("__proto__"===t){if(!ee.call(e,t))return;if(re)return re(e,t).value}return e[t]},le=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=se(s,n),s!==(i=se(t,n))&&(u&&i&&(oe(i)||(o=ie(i)))?(o?(o=!1,a=r&&ie(r)?r:[]):a=r&&oe(r)?r:{},ae(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&ae(s,{name:n,newValue:i}));return s},ce=Q(le);const ue=[["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}]],de={};ue.forEach((([e,{width:t,height:n}])=>{de[e]={width:t,height:n}}));const me={getLayoutModes:()=>de,getLayoutMode(e,t){let n;for(n=0;n<ue.length;++n)if(e>=ue[n][1].width&&t>=ue[n][1].height)return ue[n][0];return"SPARK"}};const pe=["$date","$timestamp","$time"],he=["D","TS","T"],fe={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>pe.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&he.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(fe.hasTimeTag(t)&&fe.hasUnknownFormat(t)||fe.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&fe.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}))[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n;const r=null==e||null===(t=e.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0)<1)&&fe.canBeContinuousDimension(r[0])},maxNumberOfLines:12},ge=/^[A-Z][A-z0-9_]*$/i,ye={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},ve={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||ge.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},generateId:()=>ye.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},be=e=>ve.getValue(e,"qHyperCube.qDimensionInfo",[]),xe=e=>ve.getValue(e,"qHyperCube.qMeasureInfo",[]),Se=e=>ve.getValue(e,"barGrouping.grouping"),Ee={continuous:(e,t=!1)=>!!fe.canBeContinuous(e)&&(ve.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!be(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===Se(e)&&(be(e).length>1||xe(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&be(e).length>1&&1===xe(e).length},groupedByMeasure(e){return this.grouped(e)&&1===be(e).length&&xe(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==Se(e)&&"butterfly"!==Se(e)||this.continuous(e))&&(be(e).length>1||xe(e).length>1)},stackedByDimension(e){return this.stacked(e)&&be(e).length>1&&1===xe(e).length},stackedByMeasure(e){return this.stacked(e)&&1===be(e).length&&xe(e).length>1},simple:e=>0===be(e).length||1===be(e).length&&1===xe(e).length,snapshot:e=>!!ve.getValue(e,"snapshotData")};function Me(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Ce=e=>{throw e.isHandled=!0,e};const Te={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?Te.getVerticalDock(t):n?Te.getOppositeDock(Te.getHorizontalDock(t)):Te.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},Oe=166/26,Ae=12/11,we={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*Oe)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach((e=>{i=we.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk})):e.forEach((e=>{i=we.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk}));const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=we.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(we.stringWidthOverMWidth(o)+a*Ae)}},Ne=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Re=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),ke=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Le={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Ne.test(e),isRtlChar:e=>Re.test(e)||ke.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"}},Ie={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,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("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=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Ie.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,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=Le.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},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),i=n?[":",t.color.label]:[t.color.label,":"],o=Le.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Ie.getColorSymbol(e,t)]:[Ie.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Le.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Le.detectTextDirection(e.value);let l;return l=i?r?[e.value,Ie.getColorSymbol(t,n)]:[Ie.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Pe(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function De(){}var ze=.7,$e=1/ze,Fe="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_e=/^#([0-9a-f]{3,8})$/,He=new RegExp(`^rgb\\(${Fe},${Fe},${Fe}\\)$`),Ue=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),Ve=new RegExp(`^rgba\\(${Fe},${Fe},${Fe},${Be}\\)$`),Ye=new RegExp(`^rgba\\(${je},${je},${je},${Be}\\)$`),We=new RegExp(`^hsl\\(${Be},${je},${je}\\)$`),Xe=new RegExp(`^hsla\\(${Be},${je},${je},${Be}\\)$`),Ge={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 Ke(){return this.rgb().formatHex()}function Je(){return this.rgb().formatRgb()}function Ze(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=_e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Qe(t):3===n?new rt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?et(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?et(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=He.exec(e))?new rt(t[1],t[2],t[3],1):(t=Ue.exec(e))?new rt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ve.exec(e))?et(t[1],t[2],t[3],t[4]):(t=Ye.exec(e))?et(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=We.exec(e))?ct(t[1],t[2]/100,t[3]/100,1):(t=Xe.exec(e))?ct(t[1],t[2]/100,t[3]/100,t[4]):Ge.hasOwnProperty(e)?Qe(Ge[e]):"transparent"===e?new rt(NaN,NaN,NaN,0):null}function Qe(e){return new rt(e>>16&255,e>>8&255,255&e,1)}function et(e,t,n,r){return r<=0&&(e=t=n=NaN),new rt(e,t,n,r)}function tt(e){return e instanceof De||(e=Ze(e)),e?new rt((e=e.rgb()).r,e.g,e.b,e.opacity):new rt}function nt(e,t,n,r){return 1===arguments.length?tt(e):new rt(e,t,n,null==r?1:r)}function rt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function it(){return`#${lt(this.r)}${lt(this.g)}${lt(this.b)}`}function ot(){const e=at(this.opacity);return`${1===e?"rgb(":"rgba("}${st(this.r)}, ${st(this.g)}, ${st(this.b)}${1===e?")":`, ${e})`}`}function at(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function st(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lt(e){return((e=st(e))<16?"0":"")+e.toString(16)}function ct(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new dt(e,t,n,r)}function ut(e){if(e instanceof dt)return new dt(e.h,e.s,e.l,e.opacity);if(e instanceof De||(e=Ze(e)),!e)return new dt;if(e instanceof dt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new dt(a,s,l,e.opacity)}function dt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function mt(e){return(e=(e||0)%360)<0?e+360:e}function pt(e){return Math.max(0,Math.min(1,e||0))}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)}Pe(De,Ze,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ke,formatHex:Ke,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ut(this).formatHsl()},formatRgb:Je,toString:Je}),Pe(rt,nt,qe(De,{brighter(e){return e=null==e?$e:Math.pow($e,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ze:Math.pow(ze,e),new rt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rt(st(this.r),st(this.g),st(this.b),at(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:it,formatHex:it,formatHex8:function(){return`#${lt(this.r)}${lt(this.g)}${lt(this.b)}${lt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ot,toString:ot})),Pe(dt,(function(e,t,n,r){return 1===arguments.length?ut(e):new dt(e,t,n,null==r?1:r)}),qe(De,{brighter(e){return e=null==e?$e:Math.pow($e,e),new dt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ze:Math.pow(ze,e),new dt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new rt(ht(e>=240?e-240:e+120,i,r),ht(e,i,r),ht(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new dt(mt(this.h),pt(this.s),pt(this.l),at(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=at(this.opacity);return`${1===e?"hsl(":"hsla("}${mt(this.h)}, ${100*pt(this.s)}%, ${100*pt(this.l)}%${1===e?")":`, ${e})`}`}}));const ft=Math.PI/180,gt=180/Math.PI,yt=.96422,vt=.82521,bt=4/29,xt=6/29,St=3*xt*xt,Et=xt*xt*xt;function Mt(e){if(e instanceof Ct)return new Ct(e.l,e.a,e.b,e.opacity);if(e instanceof Rt)return kt(e);e instanceof rt||(e=tt(e));var t,n,r=wt(e.r),i=wt(e.g),o=wt(e.b),a=Tt((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Tt((.4360747*r+.3850649*i+.1430804*o)/yt),n=Tt((.0139322*r+.0971045*i+.7141733*o)/vt)),new Ct(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ct(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Tt(e){return e>Et?Math.pow(e,1/3):e/St+bt}function Ot(e){return e>xt?e*e*e:St*(e-bt)}function At(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function wt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Nt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Rt)return new Rt(e.h,e.c,e.l,e.opacity);if(e instanceof Ct||(e=Mt(e)),0===e.a&&0===e.b)return new Rt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*gt;return new Rt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Rt(e,t,n,null==r?1:r)}function Rt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function kt(e){if(isNaN(e.h))return new Ct(e.l,0,0,e.opacity);var t=e.h*ft;return new Ct(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Pe(Ct,(function(e,t,n,r){return 1===arguments.length?Mt(e):new Ct(e,t,n,null==r?1:r)}),qe(De,{brighter(e){return new Ct(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ct(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new rt(At(3.1338561*(t=yt*Ot(t))-1.6168667*(e=1*Ot(e))-.4906146*(n=vt*Ot(n))),At(-.9787684*t+1.9161415*e+.033454*n),At(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Pe(Rt,Nt,qe(De,{brighter(e){return new Rt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Rt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return kt(this).rgb()}}));var Lt={isDark:function(e){return Nt(e).l<70}};function It(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function Pt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qt(e){return 1===e.length&&(e=function(e){return function(t,n){return Pt(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var Dt=qt(Pt).right,zt=Math.sqrt(50),$t=Math.sqrt(10),Ft=Math.sqrt(2);function Bt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=zt?10:o>=$t?5:o>=Ft?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=zt?10:o>=$t?5:o>=Ft?2:1)}function jt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=zt?i*=10:o>=$t?i*=5:o>=Ft&&(i*=2),t<e?-i:i}function _t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Ht="$";function Ut(){}function Vt(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,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Yt(){}Ut.prototype=Vt.prototype={constructor:Ut,has:function(e){return Ht+e in this},get:function(e){return this[Ht+e]},set:function(e,t){return this[Ht+e]=t,this},remove:function(e){var t=Ht+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ht&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ht&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ht&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ht)return!1;return!0},each:function(e){for(var t in this)t[0]===Ht&&e(this[t],t.slice(1),this)}};var Wt=Vt.prototype;Yt.prototype={constructor:Yt,has:Wt.has,add:function(e){return this[Ht+(e+="")]=e,this},remove:Wt.remove,clear:Wt.clear,values:Wt.keys,size:Wt.size,empty:Wt.empty,each:Wt.each};var Xt=Array.prototype,Gt=Xt.map,Kt=Xt.slice;function Jt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Qt(){}var en=.7,tn=1/en,nn="\\s*([+-]?\\d+)\\s*",rn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",an=/^#([0-9a-f]{3,8})$/,sn=new RegExp("^rgb\\("+[nn,nn,nn]+"\\)$"),ln=new RegExp("^rgb\\("+[on,on,on]+"\\)$"),cn=new RegExp("^rgba\\("+[nn,nn,nn,rn]+"\\)$"),un=new RegExp("^rgba\\("+[on,on,on,rn]+"\\)$"),dn=new RegExp("^hsl\\("+[rn,on,on]+"\\)$"),mn=new RegExp("^hsla\\("+[rn,on,on,rn]+"\\)$"),pn={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 hn(){return this.rgb().formatHex()}function fn(){return this.rgb().formatRgb()}function gn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=an.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?yn(t):3===n?new xn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?vn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?vn(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=sn.exec(e))?new xn(t[1],t[2],t[3],1):(t=ln.exec(e))?new xn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=cn.exec(e))?vn(t[1],t[2],t[3],t[4]):(t=un.exec(e))?vn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=dn.exec(e))?Cn(t[1],t[2]/100,t[3]/100,1):(t=mn.exec(e))?Cn(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?yn(pn[e]):"transparent"===e?new xn(NaN,NaN,NaN,0):null}function yn(e){return new xn(e>>16&255,e>>8&255,255&e,1)}function vn(e,t,n,r){return r<=0&&(e=t=n=NaN),new xn(e,t,n,r)}function bn(e,t,n,r){return 1===arguments.length?((i=e)instanceof Qt||(i=gn(i)),i?new xn((i=i.rgb()).r,i.g,i.b,i.opacity):new xn):new xn(e,t,n,null==r?1:r);var i}function xn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Sn(){return"#"+Mn(this.r)+Mn(this.g)+Mn(this.b)}function En(){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 Mn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Cn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new On(e,t,n,r)}function Tn(e){if(e instanceof On)return new On(e.h,e.s,e.l,e.opacity);if(e instanceof Qt||(e=gn(e)),!e)return new On;if(e instanceof On)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new On(a,s,l,e.opacity)}function On(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function An(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function wn(e){return function(){return e}}function Nn(e){return 1==(e=+e)?Rn: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):wn(isNaN(t)?n:t)}}function Rn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):wn(isNaN(e)?t:e)}Jt(Qt,gn,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:hn,formatHex:hn,formatHsl:function(){return Tn(this).formatHsl()},formatRgb:fn,toString:fn}),Jt(xn,bn,Zt(Qt,{brighter:function(e){return e=null==e?tn:Math.pow(tn,e),new xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?en:Math.pow(en,e),new xn(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:Sn,formatHex:Sn,formatRgb:En,toString:En})),Jt(On,(function(e,t,n,r){return 1===arguments.length?Tn(e):new On(e,t,n,null==r?1:r)}),Zt(Qt,{brighter:function(e){return e=null==e?tn:Math.pow(tn,e),new On(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?en:Math.pow(en,e),new On(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xn(An(e>=240?e-240:e+120,i,r),An(e,i,r),An(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},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 kn=function e(t){var n=Nn(t);function r(e,t){var r=n((e=bn(e)).r,(t=bn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Rn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Ln(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function In(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Bn(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Pn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function qn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Dn(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Bn(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$n=new RegExp(zn.source,"g");function Fn(e,t){var n,r,i,o=zn.lastIndex=$n.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=zn.exec(e))&&(r=$n.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:qn(n,r)})),o=$n.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Bn(e,t){var n,r=typeof t;return null==t||"boolean"===r?wn(t):("number"===r?qn:"string"===r?(n=gn(t))?(t=n,kn):Fn:t instanceof gn?kn:t instanceof Date?Pn:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Ln:Array.isArray(t)?In:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Dn:qn)(e,t)}function jn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function _n(e){return+e}var Hn=[0,1];function Un(e){return e}function Vn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Yn(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Wn(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Vn(i,r),o=n(a,o)):(r=Vn(r,i),o=n(o,a)),function(e){return o(r(e))}}function Xn(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Vn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Dt(e,t,1,r)-1;return o[n](i[n](t))}}function Gn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Kn(e,t){return function(){var e,t,n,r,i,o,a=Hn,s=Hn,l=Bn,c=Un;function u(){return r=Math.min(a.length,s.length)>2?Xn:Wn,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),qn)))(n)))},d.domain=function(e){return arguments.length?(a=Gt.call(e,_n),c===Un||(c=Yn(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=Kt.call(e),u()):s.slice()},d.rangeRound=function(e){return s=Kt.call(e),l=jn,u()},d.clamp=function(e){return arguments.length?(c=e?Yn(a):Un,d):c!==Un},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function Jn(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)]}function Zn(e){return(e=Jn(Math.abs(e)))?e[1]:NaN}var Qn,er=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tr(e){if(!(t=er.exec(e)))throw new Error("invalid format: "+e);var t;return new nr({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function nr(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function rr(e,t){var n=Jn(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}tr.prototype=nr.prototype,nr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ir={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return rr(100*e,t)},r:rr,s:function(e,t){var n=Jn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Qn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Jn(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function or(e){return e}var ar,sr,lr,cr=Array.prototype.map,ur=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dr(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?or:(t=cr.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=e.decimal+"",s=void 0===e.numerals?or:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(cr.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=tr(e)).fill,n=e.align,d=e.sign,m=e.symbol,p=e.zero,h=e.width,f=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(f=!0,v="g"):ir[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var b="$"===m?i:"#"===m&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===m?o:/[%p]/.test(v)?l:"",S=ir[v],E=/[defgprs%]/.test(v);function M(e){var i,o,l,m=b,M=x;if("c"===v)M=S(e)+M,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:S(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),m=(C?"("===d?d:c:"-"===d||"("===d?"":d)+m,M=("s"===v?ur[8+Qn/3]:"")+M+(C&&"("===d?")":""),E)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){M=(46===l?a+e.slice(i+1):e.slice(i))+M,e=e.slice(0,i);break}}f&&!p&&(e=r(e,1/0));var T=m.length+e.length+M.length,O=T<h?new Array(h-T+1).join(t):"";switch(f&&p&&(e=r(O+e,O.length?h-M.length:1/0),O=""),n){case"<":e=m+e+M+O;break;case"=":e=m+O+e+M;break;case"^":e=O.slice(0,T=O.length>>1)+m+e+M+O.slice(T);break;default:e=O+m+e+M}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:d,formatPrefix:function(e,t){var n=d(((e=tr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Zn(t)/3))),i=Math.pow(10,-r),o=ur[8+r/3];return function(e){return n(i*e)+o}}}}function mr(e,t,n,r){var i,o=jt(e,t,n);switch((r=tr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zn(t)/3)))-Zn(Math.abs(e)))}(o,a))||(r.precision=i),lr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Zn(t)-Zn(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Zn(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return sr(r)}function pr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Bt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return mr(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=Bt(s,l,n))>0?r=Bt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Bt(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function hr(){var e=Kn(Un,Un);return e.copy=function(){return Gn(e,hr())},_t.apply(e,arguments),pr(e)}ar=dr({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),sr=ar.format,lr=ar.formatPrefix;var fr=new Date,gr=new Date;function yr(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return yr((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return fr.setTime(+t),gr.setTime(+r),e(fr),e(gr),Math.floor(n(fr,gr))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var vr=yr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));vr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?yr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):vr:null},vr.range;var br=6e4,xr=36e5,Sr=864e5,Er=6048e5,Mr=yr((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}));Mr.range;var Cr=yr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*br)/Sr}),(function(e){return e.getDate()-1}));function Tr(e){return yr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*br)/Er}))}Cr.range;var Or=Tr(0),Ar=Tr(1),wr=Tr(2),Nr=Tr(3),Rr=Tr(4),kr=Tr(5),Lr=Tr(6);Or.range,Ar.range,wr.range,Nr.range,Rr.range,kr.range,Lr.range;var Ir=yr((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()}));Ir.every=function(e){return isFinite(e=Math.floor(e))&&e>0?yr((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},Ir.range;var Pr=yr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*br)}),(function(e,t){return(t-e)/br}),(function(e){return e.getUTCMinutes()}));Pr.range;var qr=yr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*xr)}),(function(e,t){return(t-e)/xr}),(function(e){return e.getUTCHours()}));qr.range;var Dr=yr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Sr}),(function(e){return e.getUTCDate()-1}));function zr(e){return yr((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)/Er}))}Dr.range;var $r=zr(0),Fr=zr(1),Br=zr(2),jr=zr(3),_r=zr(4),Hr=zr(5),Ur=zr(6);$r.range,Fr.range,Br.range,jr.range,_r.range,Hr.range,Ur.range;var Vr=yr((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()}));Vr.range;var Yr=yr((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 Wr(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 Xr(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 Gr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Yr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?yr((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},Yr.range;var Kr,Jr,Zr={"-":"",_:" ",0:"0"},Qr=/^\s*\d+/,ei=/^%/,ti=/[\\^$*+?|[\]().{}]/g;function ni(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function ri(e){return e.replace(ti,"\\$&")}function ii(e){return new RegExp("^(?:"+e.map(ri).join("|")+")","i")}function oi(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function ai(e,t,n){var r=Qr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function si(e,t,n){var r=Qr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function li(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ci(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ui(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function di(e,t,n){var r=Qr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function mi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function pi(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 hi(e,t,n){var r=Qr.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function fi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function gi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yi(e,t,n){var r=Qr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function vi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function bi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function xi(e,t,n){var r=Qr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Si(e,t,n){var r=Qr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ei(e,t,n){var r=Qr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mi(e,t,n){var r=ei.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ci(e,t,n){var r=Qr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ti(e,t,n){var r=Qr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Oi(e,t){return ni(e.getDate(),t,2)}function Ai(e,t){return ni(e.getHours(),t,2)}function wi(e,t){return ni(e.getHours()%12||12,t,2)}function Ni(e,t){return ni(1+Cr.count(Ir(e),e),t,3)}function Ri(e,t){return ni(e.getMilliseconds(),t,3)}function ki(e,t){return Ri(e,t)+"000"}function Li(e,t){return ni(e.getMonth()+1,t,2)}function Ii(e,t){return ni(e.getMinutes(),t,2)}function Pi(e,t){return ni(e.getSeconds(),t,2)}function qi(e){var t=e.getDay();return 0===t?7:t}function Di(e,t){return ni(Or.count(Ir(e)-1,e),t,2)}function zi(e){var t=e.getDay();return t>=4||0===t?Rr(e):Rr.ceil(e)}function $i(e,t){return e=zi(e),ni(Rr.count(Ir(e),e)+(4===Ir(e).getDay()),t,2)}function Fi(e){return e.getDay()}function Bi(e,t){return ni(Ar.count(Ir(e)-1,e),t,2)}function ji(e,t){return ni(e.getFullYear()%100,t,2)}function _i(e,t){return ni((e=zi(e)).getFullYear()%100,t,2)}function Hi(e,t){return ni(e.getFullYear()%1e4,t,4)}function Ui(e,t){var n=e.getDay();return ni((e=n>=4||0===n?Rr(e):Rr.ceil(e)).getFullYear()%1e4,t,4)}function Vi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ni(t/60|0,"0",2)+ni(t%60,"0",2)}function Yi(e,t){return ni(e.getUTCDate(),t,2)}function Wi(e,t){return ni(e.getUTCHours(),t,2)}function Xi(e,t){return ni(e.getUTCHours()%12||12,t,2)}function Gi(e,t){return ni(1+Dr.count(Yr(e),e),t,3)}function Ki(e,t){return ni(e.getUTCMilliseconds(),t,3)}function Ji(e,t){return Ki(e,t)+"000"}function Zi(e,t){return ni(e.getUTCMonth()+1,t,2)}function Qi(e,t){return ni(e.getUTCMinutes(),t,2)}function eo(e,t){return ni(e.getUTCSeconds(),t,2)}function to(e){var t=e.getUTCDay();return 0===t?7:t}function no(e,t){return ni($r.count(Yr(e)-1,e),t,2)}function ro(e){var t=e.getUTCDay();return t>=4||0===t?_r(e):_r.ceil(e)}function io(e,t){return e=ro(e),ni(_r.count(Yr(e),e)+(4===Yr(e).getUTCDay()),t,2)}function oo(e){return e.getUTCDay()}function ao(e,t){return ni(Fr.count(Yr(e)-1,e),t,2)}function so(e,t){return ni(e.getUTCFullYear()%100,t,2)}function lo(e,t){return ni((e=ro(e)).getUTCFullYear()%100,t,2)}function co(e,t){return ni(e.getUTCFullYear()%1e4,t,4)}function uo(e,t){var n=e.getUTCDay();return ni((e=n>=4||0===n?_r(e):_r.ceil(e)).getUTCFullYear()%1e4,t,4)}function mo(){return"+0000"}function po(){return"%"}function ho(e){return+e}function fo(e){return Math.floor(+e/1e3)}!function(e){Kr=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=ii(i),u=oi(i),d=ii(o),m=oi(o),p=ii(a),h=oi(a),f=ii(s),g=oi(s),y=ii(l),v=oi(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Oi,e:Oi,f:ki,g:_i,G:Ui,H:Ai,I:wi,j:Ni,L:Ri,m:Li,M:Ii,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ho,s:fo,S:Pi,u:qi,U:Di,V:$i,w:Fi,W:Bi,x:null,X:null,y:ji,Y:Hi,Z:Vi,"%":po},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Yi,e:Yi,f:Ji,g:lo,G:uo,H:Wi,I:Xi,j:Gi,L:Ki,m:Zi,M:Qi,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ho,s:fo,S:eo,u:to,U:no,V:io,w:oo,W:ao,x:null,X:null,y:so,Y:co,Z:mo,"%":po},S={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=m[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=f.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:gi,e:gi,f:Ei,g:mi,G:di,H:vi,I:vi,j:yi,L:Si,m:fi,M:bi,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:hi,Q:Ci,s:Ti,S:xi,u:si,U:li,V:ci,w:ai,W:ui,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:mi,Y:di,Z:pi,"%":Mi};function E(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Zr[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=Gr(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Xr(Gr(o.y,0,1))).getUTCDay(),r=i>4||0===i?Fr.ceil(r):Fr(r),r=Dr.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Wr(Gr(o.y,0,1))).getDay(),r=i>4||0===i?Ar.ceil(r):Ar(r),r=Cr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Xr(Gr(o.y,0,1)).getUTCDay():Wr(Gr(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Xr(o)):Wr(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in Zr?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}(e),Kr.format,Kr.parse,Jr=Kr.utcFormat,Kr.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var go=1e3,yo=6e4,vo=36e5,bo=864e5,xo=2592e6,So=31536e6;function Eo(e){return new Date(e)}function Mo(e){return e instanceof Date?+e:+new Date(+e)}function Co(e,t,n,r,i,o,a,s,l){var c=Kn(Un,Un),u=c.invert,d=c.domain,m=l(".%L"),p=l(":%S"),h=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),b=l("%Y"),x=[[a,1,go],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,yo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,vo],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,bo],[r,2,1728e5],[n,1,6048e5],[t,1,xo],[t,3,7776e6],[e,1,So]];function S(s){return(a(s)<s?m:o(s)<s?p:i(s)<s?h:r(s)<s?f:t(s)<s?n(s)<s?g:y:e(s)<s?v:b)(s)}function E(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=qt((function(e){return e[2]})).right(x,o);a===x.length?(i=jt(n/So,r/So,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(jt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(Gt.call(e,Mo)):d().map(Eo)},c.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=E(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):c},c.copy=function(){return Gn(c,Co(e,t,n,r,i,o,a,s,l))},c}function To(){return _t.apply(Co(Yr,Vr,$r,Dr,qr,Pr,Mr,vr,Jr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Oo={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Ao=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var wo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=Oo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Ao(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Ao(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function No({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Ro;function ko(){Ro=Ro||document.createElement("canvas").getContext("2d")}const Lo={measureTextWidth(e){ko();const{width:t}=Ro.measureText(e);return t},lineWrap(e,t,n,r){let i,o;ko();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,m=e?e.split(/\s+/):[],p=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Ro.font=n),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[p]=m,u="",i=1;i<m.length;i++)if(l=`${p} ${m[i]}`,c=Lo.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(p),p=m[i]):p=l,"number"==typeof r&&s.length>=r){u=m.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(p):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${p} ${u}`}return s},wordWrap(e,t,n,r,i){if(ko(),!e||!e.length)return[];n&&(Ro.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||Lo.measureTextWidth(c)<=t?o.push(c):(s=Lo.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?Lo.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return o.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),o.length>r?(o=o.splice(0,r),o[o.length-1]=Lo.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&Lo.measureTextWidth(c)>t&&(o[o.length-1]=Lo.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){ko();let i,o,a,s,l=e;const c=Lo.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(Ro.font=n),e&&t){if(Lo.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,Lo.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;ko();let o,a=e,s="",l=[];if(Lo.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(Lo.measureTextWidth(a)<=t));i--);return(!i&&!a||Lo.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Lo.measureTextWidth(s)>t?(s=Lo.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(ko(),e&&t?(n&&(Ro.font=n),Lo.explodeWord(e,t,r,Math.max(1,Lo.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?Lo.lineWrap(e,t,n,r):[e],o=Lo.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(ko(),e&&(Ro.font=e),1.5*Lo.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){ko(),t&&(Ro.font=t);const s=Lo.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{u+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{c.push(Number.isNaN(e)||e<=0?m-u:e)}))):c=[Number.isNaN(r)||r<=0?m:Math.min(m,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(Lo.wrapText(e,i,t,c[n])))})):d=Lo.wrapText(e,i,t,c[0],n),d}},Io={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(ce({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},Po=ce.bind(null,!0),qo={},{isArray:Do}=Array;function zo(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function $o(e){return void 0===e}function Fo(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Bo(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=$o(e[r||t])?o:e[t],e=e[r||t]})),e}function jo(e,t){return t?Object.keys(e).filter((t=>void 0!==e[t])).length:Object.keys(e).length}function _o(e,t,n){let r=!0;if(zo(e)&&zo(t))return jo(e,n)===jo(t,n)&&(Object.keys(e).forEach((i=>{_o(e[i],t[i],n)||(r=!1)})),r);if(Do(e)&&Do(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!_o(e[r],t[r],n))return!1;return!0}return e===t}qo.compare=_o,qo.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Po({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;_o(o,a)||Fo(t,i)||($o(a)?r.push({op:"add",path:s,value:o}):zo(o)&&zo(a)?r=r.concat(qo.generate(a,o,s)):Do(o)&&Do(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&$o(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(_o(t,i))return r;if(!$o(t[0])&&$o(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(qo.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{$o(t[i])&&!Fo(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},qo.apply=function(e,t){t.forEach((t=>{let n=Bo(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(Do(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Do(i)&&Do(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(zo(i)&&zo(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Fo(a,e)&&delete a[e]})),Po(i,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 i=Bo(e,t.from);Do(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(Do(n)?n.splice(+r,1):delete n[r]);var a}))},qo.clone=function(e){return Po({},e)},qo.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},qo.updateObject=function(e,t){Object.keys(e).length?qo.apply(e,qo.generate(e,t)):Po(e,t)};const Ho=[[2,4,6],[2,4],[3]],Uo=[,[,,[[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 Vo(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function Yo(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Vo(e[r],t,n)}!function(){let e,t;for(Yo(Ho,1,10),e=0;e<Uo.length;e++)if(Uo[e])for(t=0;t<Uo[e].length;t++)Array.isArray(Uo[e][t])&&Yo(Uo[e][t])}();const Wo={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=Wo.findSegmentPositionMeetMin(e,t);return Wo.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=Wo.findSegmentPositionMeetMax(e,n);return Wo.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=Wo.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=Wo.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let c,u=0;for(o=i;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,Wo.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=i;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0))if(0!==i)Wo.layoutPositionFromMin(e,t,n,r),Wo.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=Wo.findSegmentPositionMeetMaxThenMin(r,t,n)}}},Xo=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},Go=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,Ko=e=>e.filter(Go),Jo=(e,t)=>Ko(ve.getValue(e,t,[])),Zo=e=>Go(e)&&(!1!==e.showValue||!1!==e.showLabel),Qo=e=>e.filter(Zo),ea=(e,t)=>Qo(ve.getValue(e,t,[])),ta=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,na=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},ra=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},ia=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},oa=({value:e,qMin:t})=>"NaN"!==t&&e<t,aa=({value:e,qMax:t})=>"NaN"!==t&&e>t,sa={isRefLineVisible:Go,getVisibleRefLines:Ko,getRefLines:Jo,getMeasureRefLines:e=>Jo(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:Jo(e,"refLine.dimRefLines"),isRefLineLabelVisible:Zo,getVisibleRefLineLabels:Qo,getRefLineLabels:ea,getMeasureRefLineLabels:e=>ea(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:ea(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let c;var l;if(a.meta.isGroupedByMeasure)return c=Xo(s,i,o,null!==(l=a.meta.groupSize)&&void 0!==l?l:a.meta.measureCount),s([n,0])+c;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let l;return c=Xo(s,i,o,t),e&&e.length&&(l=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===l?s(n):l)+c}return c=Xo(s,i,o),s(n)+c}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=ve.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():ve.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=s?"qData.0.qSubNodes":"qMatrix",u=ve.getValue(l,c,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),m=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+m,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}],dataNode:u[t]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:ta,extractInfoFromInputValue:na,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=ta({refLineLayout:e,layoutService:n});return na(r,t,"id")},isDiscreteMinOutOfBounds:ra,isDiscreteMaxOutOfBounds:ia,isContinuousMinOutOfBounds:oa,isContinuousMaxOutOfBounds:aa,isOutOfRange:({value:e,qMin:t,qMax:n})=>oa({value:e,qMin:t})||aa({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&ia({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&ra({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},la=({label:e,labelStyle:t})=>[(null==e?void 0:e.fontStyle)||(null==t?void 0:t.fontStyle),(null==e?void 0:e.fontWeight)||(null==t?void 0:t.fontWeight),(null==e?void 0:e.fontSize)||(null==t?void 0:t.fontSize),(null==e?void 0:e.fontFamily)||(null==t?void 0:t.fontFamily)].filter((e=>!!e)).join(" ");function ca(e){return e.showValue?`… ${e.valueString}`:"…"}function ua(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=la({label:i,labelStyle:t});i.lines=Lo.tokenize(i.title,o,ca(i),3,n),i.maxNumLines=i.lines.length}}function da({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=Lo.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function ma({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map((e=>da({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i}))),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function pa(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const ha=3,fa=2;function ga({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const ya=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(sa.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(sa.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return sa.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:sa.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},va={hasEngineFormat:ga,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=sa.getInvert({orientation:i,rtl:o,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let m,p;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,p=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:c,valueInfo:d}=o,h=ya({label:o,dataPages:u,qMin:m,qMax:p});o.scaledValue=1===h?l?-.1:1.1:-1===h?l?1.1:-.1:sa.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=ga({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Le.lrm}(${o})${Le.lrm}`,r.title=va.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=ga({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Le.lrm}(${o})${Le.lrm}`,n.title=va.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Le.lrm}(${o})${Le.lrm}`,n.title=va.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((n=>t(n,e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=va.getTotalNumLines(e)-r;if(t<=0)return;va.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,va.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:m,layoutService:p,isContinuous:h,isDimension:f}){const g=e.map((e=>e)),y=n;va.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:p,orientation:u,rtl:m,isContinuous:h,isDimension:f}),pa(e,"center"),va.addLabelsNeighborInfo(e,r,i,o),ua(e,a,s),va.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===u&&(va.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=la({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=Lo.tokenize(i.title,o,ca(i),i.maxNumLines,n))}}(e,a,s)),va.addLabelsSize(e,s,l,d),va.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=i,{fontSize:d,fontFamily:m,fontStyle:p,fontWeight:h,textDecoration:f,background:g}=t;let y=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,i=t.map(((t,i)=>{const g={type:"text",text:t,title:da({title:e.title,font:a,ellipsis:ca(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||d,fontFamily:e.fontFamily||m,fontStyle:e.fontStyle||p,fontWeight:e.fontWeight||h,textDecoration:e.textDecoration||f,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g}));e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=ha,padding:c={}}=a,{top:u=fa,bottom:d=fa,left:m=fa,right:p=fa}=c,h=s.length,f={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(m+p),height:i.height+(u+d),value:i.value,dock:r};return f[n]=e,f[t]=i.segment.position,f.x-=i.width/2+m,f.y-=h*o/2+u,f}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(i)})),y}};function ba(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function xa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return va.getMaxTextWidth(e)>o&&(ua(e,t,o),a=Math.max(...e.map((e=>e.lines.length)))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,va.getMaxTextWidth(e))+n+r}(t,n)}function Sa(e,t){return t?e.domain():[0,1]}function Ea(e,t,n,r="value"){let i=e.filter((e=>e[r]>=t));i=i.filter((e=>e[r]<=n));const o=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function Ma(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ca(e,t){return e>9?t[1]:t[0]}function Ta({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:m,minorAxis:p,minorDimension:h,dock:f}=s,g=i[h],y=Io.createOob({oob:Io.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});y.dock=f;const v=`c${m}`,b=`c${p}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:f};x[b]=g/2,x[v]=a;const S={type:"text",text:u>9?"9+":u,title:ma({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:f};return S[p]=g/2,S[m]=a,[y,x,S]}const Oa=e=>{const t=la({labelStyle:e}),n=Lo.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},Aa=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var wa={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=Aa(this.settings.labels),s=ba(this.chart,this.settings.formatter,e);va.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=Sa(t,n);return Ea(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Ea(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},u&&u.length){const e=Oa(t.label),{dock:n}=this.settings.layout;return va.measureLabelsWidth(u,this.measureText),d=xa(n,u,e),d}const m=Ma(this.measureText),p=l?Ca(l,m):0,h=c?Ca(c,m):0;return d=Math.max(p,h),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,c=Aa(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:m}=n.label,p=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),h=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,p,m),{orientation:f,majorDimension:g}=p,{majorSize:y}=h,v=Oa(n.label),{font:b,lineHeight:x,gap:S,maxLabelWidth:E}=v,M=ba(this.chart,this.settings.formatter,e),C=y;va.addLabelTitles({labels:c,formatter:M,isContinuous:o,canBeContinuous:l,localeInfo:s}),va.calculateLabelPositions({labels:c,scale:e,size:C,layoutService:r,orientation:f,rtl:d,isContinuous:o,isDimension:a});const[T,O]=Sa(e,o),{filteredLabels:A,lowerOobs:w,upperOobs:N,lowerCircleSize:R,upperCircleSize:k,lowerOobSpace:L,upperOobSpace:I}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:m}=Ea(e,t,n,c),p="scaledValue"!==c&&sa.getInvert({orientation:r,rtl:i,isContinuous:o}),h=function(e,t,n){return n?t:e}(d,u,p),f=function(e,t,n){return n?e:t}(d,u,p),g=h.length,y=f.length,v=Ma(l),b=Ca(g,v),x=Ca(y,v),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),E=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,x,r,s);return{filteredLabels:m,lowerOobs:h,upperOobs:f,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:E}}({labels:c,minValue:T,maxValue:O,orientation:f,rtl:d,isContinuous:o,style:n,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),P=L,q=y-I;pa(w),pa(N);const D=Ta({alignment:0,dockValue:0,oobs:w,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+R/2,areaProps:p,radius:R/2,font:b}),z=Ta({alignment:1,dockValue:1,oobs:N,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+k/2),areaProps:p,radius:k/2,font:b});va.addLabelsInfo({labels:A,scale:e,majorSize:y,lowerLimit:P,upperLimit:q,labelStyle:v,lineHeight:x,gap:S,maxLabelWidth:E,majorDimension:g,orientation:f,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),Wo.layout(A.map((e=>e.segment)),P,q,n.label.gap);const $=A.filter((e=>Wo.isInside(e.segment,P,q,o)));return va.createLabels({labels:$,style:n.label,maxLabelWidth:E,areaProps:p,area:h,lineHeight:x,font:b,theme:i}).concat([...D,...z])}};var Na={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function Ra(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=ce(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:c}=Na;return c.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(l,e)&&M(l,e,null);else{const e=t[0],n=t[1].split("].")[1];E(l,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),l}var ka={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Ra(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Ra(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:La,extractInfoFromInputValue:Ia,resolveValue:Pa}=sa;var qa={resolveValue:Pa,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=La({refLineLayout:e,layoutService:n});return Ia(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=La({refLineLayout:e,layoutService:n});return Ia(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=La({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=La({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const Da=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{var m,p;const h={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(p=t.style)||void 0===p?void 0:p.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(h.scale=s,h.value=t.refLineExpr.value):(h.valueInfo=qa.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),h.value=()=>{var e;const i=sa.getScaledPosition({scale:a.scale(s),value:qa.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:h.valueInfo,size:null===(e=a.component(u))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(i)?void 0:i}),h};function za({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:m,minimumLayoutMode:p}){const h=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!h.length)return!1;const f={key:u,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:ka.lines.trackBy,compensateForLayoutChanges:ka.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return h.forEach((o=>{f.lines[l].push(Da({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:y}))})),f}const $a=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:m})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:ka.refLineLabels.trackBy,compensateForLayoutChanges:ka.refLineLabels.compensateForLayoutChanges}}),Fa=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:d,fontStyle:m,fontWeight:p,textDecoration:h}=c||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:d,fontStyle:m,fontWeight:p,textDecoration:h,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(f.background={fill:s}),a?(f.scale=i,f.value=e.refLineExpr.value):(f.value=()=>qa.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>qa.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>qa.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function Ba({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:m,path:p}){const h=e?t.dimensionRefLineLabels:p?t.query.getRefLineLabels(p):t.measureRefLineLabels;if(!h.length)return[];const f=[],g=!e||n.meta.isContinuous,y=h.map((e=>Fa({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g})));return f.push($a({isDimension:e,rtl:d,style:s,dock:o,key:m,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:c,isContinuous:g,localeInfo:u})),f}function ja({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=Ee.dimensionless(o),l=sa.getMeasureRefLines(o),c=sa.getDimensionRefLines(o,s),u=sa.getMeasureRefLineLabels(o),d=sa.getDimensionRefLineLabels(o,s);let m={},p={};const h=()=>!(!c||!c.length)&&!c.every((t=>{const o=sa.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return sa.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!p[t])return!1;if(!n&&i){const n={valueInfo:p[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return sa.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)})),f={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:p,dimensionValuesInfo:m,query:{getRefLines:e=>sa.getRefLines(o,e),getRefLineLabels:e=>sa.getRefLineLabels(o,e)},update:()=>{p=f.dimensionRefLineInfo,h()&&(m=sa.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=m,c.forEach((t=>{const n=sa.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(p[n]?(p[n].innerValues=m[n].innerValues,p[n].minOrder=Math.min(p[n].minOrder,m[n].minOrder),p[n].maxOrder=Math.max(p[n].maxOrder,m[n].maxOrder),p[n].isMinOrderOk=p[n].isMinOrderOk||m[n].isMinOrderOk,p[n].isMaxOrderOk=p[n].isMaxOrderOk||m[n].isMaxOrderOk):p[n]={id:m[n].id,qText:m[n].qText,innerValues:m[n].innerValues,minOrder:m[n].minOrder,maxOrder:m[n].maxOrder,isMinOrderOk:m[n].isMinOrderOk,isMaxOrderOk:m[n].isMaxOrderOk},p[n].numInnerValues=(p[n].maxOrder||0)-(p[n].minOrder||0)+1)})))}};return f.update(),f}function _a(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=e&&e.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}var Ha={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",MARKER_LABEL:"marker-label",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},Ua={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const Va={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 Ya(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Wa={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={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,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Xa(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r;let i,o,a,s,l,c;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(r=e.session)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.url)){var u;if(i=e.session.options||(null===(u=e.enigmaModel)||void 0===u?void 0:u.session.sessionConfig),!i){var d;i=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(i.url);i.host=t.hostname,i.port=t.port,i.isSecure="wss:"===t.protocol}return c=void 0!==i.secure?i.secure:i.isSecure,o=c?"https://":"http://",a=i.host||"localhost",s=i.port?`:${i.port}`:"",l=i.prefix?i.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await Wa.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function Ga(e,t,n,r){var i,o,a;const{app:s,flags:l}=t,c=null===(i=e.layout)||void 0===i||null===(i=i.tooltip)||void 0===i?void 0:i.imageComponents;if(!c)return[];const[u]=c,d=u.size||"small",m=u.type||"media";let p=-1;for(let e=0;e<n.length;e++)if(n[e].cId===u.cId){p=e;break}const h=(null===(o=r.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let f;if(-1!==p&&h[p]&&(f=h[p]),"media"===m&&null!==(a=u.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return Xa(u,d,s);if("url"===m)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&Ya(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await Wa.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Wa.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(s,l,u,d,f);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&f&&f.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(Ya(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await Wa.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(s,n[p],d,f)}return[]}const Ka={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(Ga(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},Ja={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await Ka.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>Ka.checkIfPromisesExist({customTooltipModel:e})};const Za=(e,t)=>{var n,r,i;const o=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===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:Va.CHART.CHART_PARENT_TYPE,qId:Va.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Qa=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:Va.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const es={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r;const i=null!==(n=null===(r=t.tooltip)||void 0===r||null===(r=r.chart)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.size)&&void 0!==n?n:"medium",o=Va.CHART.STYLE[i];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:Va.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":o}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a;const s=i,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await es.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=Va.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=Va.CHART.STATE,a=Za(t,o),s=await e.createSessionObject(a),l=Qa(t);if(s.id!==Va.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var c,u,d,m;const e=n.length>0&&void 0!==(null===(c=n[0].data)||void 0===c?void 0:c.value)?[null===(u=n[0].data)||void 0===u?void 0:u.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var p,h;const e=null!==(p=n[0].data.selectionOuterDimension)&&void 0!==p?p:n[0].data.selectionDimension;if(null!=e&&null!==(h=e.source)&&void 0!==h&&h.field){var f;const t=null==e||null===(f=e.source)||void 0===f?void 0:f.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(Va.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await i.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(m=s.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await es.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(es.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(Va.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=Va.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function ts(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function ns(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=Va.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function rs(e){const t=ns();return e.filter((e=>t[e.id]))}const is={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 i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const c=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[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(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[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===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=is.getAttrExprData(a);o.length||n.length?Ja.handlePromises({customTooltipModel:i,nodes:is.getDataNodes(s,o.length>0?o: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!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&es.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Ja.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[t])||void 0===o?void 0:o.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[Va.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[Va.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[Va.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(rs(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[Va.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[Va.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ts(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===rs(i).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...i,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=ts(e)||[];[...i,t].forEach((e=>{const t=rs(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=ns(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[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=[],i={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"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function os(e,t,n,r){var i;const o=(null===(i=t.qHyperCube)||void 0===i||null===(i=i[n])||void 0===i||null===(i=i[r])||void 0===i?void 0:i.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const i=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case Va.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case Va.CUSTOM.TITLE:case Va.CUSTOM.DESCRIPTION:case Va.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);a.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const as={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>os(t,e,r,n)}}};const ss={getCustomAttrExps(e,t,n){var r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(r=t.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(o))return i;return function(e,t,n,r){const i={[Va.CUSTOM.TITLE]:!0,[Va.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=is.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===Va.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===Va.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,o.map((t=>Ie.getMeasure(e,t))),e,i)}};function ls({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(ss.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:cs}=Va;function us({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},d=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:is,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),m="rtl"===c.direction,p=()=>{var e;const n=!(null===(e=u.properties)||void 0===e||null===(e=e.qHyperCubeDef)||void 0===e||!e.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv})));return!(!t.tooltip||t.tooltip.auto||n)};return{setProperties:e=>{u.properties=e},isEnabled:()=>p(),hideBasic:()=>p()&&E(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=ls({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===cs.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===cs.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>is.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>is.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const i=is.getDataNodes(o,r),{attrExps:a}=is.getAttrExprData(t);return Ja.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(p()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>es.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>is.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>es.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=d.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>es.hide({app:n,customTooltipModel:d}),destroy:()=>es.destroyVisualization({customTooltipModel:d})}}}function ds({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter((e=>e.type===Ua.TYPE.BAR)),c=n.meta.isContinuous?s:a,u=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:as.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function ms({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,c=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},u)=>({source:n,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:u,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:as.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function ps({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter((e=>e.type===Ua.TYPE.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const hs={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var fs={OPTIONS:hs,DEFAULT:hs.MINI_CHART};function gs({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<o){const e=(o-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function ys({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const vs=e=>({miniChart:e===fs.OPTIONS.MINI_CHART.value,bar:e===fs.OPTIONS.BAR.value,none:e===fs.OPTIONS.NONE.value}),bs=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return vs(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return vs(fs.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return vs(!n&&(r||!r&&i)?fs.OPTIONS.NONE.value:fs.OPTIONS.MINI_CHART.value)};function xs({layoutService:e,override:t}){const n=bs({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===fs.OPTIONS.MINI_CHART.value,n.bar=t.value===fs.OPTIONS.BAR.value,n.none=t.value===fs.OPTIONS.NONE.value),n}function Ss({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),m="horizontal"===o.meta.major.orientation,p=m?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,h=m?d.rect.computedInner.width:d.rect.computedInner.height,f=m&&a?h-p:p,g=Math.max(0,Math.min(f/h,1)),[y,v]=ys({layoutService:i,viewState:n,viewCache:r}),b=g<y,x=g>v,S=!b&&!x;return{pixel:f,relative:g,thumb:S?f-y*h:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function Es({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,m]=ys({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(m-d)*u}}}function Ms({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Ss({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Es({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Cs="data-scrollbar-handle";function Ts({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Cs)||""}const Os="scrollbarResize",As=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Ss({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Os}`,options:{event:Os,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Os]=this[Os]||{},As(t)&&Ts({e:t})&&(this[Os].panningEvent=t.srcEvent),!!this[Os].panningEvent))}},events:{[`${Os}start`](n){n.preventDefault(),this[Os]=this[Os]||{},this[Os].panningEvent&&t.component(e).emit("dragStart",this[Os].panningEvent)},[`${Os}move`](n){if(n.preventDefault(),this[Os]=this[Os]||{},!this[Os].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=Ts({e:this[Os].panningEvent});let m="start"===d?Math.min(u,o.max):o.min,p="end"===d?Math.max(u,o.min):o.max;m===p&&(m-="start"===d?c:0,p+="end"===d?c:0),r.set("zoom",{min:m,max:p}),t.component(e).emit("render")},[`${Os}end`](n){n.preventDefault(),this[Os]=this[Os]||{},delete this[Os].panningEvent,t.component(e).emit("dragEnd")},[`${Os}cancel`](n){n.preventDefault(),this[Os]=this[Os]||{},delete this[Os].panningEvent,t.component(e).emit("dragEnd")}}}}const Ns="scrollbarPan";function Rs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Ss({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Es({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Ns}`,options:{event:Ns,threshold:0,enable(r,i){return this[Ns]=this[Ns]||{},!(i&&!this[Ns].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{[`${Ns}start`](n){n.preventDefault();const a=c(n);if(this[Ns]=this[Ns]||{},this[Ns].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Ns].relative=a.relative,this[Ns].zoom=r.get("zoom"),this[Ns].zoom.span=this[Ns].zoom.max-this[Ns].zoom.min,this[Ns].zoom.fullSpan=o-n}else if(a.onThumb)this[Ns].offset=a.thumb;else{const e=u();this[Ns].offset=a.beforeThumb?0:e.thumbSize}},[`${Ns}move`](n){n.preventDefault();const a=c(n);if(this[Ns]=this[Ns]||{},o.meta.isContinuous){const e=a.relative-this[Ns].relative,{fullSpan:t,span:n,min:o,max:s}=this[Ns].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Ns].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Ns}end`](n){n.preventDefault(),this[Ns]=this[Ns]||{},this[Ns].isPanning=!1,t.component(e).emit("unlockState")},[`${Ns}cancel`](n){n.preventDefault(),this[Ns]=this[Ns]||{},this[Ns].isPanning=!1,t.component(e).emit("unlockState")}}}}function ks({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[Ms({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),Rs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Ls({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const Is={background:"rgba(0, 0, 0, 0.1)"},Ps={top:-1,bottom:-1,width:6},qs={width:2,background:"#595959"};var Ds={before:Is,after:Is,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ps,endHandle:Ps,startHandleBorder:qs,endHandleBorder:qs};const zs={background:"rgba(0, 0, 0, 0.1)"},$s={top:-1,bottom:-1,width:6},Fs={width:2,background:"#595959"};var Bs={before:zs,after:zs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:$s,endHandle:$s,startHandleBorder:Fs,endHandleBorder:Fs};const js={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},_s={pointerEvents:"initial"},Hs={pointerEvents:"none"};const Us="ew-resize",Vs="default";function Ys(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function Ws(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?Us:Vs}function Xs(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function Gs(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function Ks(){const{size:e,start:t,end:n}=Ys.call(this);this.renderer.render(this.elements(this.h,Xs.call(this,e,t,n)))}function Js(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?Bs:Ds;return{container:{...js},before:{...js,...n.before,...t.before},after:{...js,...n.after,...t.after},thumb:{...js,...n.thumb,...t.thumb},startHandle:{...js,..._s,...n.startHandle},endHandle:{...js,..._s,...n.endHandle},startHandleBorder:{...js,...Hs,...n.startHandleBorder},endHandleBorder:{...js,...Hs,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var Zs={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){Ks.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!Gs.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Ts({e:e});t&&(this.state.hover[t]=!0),Ws.call(this),Ks.call(this)},leave(){this.state.locked||(this.state.hover.reset(),Ws.call(this),Ks.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Ts({e:e});t&&(this.state.drag[t]=!0),Ws.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),Ws.call(this),Ks.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=Ys.call(this);return this.elements(e,Xs.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[i.end]:t-n},m={[i.start]:r},p={left:-3},h={left:1},f={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?m:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?d:m},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?f:p},class:"scrollbar--start-handle",[Cs]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:h}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?p:f},class:"scrollbar--end-handle",[Cs]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?h:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[y,x,v,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:Js.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function Qs({layoutService:e}){return e.meta.isContinuous&&xs({layoutService:e}).miniChart}function el({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(Ua.TYPE.LINE),l=[...ms({forceCreate:!0,key:Ha.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...ms({key:Ha.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...ms({key:Ha.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...ds({key:Ha.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...ds({key:Ha.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...ps({key:Ha.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...ps({key:Ha.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return Qs(e)&&(l.push(...ms({key:Ha.COLLECTION.REDUCED,source:Ha.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),l.push(...ms({key:Ha.COLLECTION.REDUCED_PRIMARY,source:Ha.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),l.push(...ms({key:Ha.COLLECTION.REDUCED_SECONDARY,source:Ha.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),l.push(...ds({key:Ha.COLLECTION.REDUCED_STACKED_PRIMARY,source:Ha.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===Ua.TYPE.BAR)),colorService:i})),l.push(...ds({key:Ha.COLLECTION.REDUCED_STACKED_SECONDARY,source:Ha.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===Ua.TYPE.BAR)),colorService:i}))),l}const tl=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function nl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const rl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:tl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:nl({models:e})}},il=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:tl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:nl({models:e})}};function ol({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function al({viewCache:e,mainMajor:t}){return ce(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function sl({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function ll({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,d=l.getStyles(),m={type:"time",data:{field:u},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:u,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>c({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:sl({viewState:t,viewCache:n,layoutService:o})};return{[Ha.SCALE.MAJOR]:ce(!0,{},m,{ticks:{level:"outer"}}),[Ha.SCALE.MAJOR_INNER]:ce(!0,{},m,{ticks:{level:"inner"}})}}function cl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...ll({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[Ha.SCALE.MAJOR]:ol({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[Ha.SCALE.MAJOR]:il({models:t,environment:i})}:{[Ha.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?il({models:t,environment:i}):rl({models:t,environment:i})};return Qs(t)?{...a,[Ha.SCALE.REDUCED]:al({viewCache:r,mainMajor:a[Ha.SCALE.MAJOR]})}:a}function ul({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function dl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!Qs({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}function ml({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...cl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[Ha.SCALE.MINOR.PRIMARY]:ul({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:i}),[Ha.SCALE.MINOR.SECONDARY]:ul({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:i}),[Ha.SCALE.MINOR.REDUCED_PRIMARY]:dl({layoutService:o,tickModel:s,dockService:u,environment:i}),[Ha.SCALE.MINOR.REDUCED_SECONDARY]:dl({layoutService:o,tickModel:l,dockService:u,environment:i}),...c.custom.wrappedScales()}}var pl={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const hl=["all","labels"];function fl({models:e,flags:t}){const{layoutService:n,dockService:r,seriesModel:i,themeService:o,styleModel:a,animationsModel:s}=e,l=n.getLayoutValue("measureAxes");if(!l||!l.length)return[];const c=o.getStyles(),u=a.query.axis.label.getStyle(),{measureAxes:d}=i.meta;return d.filter((e=>{const t=e.isPrimary?0:1;return hl.some((e=>l[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?Ha.COMPONENT.AXIS.MINOR.PRIMARY:Ha.COMPONENT.AXIS.MINOR.SECONDARY,renderer:_a(t),scale:e.scale,layout:{dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock,minimumLayoutMode:pl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{stroke:c.axis.line.major.color},ticks:{stroke:c.axis.line.major.color},minorTicks:{stroke:c.axis.line.minor.color}},animations:{enabled:s.enabled,trackBy:ka.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:ka.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock})}})))}var gl={INACTIVE:.5},yl={LOWER:3,UPPER:13};const vl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return we.getAdjustedMaxGlyphCount(t,r,0,"qText")};function bl({models:e,environment:t,flags:n}){const{layoutService:r,dockService:i,styleModel:o,themeService:a,animationsModel:s}=e,l="rtl"===t.options.direction,c=r.getLayoutValue("dimensionAxis"),u=o.query.axis.label.getStyle(),d=vl({layoutService:r}),{orientation:m}=i.meta.major,p="horizontal"===m,h=p?c.label:"auto",f=a.getStyles(),{auto:g,spacing:y}=r.getLayoutValue("gridLine",{});return{type:"axis",key:Ha.COMPONENT.AXIS.MAJOR,renderer:_a(n),scale:Ha.SCALE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:pl.AXIS.MAJOR[m.toUpperCase()]},settings:{labels:{mode:c.label,tiltAngle:l?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===h?void 0:i.meta.minor.size/4,maxGlyphCount:d,tiltThreshold:d>yl.LOWER&&d<yl.UPPER?1:void 0,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{show:!g&&0===y,stroke:f.axis.line.major.color},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:gl.INACTIVE}}}]},animations:{enabled:s.enabled,trackBy:ka.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:ka.axes.compensateForLayoutChanges({isHorizontal:p})}}}function xl({models:e,flags:t}){const{dockService:n,styleModel:r,themeService:i,layoutService:o,animationsModel:a}=e,{orientation:s}=n.meta.major,l=r.query.axis.label.getStyle(),c=i.getStyles(),{auto:u,spacing:d}=o.getLayoutValue("gridLine",{});return{type:"axis",key:Ha.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:_a(t),scale:Ha.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:pl.AXIS.MAJOR[s.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{show:!u&&0===d,stroke:c.axis.line.major.color}},animations:{enabled:a.enabled,trackBy:ka.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:ka.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Sl({models:e,environment:t,flags:n}){const{layoutService:r}=e,i=r.getLayoutValue("dimensionAxis");if(!i)return[];const{show:o}=i;return"none"===o||"title"===o?[]:r.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:i,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,c="bottom"===n.meta.major.dock?0:1,u=r.getStyles(),d=i.query.axis.label.getStyle(),m=s?1:0,{auto:p,spacing:h}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:pl.AXIS.MAJOR[l]},preferredSize:()=>({size:2*parseFloat(d.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:s?"end":"start",label:{align:c,justify:m},guideLine:{major:{justify:m},minor:{align:c}},line:{show:!1}},style:{label:{fontFamily:d.fontFamily,fontSize:d.fontSize,fill:d.fill},majorGuideLine:{stroke:u.axis.line.major.color},minorGuideLine:{stroke:u.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:ka.axes.trackBy({isTime:!0}),compensateForLayoutChanges:ka.axes.compensateForLayoutChanges({isTime:!0})}};return[ce(!0,{},f,{key:Ha.COMPONENT.AXIS.TIME_INNER,scale:Ha.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!p&&0===h}},style:{majorGuideLine:{stroke:u.axis.line.minor.color},minorGuideLine:{stroke:u.axis.line.major.color},line:{stroke:u.axis.line.major.color}}}),ce(!0,{},f,{key:Ha.COMPONENT.AXIS.TIME_OUTER,scale:Ha.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):r.meta.isContinuous?[xl({models:e,flags:n})]:[bl({models:e,environment:t,flags:n})]}const El=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,Ml=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function Cl({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:1},...t},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:gl.INACTIVE},...n}}}]}}var Tl="max",Ol="min";function Al(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const wl=(e,t)=>`${e}-${t.id}`,Nl=4,Rl=12,kl=4;function Ll({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${kl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(Ha.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Nl,Math.min(Rl,l));o.size=`${"bar"===i?2*c:c}px`}return o.size}}const Il=({series:e,isPrimary:t,seriesModel:n})=>e?"qMeasureInfo/0"===e.ref:t?n.meta.primarySeries.some((e=>"qMeasureInfo/0"===e.ref)):n.meta.secondarySeries.some((e=>"qMeasureInfo/0"===e.ref)),{isDark:Pl}=Lt;const ql=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,d=a.getColor(),{fill:m,marker:p}=n.options,{isContinuous:h}=i.meta,f="rtl"===r.options.direction,{orientation:g}=s.meta.major,y="horizontal"===g,v=(n.isPrimary?l:c).query.getExtrema(),b=({end:e})=>{const{value:t}=e;return Al(t,v)},x=wl(Ha.COMPONENT.MARKER,n);return{type:"point",key:x,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:Ha.SCALE.MAJOR,fn:Ml({layoutService:i,seriesModel:o,rtl:f,orientation:g}),ref:h?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:m||"bar"===p?d:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||b(e.datum)?0:1},stroke:e=>{const t=d(e);return m?Pl(t)?function(e){return nt(e).brighter(.5).toString()}(t):function(e){return nt(e).darker().toString()}(t):t},size:Ll({chart:e,layoutService:i,dockService:s,markerKey:x,markerType:p}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:p,horizontal:y,rtl:f})},brush:Cl({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||b(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||b(e.data)?0:gl.INACTIVE}}}),animations:{enabled:u.enabled,isMainComponent:Il({series:n}),trackBy:ka.markers.trackBy,compensateForLayoutChanges:ka.markers.compensateForLayoutChanges}}};function Dl({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(Ha.SCALE.MAJOR),c=s(Ha.SCALE.COLOR),u=t&&i?[...a.points].reverse():a.points,d=u.reduce(((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=u[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t}),[]),m="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),p=d.map(m),h=Math.min(...p),f=Math.max(...p)-h,g=0===f?1:f,y=p.map(((e,t)=>0===t?0:t===p.length-1?1:(e-h)/g)),v=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=n?o||r:c(o)||r,s=0===t,l=t===d.length-1,u=y[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-y[t-1])/2).toFixed(5)))}):v.push({color:a,offset:u});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(y[t+1]-u)/2).toFixed(5)))}):v.push({color:a,offset:u})}}const b=v.reduce(((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function zl({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:c,nil:u}=i.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===c)return i.getColor();if("measure"===l&&"categorical"===c)return i.getColor();const m=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?Dl({isHorizontal:d,isColor:!0,fallback:u,rtl:a}):i.getColor();const p=r.getLayoutValue("color",{}),h=!p.auto&&"byExpression"===p.mode,f=!!p.colorExpression;if(h&&!f)return u;const g=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex;return s||!g?Dl({isHorizontal:d,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(Ha.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(Ha.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),c=Math.min(...l),u=Math.max(...l),d=t?Math.min(0,c):c,m=(t?Math.max(0,u):u)-d,p=0===m?1:m,h=s.domain(),f=[];for(let e=0;e<h.length-1;e++){const t=h[e],r=s(t)||n;f.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/p))});const i=h[e+1];f.push({color:r,offset:Math.min(1,Math.max(0,(i-d)/p))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:d,fallback:u,rtl:a})}const $l=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a,animationsModel:s}=e,l="rtl"===t.options.direction,{orientation:c}=o.meta.major,u=Ml({layoutService:r,seriesModel:i,rtl:l,orientation:c});return{key:wl(Ha.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:Ha.SCALE.MAJOR,fn:u},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:zl({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:Cl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:gl.INACTIVE},inactive:{opacity:gl.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!Il({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:ka.lines.trackBy,compensateForLayoutChanges:ka.lines.compensateForLayoutChanges}}};var Fl={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear"},WIDTH:{FULL:{DEFAULT:2},LESS:{DEFAULT:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Bl({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const jl=3,_l=20;function Hl({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u,animationsModel:d}=e,m=r.getLayoutValue("dataPoint.show",!1),{orientation:p}=a.meta.major,h="horizontal"===p,f="SPARK"===a.meta.chart.mode,g=i.getColor(),{POINT:y}=Fl,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Bl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){const t=e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{});return t}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:c}=r({index:s,items:o.items});return!l&&!c}}({series:t,layoutService:r}),b="rtl"===n.options.direction,x=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:S}=r.meta,E=({end:e})=>{const{value:t}=e;return Al(t,x)};return{type:"point",key:wl(Ha.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:h?y.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[h?"x":"y"]:{scale:Ha.SCALE.MAJOR,fn:Ml({layoutService:r,seriesModel:o,rtl:b,orientation:p}),ref:"major"},sizeLimits:{minPx:jl,maxPx:_l},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:g,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||E(e)?0:f?v({item:e,items:t.items})?1:0:m||v({item:e,items:t.items})?1:0}},brush:Cl({layoutService:r,active:{r:e=>e.r+Fl.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data))return 0;if(!S||m)return 1;const{event:n,components:r=[]}=(null==u?void 0:u.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;const i=[Ha.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Ha.COMPONENT.AXIS_OVERLAY.TIME_INNER,Ha.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0));return i?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:d.enabled,trackBy:ka.nonUpdatingNode.trackBy,compensateForLayoutChanges:ka.points.compensateForLayoutChanges}}}const Ul=(e,{dataset:t},n=!1)=>{const{value:r,label:i,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return ve.shouldUseFormat(a.raw())?a.formatter()(r):i};function Vl({chart:e,models:t,environment:n,flags:r,lineSeries:i}){const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,d="rtl"===n.options.direction,m=o.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;if(!i.length)return!1;const p=s.query.point.label.getStyle();return{type:"point-label",key:Ha.COMPONENT.POINT_LABEL,renderer:_a(r),layout:{displayOrder:2,minimumLayoutMode:pl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>Ul(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:i.map((e=>({key:`${Ha.COMPONENT.POINT}-${e.id}`,labels:!0,lines:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(i.find((e=>e.id===t)).isPrimary?l:c).query.getExtrema();return!Al(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(Ha.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,fill:p.fill},animations:{enabled:u.enabled,trackBy:ka.nonUpdatingNode.trackBy,compensateForLayoutChanges:ka.labels.compensateForLayoutChanges}}}const Yl=({chart:e,models:t,environment:n,flags:r,markerSeries:i})=>{const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,d="rtl"===n.options.direction,m=s.query.marker.label.getStyle(),p=o.getLayoutValue("dataPoint");return!(null==p||!p.showMarkerLabels)&&(!!i.length&&{type:"point-label",key:Ha.COMPONENT.MARKER_LABEL,renderer:_a(r),layout:{displayOrder:2,minimumLayoutMode:pl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>Ul(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:i.map((e=>({key:`${Ha.COMPONENT.MARKER}-${e.id}`,labels:!0,lines:!1,fixed:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(i.find((e=>e.id===t)).isPrimary?l:c).query.getExtrema();return!Al(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(Ha.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},animations:{enabled:u.enabled,trackBy:ka.nonUpdatingNode.trackBy,compensateForLayoutChanges:ka.labels.compensateForLayoutChanges}})},Wl=({chart:e,dock:t})=>{let n=t;const r=e.component(`${Ha.COMPONENT.SLICED_HAT}-${Tl}`),i=e.component(`${Ha.COMPONENT.SLICED_HAT}-${Tl}-${Ua.AXIS.PRIMARY}`),o=e.component(`${Ha.COMPONENT.SLICED_HAT}-${Tl}-${Ua.AXIS.SECONDARY}`);return r?n=`@${Ha.COMPONENT.SLICED_HAT}-${Tl}`:i?n=`@${Ha.COMPONENT.SLICED_HAT}-${Tl}-${Ua.AXIS.PRIMARY}`:o&&(n=`@${Ha.COMPONENT.SLICED_HAT}-${Tl}-${Ua.AXIS.SECONDARY}`),n},Xl=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${Ha.COMPONENT.SLICED_HAT}-${Tl}`&&e!==`@${Ha.COMPONENT.SLICED_HAT}-${Tl}-${Ua.AXIS.PRIMARY}`&&e!==`@${Ha.COMPONENT.SLICED_HAT}-${Tl}-${Ua.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${Ha.COMPONENT.SLICED_HAT}-${Ol}`&&e!==`@${Ha.COMPONENT.SLICED_HAT}-${Ol}-${Ua.AXIS.PRIMARY}`&&e!==`@${Ha.COMPONENT.SLICED_HAT}-${Ol}-${Ua.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function Gl({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const m=c?"left":"right";return{type:"label-space",key:Ha.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:pl.LABEL_SPACE,dock:Wl({chart:e,dock:u?"top":m})},settings:{size:10},preferredSize:()=>{const t=e.component(`${Ha.COMPONENT.LINE}-${r[0].id}`);if(null==t||!t.rect)return 0;const n=(u?17:34)/t.rect[u?"height":"width"],i=a.query.getExtrema(),o=e.scale(Ha.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=u||c?o:1-o,d=r.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),p=e.scale(Ha.SCALE.MINOR.SECONDARY)(m.implicit.line.max),h=u||c?p:1-p,f=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||f&&h<n?10:0}}}const Kl={min:"Min",max:"Max"};function Jl(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function Zl(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function Ql(e,t,n){return Jl(e,t,n)||Zl(e,t,n)}function ec(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function tc(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function nc(e,t){return ec(e,t)||tc(e,t)}function rc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${Kl[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Tl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Tl?!ec(r,e):!tc(r,e)}({extrema:e,type:t}))}var ic=Object.freeze({__proto__:null,isMaxOutOfBounds:ec,isMinOutOfBounds:tc,isOutOfBounds:nc,isSegmentMaxOutOfBounds:Jl,isSegmentMinOutOfBounds:Zl,isSegmentOutOfBounds:Ql,shouldShowOob:rc});const oc={min:"Min",max:"Max"},ac=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:d,layoutService:m,seriesModel:p,themeService:h,fieldModel:f,animationsModel:g}=t,y="rtl"===o.options.direction,{dock:v,opposite:b,orientation:x}=s.meta.major,S=l.query.getExtrema(),E=c.query.getExtrema(),M=a===Tl,{isBarSeriesGrouped:C}=m.meta,T=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===Tl?n:r;const o=e.component(`${Ha.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.PRIMARY}`),s=e.component(`${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.SECONDARY}`),l=e.component(Ha.COMPONENT.LABEL_SPACE),c=e.component(`${Ha.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${Ha.COMPONENT.BAR_OOB}-${t}-${Ua.AXIS.PRIMARY}`),d=e.component(`${Ha.COMPONENT.BAR_OOB}-${t}-${Ua.AXIS.SECONDARY}`);return o?i=`@${Ha.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.PRIMARY}`:s?i=`@${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.SECONDARY}`:c||u||d?l&&t===Tl?i=`@${Ha.COMPONENT.LABEL_SPACE}`:c?i=`@${Ha.COMPONENT.BAR_OOB}-${t}`:u?i=`@${Ha.COMPONENT.BAR_OOB}-${t}-${Ua.AXIS.PRIMARY}`:d&&(i=`@${Ha.COMPONENT.BAR_OOB}-${t}-${Ua.AXIS.SECONDARY}`):l&&t===Tl&&(i=`@${Ha.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:b,dock:v}),O=Ml({layoutService:m,seriesModel:p,rtl:y,orientation:x}),A=r.concat(n);if(!A.length)return!1;const w=M?S.implicit.bar.max:S.implicit.bar.min,N=Number(w.toFixed(13));if(!C&&i.length&&ic[`is${oc[a]}OutOfBounds`](N,S))return!1;if(!S.meta.hasExplicit&&!E.meta.hasExplicit)return!1;const R=M?"max":"min",k=Math[R](Number(S.implicit.line[R].toFixed(13)),Number(S.implicit.marker[R].toFixed(13))),L=Math[R](Number(E.implicit.line[R].toFixed(13)),Number(E.implicit.marker[R].toFixed(13))),I=A.filter((e=>e.isPrimary)),P=A.filter((e=>!e.isPrimary)),q=I.length>0,D=P.length>0,{major:z,majorNumeric:$}=f.main,F=e=>"NaN"!==e.qNum?e.qNum:0,B=m.meta.isContinuous?$:z;return{type:"data-out-of-bounds-marker",key:`${Ha.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:T,minimumLayoutMode:pl.OUT_OF_BOUNDS_MARKER},data:{extract:A.map((({ref:e,typeIndex:t,options:n})=>({field:z,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:B},end:{field:e,value:n.showAsZeros?F:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:M?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:M?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:I,secondarySeries:P,orientation:x,rtl:y,major:{scale:Ha.SCALE.MAJOR,fn:O},markerOffset:Xl({dockPosition:T,orientation:x,rtl:y})},brush:Cl({layoutService:m}),show:()=>{if(M){if(q&&k>u.query.getMax())return!0;if(D&&L>d.query.getMax())return!0}if(!M){if(q&&k<u.query.getMin())return!0;if(D&&L<d.query.getMin())return!0}return!1},style:{fill:h.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:ka.lineOobs.compensateForLayoutChanges}}},sc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function lc({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=C(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Ha.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=sc[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=sc[a.meta.chart.mode],c=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,c)))})()}const cc=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function uc(e){return Math.min(Math.max(0,e),1)}const dc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:d,secondaryExtremumModel:m,animationsModel:p}=t,{isContinuous:h,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:y}=o.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),b=i?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY,x=i?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const S=f?{scale:x,start:{ref:"start",fn:e=>{const t=v(e);return uc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return uc(e.scale(t))}}}:{scale:x,start:{ref:"start",fn:e=>{const t=v(e);return uc(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?v(e):e.datum.end.value;return uc(e.scale(n))}}},E=(i?d:m).query.getExtrema(),M=f?({start:e,end:t})=>Ql(e.value,t.value,E):({end:e})=>nc(e.value,E);return{type:"box",key:`${Ha.COMPONENT.BAR}-${b}`,data:{filter:(()=>{if(f)return;const e=l.query.series(Ua.TYPE.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?i?Ha.COLLECTION.STACKED_PRIMARY:Ha.COLLECTION.STACKED_SECONDARY:i?Ha.COLLECTION.PRIMARY:Ha.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Ha.SCALE.MAJOR,fn:El({layoutService:o,axis:b}),ref:h?{start:"major",end:"major"}:void 0},minor:S,box:{width:cc({isContinuous:h,isBarSeriesGrouped:g,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:y}),minWidthPx:h?lc({chart:e,models:t,viewState:n,viewCache:r,axis:b}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t;return!0===(null===(t=e.datum)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)||M(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:Cl({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data)?0:gl.INACTIVE}}}),animations:{enabled:p.enabled,isMainComponent:Il({isPrimary:i,seriesModel:l}),trackBy:ka.bars.trackBy,compensateForLayoutChanges:ka.bars.compensateForLayoutChanges}}},mc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:h}=o.meta,f=i?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY,g=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${Ha.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:i?Ha.COLLECTION.STACKED_TOTAL_PRIMARY:Ha.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Ha.SCALE.MAJOR,fn:El({layoutService:o,axis:f}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:cc({isContinuous:m,isBarSeriesGrouped:p,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:h}),minWidthPx:m?lc({chart:e,models:t,viewState:n,viewCache:r,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function pc(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,i=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map((e=>{const t=i.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Lt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):i.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:t,isHorizontal:n})})),label:t.label}}function hc(e,t,n,r){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const fc=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!i||!o&&!!r},gc=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!!i&&(!!o||!1!==r)};function yc(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}const vc=({models:e,environment:t,flags:n,isPrimary:r})=>{const{layoutService:i,seriesModel:o,styleModel:a,themeService:s,animationsModel:l}=e,{meta:c}=i,{isBarSeriesStacked:u}=c,d="rtl"===t.options.direction,m=s.getStyles(),p=a.query.bar.label.getStyle(),h=e.layoutService.getLayoutValue("dataPoint",{}),f=r?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY;if(!(r?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!fc(h,c))return!1;let g;!u&&(g=u?1:0);const y={label:e=>Ul(e.data,e,u),simplifiedPlacements:yc(g,0===g?1:0,u?.5:1,c.isContinuous),style:m.label.value},v=[pc(e,y)],b={component:`${Ha.COMPONENT.BAR}-${f}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>hc(t.data.end.value,e.dockService.meta.minor.orientation,d,0),labels:v,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily}}},x=[b];return{type:"labels",key:`${Ha.COMPONENT.BAR_LABEL}-${f}`,renderer:_a(n),layout:{minimumLayoutMode:pl.VALUE_LABEL},settings:{sources:x},animations:{enabled:l.enabled,trackBy:ka.nonUpdatingNode.trackBy,compensateForLayoutChanges:ka.labels.compensateForLayoutChanges}}};function bc(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function xc({chart:e,models:t,environment:n,flags:r,isPrimary:i}){const{meta:o}=t.layoutService,a="rtl"===n.options.direction,s=t.themeService.getStyles(),l=t.styleModel.query.bar.label.getStyle(),c=t.layoutService.getLayoutValue("dataPoint",{}),u=i?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY;if(0===(i?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!gc(c,o))return!1;const d=!fc(c,o),m=l.useContrastColor,p=e.formatter(i?Ha.FORMATTER.PRIMARY:Ha.FORMATTER.SECONDARY)||(e=>e),h=e=>p(e),f={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":h(e.data.sumOfPositives.value),simplifiedPlacements:bc("outside",d,m,o.isContinuous),style:s.label.value},g={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":h(e.data.sumOfNegatives.value),simplifiedPlacements:bc("opposite",d,m,o.isContinuous),style:s.label.value},y=[pc(t,f),pc(t,g)];return{type:"labels",key:`${Ha.COMPONENT.STACK_BAR_LABEL}-${u}`,renderer:_a(r),layout:{displayOrder:2,minimumLayoutMode:pl.VALUE_LABEL},settings:{sources:[{component:`${Ha.COMPONENT.STACK_BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>hc(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,a),labels:y,fontSize:parseInt(l.fontSize,10),fontFamily:l.fontFamily}}}]},animations:{enabled:t.animationsModel.enabled,trackBy:ka.nonUpdatingNode.trackBy,compensateForLayoutChanges:ka.labels.compensateForLayoutChanges}}}var Sc=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const Ec={min:"Min",max:"Max"};function Mc({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:p,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:f}=a.meta,g=m?mc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):dc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():c.query.getExtrema(),v=n===Tl,b=o?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${Ec[t]}`]}(y,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!Sc[`has${Ec[t]}Hat`](i,e)}(y,n,v)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${Ec[t]}`]&&r(e.explicit[t])}(y,n,v))return!1;let x="end";m&&(x=v?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.PRIMARY}`),a=e.component(`${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start}),M={type:"box-sliced-hat",key:`${Ha.COMPONENT.SLICED_HAT}-${n}-${b}`,layout:{dock:E},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:ce({},g.settings.box,{fill:m?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[x].value);return v?n>t:n<t},width:cc({isContinuous:p,isBarSeriesGrouped:h,styleModel:u,discreteModel:d,isBarSeriesStackedInBothAxis:f}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:Cl({layoutService:a})};return M}const Cc={min:"Min",max:"Max"},Tc={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Oc({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u,animationsModel:d}=t,{end:m,start:p}=s.meta.minor,{isBarSeriesStacked:h}=a.meta,f=h?mc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):dc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),g=o?l.query.getExtrema():c.query.getExtrema(),y=n===Tl?g.implicit.bar.max:g.implicit.bar.min,v=Number(y.toFixed(13)),b=o?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY;if(!f)return!1;if(!ic[`is${Cc[n]}OutOfBounds`](v,g))return!1;const x=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===Tl?n:r;const a=e.component(Ha.COMPONENT.LABEL_SPACE),s=e.component(`${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.PRIMARY}`),l=e.component(`${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.SECONDARY}`),c=e.component(`${Ha.COMPONENT.BAR_OOB}-${t}-${Ua.AXIS.PRIMARY}`),u=e.component(`${Ha.COMPONENT.BAR_OOB}-${t}-${Ua.AXIS.SECONDARY}`);return s?o=`@${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.PRIMARY}`:l?o=`@${Ha.COMPONENT.SLICED_HAT}-${t}-${Ua.AXIS.SECONDARY}`:c&&u&&!i?o=`@${Ha.COMPONENT.BAR_OOB}-${t}-${Ua.AXIS.PRIMARY}`:a&&t===Tl&&(o=`@${Ha.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:m,start:p,isPrimary:o});let S="end";h&&(S=n===Tl?"sumOfPositives":"sumOfNegatives");const E={type:"box-out-of-bounds",key:`${Ha.COMPONENT.BAR_OOB}-${n}-${b}`,layout:{dock:x},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:Te.getDockValue(n===Tl?m:p),oob:ce({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=h&&0===e.datum[S].value,i=ic[`is${Cc[n]}OutOfBounds`](e.datum[S].value,g,n),o=(!r||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Tc[n]].value;return 0!==i&&ic[`is${Cc[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:S,extrema:g}))&&i;return o}})},brush:Cl({layoutService:a}),animations:{enabled:d.enabled,compensateForLayoutChanges:ka.barOobs.compensateForLayoutChanges}};return E}function Ac(e){return Math.min(Math.max(0,e),1)}const wc=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(r?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY),p=r?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY,h=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Tl;if(!rc({extrema:h,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e),v={type:"box",key:`${Ha.COMPONENT.GHOST_BAR_OOB}-${n}-${p}`,data:{filter:(()=>{if(l)return;const e=a.query.series(Ua.TYPE.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?Ha.COLLECTION.STACKED_TOTAL_PRIMARY:Ha.COLLECTION.STACKED_TOTAL_SECONDARY:r?Ha.COLLECTION.PRIMARY:Ha.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Ha.SCALE.MAJOR,fn:El({layoutService:s,axis:p}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Ac(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=y(e,"sumOfPositives");return Ac(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=y(e,"sumOfNegatives");return Ac(e.scale(t))}}:{ref:"end",fn:e=>{const t=y(e);return Ac(e.scale(t))}}},box:{width:cc({isContinuous:c,isBarSeriesGrouped:u,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=f?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:m.max();return f?n>m.max():n<m.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return v};function Nc(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Rc=({chart:e,models:t,type:n,environment:r,flags:i,isPrimary:o})=>{const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,seriesModel:d,themeService:m,animationsModel:p}=t,h=m.getStyles(),f=u.query.bar.label.getStyle(),{meta:g}=a,{isBarSeriesStacked:y}=g,v=e.formatter(o?Ha.FORMATTER.PRIMARY:Ha.FORMATTER.SECONDARY),b=a.getLayoutValue("dataPoint",{}),x="horizontal"===s.meta.major.orientation,S="rtl"===r.options.direction;if(!(o?d.meta.primaryBarSeriesCount:d.meta.secondaryBarSeriesCount)||!y&&!fc(b,g)||y&&!gc(b,g))return!1;const E=o?l.query.getExtrema():c.query.getExtrema();if(!E.meta.hasExplicit)return!1;const M=n===Tl?E.implicit.bar.max:E.implicit.bar.min;if(!(n===Tl?ec(M,E):tc(M,E)))return!1;let C=e=>Ul(e.data,e);g.isBarSeriesStacked&&(C=n===Tl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(ec(e.data.sumOfNegatives.value,E)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return v?v(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(tc(e.data.sumOfPositives.value,E)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return v?v(t):t}return""});const T={label:C,simplifiedPlacements:Nc("outside",0,g.isContinuous,x,S),style:h.label.value},O={label:C,simplifiedPlacements:Nc("opposite",0,g.isContinuous,x,S),style:h.label.value},A=[pc(t,T),pc(t,O)],w=o?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY,N="horizontal"===s.meta.major.orientation?"down":"right",R=[{component:`${Ha.COMPONENT.GHOST_BAR_OOB}-${n}-${w}`,selector:"rect",strategy:{type:"bar",settings:{direction:N,labels:A,fontSize:parseInt(f.fontSize,10),fontFamily:f.fontFamily}}}];return{key:`${Ha.COMPONENT.BAR_OOB_LABEL}-${n}-${w}`,type:"labels",renderer:_a(i),layout:{minimumLayoutMode:pl.VALUE_LABEL},settings:{sources:R},animations:{enabled:p.enabled,trackBy:ka.nonUpdatingNode.trackBy,compensateForLayoutChanges:ka.labels.compensateForLayoutChanges}}},kc=({chart:e,models:t,viewState:n,viewCache:r})=>[dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Lc=({chart:e,models:t,viewState:n,viewCache:r})=>[mc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),mc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Ic=({chart:e,models:t,environment:n,flags:r})=>{const i=xc({chart:e,models:t,environment:n,flags:r,isPrimary:!0}),o=xc({chart:e,models:t,environment:n,flags:r,isPrimary:!1});return[vc({models:t,environment:n,flags:r,isPrimary:!0}),vc({models:t,environment:n,flags:r,isPrimary:!1}),i,o]},Pc=({chart:e,models:t,viewCache:n,viewState:r})=>[Mc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Mc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Mc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Mc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],qc=({chart:e,models:t,viewCache:n,viewState:r})=>[Oc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Oc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Oc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Oc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Dc=({chart:e,models:t})=>[wc({chart:e,models:t,type:"max",isPrimary:!0}),wc({chart:e,models:t,type:"min",isPrimary:!0}),wc({chart:e,models:t,type:"max",isPrimary:!1}),wc({chart:e,models:t,type:"min",isPrimary:!1})],zc=({chart:e,models:t,environment:n,flags:r})=>[Rc({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!0}),Rc({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!0}),Rc({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!1}),Rc({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!1})],$c=({chart:e,environment:t,flags:n,models:r,viewState:i,viewCache:o})=>{const{seriesModel:a}=r,s=a.query.series(Ua.TYPE.BAR).slice(-1),l=a.query.series(Ua.TYPE.LINE),c=a.query.series(Ua.TYPE.MARKER);return[...kc({chart:e,models:r,viewState:i,viewCache:o}),...Lc({chart:e,models:r,viewState:i,viewCache:o}),...l.map((e=>$l({models:r,environment:t,series:e}))),...l.map((e=>Hl({models:r,series:e,environment:t}))),...c.map((n=>ql({chart:e,models:r,series:n,environment:t}))),Vl({chart:e,models:r,environment:t,flags:n,lineSeries:l}),Yl({chart:e,models:r,environment:t,flags:n,markerSeries:c}),...Ic({chart:e,models:r,environment:t,flags:n}),...Pc({chart:e,models:r,viewCache:o,viewState:i}),...qc({chart:e,models:r,viewCache:o,viewState:i}),...Dc({chart:e,models:r}),...zc({chart:e,models:r,environment:t,flags:n}),ac({chart:e,models:r,markerSeries:c,lineSeries:l,barSeries:s,environment:t,type:"max"}),ac({chart:e,models:r,markerSeries:c,lineSeries:l,barSeries:s,environment:t,type:"min"}),Gl({chart:e,models:r,environment:t,lineSeries:l})]},Fc={NONE:0,WIDE:1,NARROW:3};function Bc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=r.getLayoutValue("gridLine",{});if(!a&&s===Fc.NONE)return!1;const c=i.getStyles(),u=n.meta.primarySeries.length>0;return{key:Ha.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:pl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===Fc.WIDE)||((e,t)=>t%2==0),stroke:c.grid.line.major.color},minorTicks:{show:!a&&s===Fc.NARROW,stroke:c.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(null!=l?l:0)&&u?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:ka.lines.trackBy,compensateForLayoutChanges:ka.lines.compensateForLayoutChanges}}}function jc({models:e}){var t,n;const{primaryExtremumModel:r,primaryTickModel:i,themeService:o,dockService:a,seriesModel:s,secondaryExtremumModel:l,secondaryTickModel:c,layoutService:u,animationsModel:d}=e,m=0===(null!==(t=null===(n=u.getLayoutValue("gridLine",{}))||void 0===n?void 0:n.axis)&&void 0!==t?t:0),p=r.query.getExtrema(),h=l.query.getExtrema();if(!p.meta.includesZero&&!h.meta.includesZero)return!1;return{key:Ha.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:pl.GRID_LINE},show:()=>(()=>{const e=s.meta.primarySeries.length>0,t=s.meta.secondarySeries.length>0;return m&&e&&i.query.getMin()<=0&&i.query.getMax()>=0||!m&&t&&c.query.getMin()<=0&&c.query.getMax()>=0})(),lines:{["horizontal"===a.meta.minor.orientation?"x":"y"]:[{value:0,scale:m?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY,line:{stroke:o.getStyles().grid.line.highContrast.color}}]},animations:{enabled:d.enabled,trackBy:ka.lines.trackBy,compensateForLayoutChanges:ka.lines.compensateForLayoutChanges}}}function _c({models:e}){const{layoutService:t,themeService:n,animationsModel:r}=e,{isContinuous:i,isTime:o}=t.meta;if(!i)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:pl.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:r.enabled,trackBy:ka.lines.trackBy,compensateForLayoutChanges:ka.lines.compensateForLayoutChanges}};return o?[ce(!0,{},s,{key:"time-inner-grid",x:{scale:Ha.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),ce(!0,{},s,{key:"time-outer-grid",x:{scale:Ha.SCALE.MAJOR}})]:[ce(!0,{},s,{key:"continuous-grid",x:{scale:Ha.SCALE.MAJOR},minorTicks:{show:!0}})]}function Hc({models:e}){return[Bc({models:e}),jc({models:e}),..._c({models:e})]}function Uc({models:e,environment:t,actions:n,flags:r}){const{layoutService:i,dockService:o,propertiesModel:a,appModel:s,genericObjectModel:l,selectionService:c,styleModel:u}=e,d=a.query.getProperties(),m=i.getLayoutValue("dimensionAxis");if(!m)return!1;const{show:p}=m;if("all"!==p&&"title"!==p)return!1;const{orientation:h}=o.meta.major,f=u.query.axis.title.getStyle();return{type:"data-title",key:Ha.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:pl.AXIS_TITLE.MAJOR[h.toUpperCase()]},settings:{hyperCube:i.getHyperCube(),hyperCubeDef:d&&d.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:c.getSelectionsObject(),isEnabled:r.isEnabled},style:{fontFamily:f.fontFamily,fontSize:f.fontSize,color:f.color}}}const Vc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function Yc({models:e,environment:t,actions:n,flags:r}){const{layoutService:i,dockService:o,seriesModel:a,propertiesModel:s,appModel:l,genericObjectModel:c,selectionService:u,styleModel:d}=e,m=s.query.getProperties(),p=i.getLayoutValue("measureAxes");if(!p||!p.length)return[];const h=d.query.axis.title.getStyle(),{measureAxes:f}=a.meta;return f.filter((e=>e.isPrimary?"all"===p[0].show||"title"===p[0].show:"all"===p[1].show||"title"===p[1].show)).map((e=>{const s=i.getHyperCube(),{isPrimary:d}=e,p=a.query.seriesByAxis(d).length>1,f={type:"data-title",key:d?Ha.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Ha.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:d?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:pl.AXIS_TITLE.MINOR},settings:{hyperCube:s,hyperCubeDef:m&&m.qHyperCubeDef,isDimension:!1,explicitItemInfos:Vc(a,s.qMeasureInfo,d),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:c,app:l,translator:t.translator,rtl:"rtl"===t.options.direction,selections:u.getSelectionsObject(),skipAttributeExpressions:!0,isEnabled:r.isEnabled},style:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}};return p&&(f.settings.padding="0",f.settings.minWidth="auto"),f}))}function Wc({models:e,environment:t,actions:n,flags:r}){return r.isEnabled("IM_5788_DATA_TITLE_REFACTOR")?[]:[Uc({models:e,environment:t,actions:n,flags:r}),...Yc({models:e,environment:t,actions:n,flags:r})]}function Xc({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,appModel:s,genericObjectModel:l,selectionService:c,styleModel:u}=e,d=o.getLayoutValue("dimensionAxis");if(!d)return!1;const{show:m}=d;if("all"!==m&&"title"!==m)return!1;const p=i.getAlternatives(),{orientation:h}=a.meta.major,f=u.query.axis.title.getStyle();return{type:"axis-title",key:Ha.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:a.meta.major.dock,minimumLayoutMode:pl.AXIS_TITLE.MAJOR[h.toUpperCase()]},data:{infos:o.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:s,cache:r,model:l,selections:c.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:f.color,fontFamily:f.fontFamily,fontSize:f.fontSize}}}}function Gc({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,seriesModel:s,appModel:l,genericObjectModel:c,selectionService:u,styleModel:d}=e,m=o.getLayoutValue("measureAxes");if(!m||!m.length)return[];const p=i.getAlternatives(),h=d.query.axis.title.getStyle(),{measureAxes:f}=s.meta;return f.filter((e=>e.isPrimary?"all"===m[0].show||"title"===m[0].show:"all"===m[1].show||"title"===m[1].show)).map((e=>{const i=o.getHyperCube(),{isPrimary:d}=e;return{type:"axis-title",key:d?Ha.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Ha.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:d?a.meta.minor.dock:a.meta.minorSecondary.dock,minimumLayoutMode:pl.AXIS_TITLE.MINOR},data:{infos:Vc(s,i.qMeasureInfo,d),alternatives:p.measures},resources:{app:l,cache:r,model:c,selections:u.getSelectionsObject(),translator:t.translator},callbacks:{onChange:({fromItem:e,toItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}}}}))}function Kc({models:e,environment:t,actions:n,viewCache:r,flags:i}){return i.isEnabled("IM_5788_DATA_TITLE_REFACTOR")?[Xc({models:e,environment:t,actions:n,viewCache:r}),...Gc({models:e,environment:t,actions:n,viewCache:r})]:[]}function Jc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:d}=o.meta,m="rtl"===t.options.direction;return!(c&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=xs({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,p={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>ys({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(p.settings.style="slim",p.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(p.settings.size.thumb={min:4}));const h=a.getStyles();return h.color&&(p.style={standard:{thumb:{"border-color":h.color,opacity:.4},before:{background:h.color,opacity:.1},after:{background:h.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(p.settings.injections=()=>[gs({layoutService:e,discrete:n})]),p}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>u,value:fs.OPTIONS.BAR.value},deviceType:t.deviceType})}function Zc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=dc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY;return a.key=`${Ha.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?Ha.COLLECTION.REDUCED_STACKED_PRIMARY:Ha.COLLECTION.REDUCED_STACKED_SECONDARY:i?Ha.COLLECTION.REDUCED_PRIMARY:Ha.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?Ha.SCALE.MINOR.REDUCED_PRIMARY:Ha.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Ha.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function Qc({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(Ua.TYPE.LINE).map((r=>{const i=$l({models:t,environment:e,series:r});return i.key=wl(Ha.COMPONENT.MINI_CHART.LINE,r),i.data.collection=Ha.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=r.isPrimary?Ha.SCALE.MINOR.REDUCED_PRIMARY:Ha.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=Ha.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function eu({models:e,environment:t}){return e.seriesModel.query.series(Ua.TYPE.MARKER).map((n=>{const r=ql({models:e,environment:t,series:n});return r.key=wl(Ha.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=Ha.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?Ha.SCALE.MINOR.REDUCED_PRIMARY:Ha.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=Ha.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function tu({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return Qs(t)?[Zc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Zc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...Qc({environment:i,models:t}),...eu({models:t,environment:i})]:[]}function nu({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=pl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:Ha.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Ha.SCALE.MAJOR_INNER,layout:{dock:`@${Ha.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:Ha.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Ha.SCALE.MAJOR,layout:{dock:`@${Ha.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Ha.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Ha.SCALE.MAJOR,layout:{dock:`@${Ha.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function ru({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c,animationsModel:u}=t,d=l.qLocaleInfo,{options:m,theme:p}=n,h="rtl"===m.direction,f=c.query.series(Ua.TYPE.BAR).filter((e=>e.isPrimary)),g=c.query.series(Ua.TYPE.BAR).filter((e=>!e.isPrimary)),y=c.query.series(Ua.TYPE.LINE),v=c.query.series(Ua.TYPE.MARKER),b=c.query.all(),x=b.some((e=>e.isPrimary)),S=b.some((e=>!e.isPrimary)),E=x&&S,M={resolveUIColor:o.getPaletteColor},C=u.enabled,T=x?Ba({refLineModel:r,layoutService:i,colorModel:M,dock:E?a.meta.minor.dock:a.meta.minor.opposite,scale:Ha.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Ha.FORMATTER.PRIMARY,theme:p,localeInfo:d,rtl:h,key:Ha.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],O=S?Ba({refLineModel:r,layoutService:i,colorModel:M,dock:E?a.meta.minor.opposite:a.meta.minor.dock,scale:Ha.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Ha.FORMATTER.SECONDARY,theme:p,localeInfo:d,rtl:h,key:Ha.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!x&&za({refLineModel:r,layoutService:i,colorModel:M,dockService:a,chart:e,scale:Ha.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Ha.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:pl.REFERENCE_LINE,animationsEnabled:C}),!!S&&za({refLineModel:r,layoutService:i,colorModel:M,dockService:a,chart:e,scale:Ha.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Ha.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:pl.REFERENCE_LINE,animationsEnabled:C}),za({isDimension:!0,refLineModel:r,layoutService:i,colorModel:M,dockService:a,chart:e,scale:Ha.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:Ha.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${Ha.COMPONENT.BAR}-${Ua.AXIS.PRIMARY}`:g.length?`${Ha.COMPONENT.BAR}-${Ua.AXIS.SECONDARY}`:y.length?`${Ha.COMPONENT.LINE}-${y[0].id}`:v.length?`${Ha.COMPONENT.MARKER}-${v[0].id}`:`${Ha.COMPONENT.BAR}-${Ua.AXIS.PRIMARY}`,minimumLayoutMode:pl.REFERENCE_LINE,animationsEnabled:C}),...T,...O,...Ba({isDimension:!0,refLineModel:r,layoutService:i,colorModel:M,dock:a.meta.major.opposite,scale:Ha.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:d,rtl:h,key:Ha.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function iu({layoutService:e}){return!!Qs({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Ha.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function ou(e){return(null==e?void 0:e.type)||Ua.TYPE.BAR}function au({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u}=n.meta;if(!s)return!1;const{options:d}=t,m=n.getLayoutValue("color",{}),p=e=>e.filter((e=>ou(e)===Ua.TYPE.LINE)).map((e=>({key:wl(Ha.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),h=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex,f=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:Ha.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:p(o.meta.primarySeries),secondary:p(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!f[e]&&h,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function su({models:{fieldModel:e}}){return{[Ha.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Ha.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var lu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:cu}=lu;function uu({layoutService:e,largeDataService:t}){const{maxNumPoints:n=cu}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:du}=lu,mu=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=du}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!uu({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:pu}=lu,{MAX_NUM_POINTS:hu,DEFAULT_NUM_POINTS:fu,DEFAULT_NUM_LINES:gu}=lu,{DEFAULT_NUM_POINTS:yu}=lu,vu=({layoutService:e,largeDataService:t})=>{if(!uu({layoutService:e,largeDataService:t})){const{maxNumPoints:e=yu}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:i=gu,maxNumPoints:o=fu,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(mu({layoutService:e,largeDataService:t})*r[0]<=o)return r[0];const s=Math.max(1,Math.min(i,r[1])),l=o/s,c=Math.floor(r[0]<=l?l:l/4),u=2*s*(s+1);return a&&(s>gu||o>fu)?Math.min(c,Math.ceil(hu/u)):c})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=pu}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function bu({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>uu({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>vu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>mu({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:vu({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:mu({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function xu(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Su({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function Eu(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function Mu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=Eu(),o=Eu();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function Cu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Tu(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=Mu(e,t,n.qMatrix),i=Cu(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const Ou=2**.5,Au=1/Ou,wu=Au**44;function Nu(e){return e.qIsOtherCell}function Ru({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Nu)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(Nu)||t++})),t}(n)}const ku={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Lu={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function Iu(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Pu(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*i,1===e.end&&(u-=d));const m={x:u+i,y:i,width:d-2*i,height:t.height-2*i},p=s(`${l[0]}…`).width,h=Math.max(0,m.width-c.width),f=Math.max(0,m.height-c.height),g=o*h,y=a*f;return{show:m.width>=Math.min(p,c.width),text:l,dx:g,dy:y,rect:m,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Iu(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:Iu(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function qu(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Iu(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Iu(i,n.minorGuideLine.strokeWidth),x2:o,y2:Iu(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Du(e){return e.filter((e=>e.show)).map((e=>ce({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var zu={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Iu(1,t.line.strokeWidth);return{show:n.line.show,x1:Iu(0,t.line.strokeWidth),y1:r,x2:Iu(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Pu(n,this),this.state.minor=qu(r,this)},render(){return[...Du([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>ce({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),...Du(this.state.major.map((e=>e.guideLine))),...Du(this.state.minor.map((e=>e.guideLine)))];var e}};function $u(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function Fu(e){return e.qTags.indexOf("$qualified")>-1}function Bu({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];$u(o,a)?(Fu(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function ju({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function _u({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+16}))),r.clamp(n),i.rangeAndWidth}}}function Hu({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function Uu({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=_u,queryFactory:s=Hu}={attributesFactory:_u,queryFactory:Hu}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function Vu({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=Uu,mapper:a=Bu,resolver:s=ju}={metaFactory:Uu,mapper:Bu,resolver:ju}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),m=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=m.resolve(t);return n.set(r,i),i}}}function Yu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Wu=Yu(0).getTime();function Xu(e){return(e.getTime()-Wu)/86400/1e3}const Gu=new Date,Ku=new Date;function Ju(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Ju((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(Gu.setTime(+t),Ku.setTime(+r),e(Gu),e(Ku),Math.floor(n(Gu,Ku))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const Zu=1e3,Qu=6e4,ed=36e5,td=864e5,nd=6048e5,rd=Ju((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*Zu)}),((e,t)=>(t-e)/Zu),(e=>e.getUTCSeconds()));rd.range;const id=Ju((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zu)}),((e,t)=>{e.setTime(+e+t*Qu)}),((e,t)=>(t-e)/Qu),(e=>e.getMinutes()));id.range;const od=Ju((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*Qu)}),((e,t)=>(t-e)/Qu),(e=>e.getUTCMinutes()));od.range;const ad=Ju((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Zu-e.getMinutes()*Qu)}),((e,t)=>{e.setTime(+e+t*ed)}),((e,t)=>(t-e)/ed),(e=>e.getHours()));ad.range;const sd=Ju((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*ed)}),((e,t)=>(t-e)/ed),(e=>e.getUTCHours()));sd.range;const ld=Ju((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qu)/td),(e=>e.getDate()-1));ld.range;const cd=Ju((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/td),(e=>e.getUTCDate()-1));cd.range;const ud=Ju((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/td),(e=>Math.floor(e/td)));function dd(e){return Ju((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qu)/nd))}ud.range;const md=dd(0),pd=dd(1),hd=dd(2),fd=dd(3),gd=dd(4),yd=dd(5),vd=dd(6);function bd(e){return Ju((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/nd))}md.range,pd.range,hd.range,fd.range,gd.range,yd.range,vd.range;const xd=bd(0),Sd=bd(1),Ed=bd(2),Md=bd(3),Cd=bd(4),Td=bd(5),Od=bd(6);xd.range,Sd.range,Ed.range,Md.range,Cd.range,Td.range,Od.range;const Ad=Ju((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));Ad.range;const wd=Ju((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));wd.range;const Nd=Ju((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));Nd.every=e=>isFinite(e=Math.floor(e))&&e>0?Ju((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,Nd.range;const Rd=Ju((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));Rd.every=e=>isFinite(e=Math.floor(e))&&e>0?Ju((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Rd.range;const kd=1,Ld=2,Id=3,Pd=4,qd=5,Dd=6;function zd({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return Rd.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=rd.count(e,t),l=od.count(e,t),c=sd.count(e,t),u=cd.count(e,t),d=xd.count(e,t),m=wd.count(e,t),p=Rd.count(e,t),h=n/r.second.width-1,f=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:p,interval:Rd.every(1),formatter:r.year.formatter,offset:e=>Rd.offset(e,-1),floor:Rd.floor};if(s<=h)v.type=kd,v.desc="second",v.count=s,v.interval=rd.every(1),v.formatter=r.second.formatter,v.offset=e=>rd.offset(e,-1),v.floor=rd.floor;else if(s/2<=h)v.type=kd,v.desc="every other second",v.count=s/2,v.interval=rd.every(2),v.formatter=r.second.formatter,v.offset=e=>rd.offset(e,-2),v.floor=rd.floor;else if(s/5<=h)v.type=kd,v.desc="every 5 second",v.count=s/5,v.interval=rd.every(5),v.formatter=r.second.formatter,v.offset=e=>rd.offset(e,-5),v.floor=rd.floor;else if(s/15<=h)v.type=kd,v.desc="every 15 second",v.count=s/15,v.interval=rd.every(15),v.formatter=r.second.formatter,v.offset=e=>rd.offset(e,-15),v.floor=rd.floor;else if(s/30<=h)v.type=kd,v.desc="every 30 second",v.count=s/30,v.interval=rd.every(30),v.formatter=r.second.formatter,v.offset=e=>rd.offset(e,-30),v.floor=rd.floor;else if(l<=f)v.type=Ld,v.desc="minute",v.count=l,v.interval=od.every(1),v.formatter=r.minute.formatter,v.offset=e=>od.offset(e,-1),v.floor=od.floor;else if(l/2<=f)v.type=Ld,v.desc="every 2 minute",v.count=l/2,v.interval=od.every(2),v.formatter=r.minute.formatter,v.offset=e=>od.offset(e,-2),v.floor=od.floor;else if(l/5<=f)v.type=Ld,v.desc="every 5 minute",v.count=l/5,v.interval=od.every(5),v.formatter=r.minute.formatter,v.offset=e=>od.offset(e,-5),v.floor=od.floor;else if(l/10<=f)v.type=Ld,v.desc="every 10 minute",v.count=l/10,v.interval=od.every(10),v.formatter=r.minute.formatter,v.offset=e=>od.offset(e,-10),v.floor=od.floor;else if(l/15<=f)v.type=Ld,v.desc="every 15 minute",v.count=l/15,v.interval=od.every(15),v.formatter=r.minute.formatter,v.offset=e=>od.offset(e,-15),v.floor=od.floor;else if(l/30<=f)v.type=Ld,v.desc="every 30 minute",v.count=l/30,v.interval=od.every(30),v.formatter=r.minute.formatter,v.offset=e=>od.offset(e,-30),v.floor=od.floor;else if(c<=f)v.type=Id,v.desc="hour",v.count=c,v.interval=sd.every(1),v.formatter=r.minute.formatter,v.offset=e=>sd.offset(e,-1),v.floor=sd.floor;else if(c/2<=f)v.type=Id,v.desc="every 2 hour",v.count=c/2,v.interval=sd.every(2),v.formatter=r.minute.formatter,v.offset=e=>sd.offset(e,-2),v.floor=sd.floor;else if(c/3<=f)v.type=Id,v.desc="every 3 hour",v.count=c/3,v.interval=sd.every(3),v.formatter=r.minute.formatter,v.offset=e=>sd.offset(e,-3),v.floor=sd.floor;else if(c/6<=f)v.type=Id,v.desc="every 6 hour",v.count=c/6,v.interval=sd.every(6),v.formatter=r.minute.formatter,v.offset=e=>sd.offset(e,-6),v.floor=sd.floor;else if(c/12<=f||i)v.type=Id,v.desc="every 12 hour",v.count=c/12,v.interval=sd.every(12),v.formatter=r.minute.formatter,v.offset=e=>sd.offset(e,-12),v.floor=sd.floor;else if(u<=g)v.type=Pd,v.desc="day",v.count=u,v.interval=cd.every(1),v.formatter=r.date.formatter,v.offset=e=>cd.offset(e,-1),v.floor=cd.floor;else if(u/2<=g)v.type=Pd,v.desc="every 2 day",v.count=u/2,v.interval=cd.every(2),v.formatter=r.date.formatter,v.offset=e=>cd.offset(e,-2),v.floor=cd.floor;else if(u/3<=g)v.type=Pd,v.desc="every 3 day",v.count=u/3,v.interval=cd.every(3),v.formatter=r.date.formatter,v.offset=e=>cd.offset(e,-3),v.floor=cd.floor;else if(d<=g)v.type=Pd,v.desc="week",v.count=d,v.interval=xd.every(1),v.formatter=r.date.formatter,v.offset=e=>xd.offset(e,-1),v.floor=cd.floor;else if(d/2<=g)v.type=Pd,v.desc="every 2 week",v.count=d/2,v.interval=xd.every(2),v.formatter=r.date.formatter,v.offset=e=>xd.offset(e,-2),v.floor=cd.floor;else if(m<=g)v.type=qd,v.desc="month",v.count=m,v.interval=wd.every(1),v.formatter=r.date.formatter,v.offset=e=>wd.offset(e,-1),v.floor=cd.floor;else if(m/3<=g)v.type=qd,v.desc="quarter",v.count=m/3,v.interval=wd.every(3),v.formatter=r.date.formatter,v.offset=e=>wd.offset(e,-3),v.floor=cd.floor;else if(m/6<=g)v.type=qd,v.desc="half year",v.count=m/6,v.interval=wd.every(6),v.formatter=r.date.formatter,v.offset=e=>wd.offset(e,-6),v.floor=cd.floor;else if(p<=y)v.type=Dd,v.desc="year",v.count=p,v.interval=Rd.every(1),v.formatter=r.year.formatter,v.offset=e=>Rd.offset(e,-1),v.floor=Rd.floor;else if(p/2<=y)v.type=Dd,v.desc="every 2 year",v.count=p/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Rd.offset(e,-2),v.floor=Rd.floor;else if(p/5<=y)v.type=Dd,v.desc="every 5 year",v.count=p/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Rd.offset(e,-5),v.floor=Rd.floor;else if(p/10<=y)v.type=Dd,v.desc="every 10 year",v.count=p/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Rd.offset(e,-10),v.floor=Rd.floor;else{const e=Math.max(1,Math.floor(p/y));v.type=Dd,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Rd.offset(t,-e),v.floor=Rd.floor}return v}(s,l,n,t.all(),r,a),i.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const m=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}}));let p=[];if(!o&&u.type<=Id){const n=t.getFormat("date"),r=e.ticks(cd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(cd.offset(r[0],-1)),p=(r.length?r:[cd.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:m,outer:p}}const $d=86400,Fd=1440,Bd={};function jd(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function _d(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=To().domain([Yu(l),Yu(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let m;m="d3"===d.type?(e,i)=>zd({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:Yu(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Bd[[t,n,r,r,o]])return Bd[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Yu(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,m=t/(i-r),p=m/1440,h=m/$d,f=366*m,g=3*m*30,y=a.second.width/h,v=a.minute.width/p,b=a.date.width/g,x=a.year.width/f;let S,E,M,C=0,T=0,O=null,A=null,w=null,N=null,R=null,k=null;const L={outer:[],inner:[]};for(y<1?(O=1,T=1/$d):y<2?(O=2,T=1/$d*2):y<5?(O=5,T=1/$d*5):y<10?(O=10,T=1/$d*10):y<30?(O=30,T=1/$d*30):v<1?(A=1,T=1/Fd):v<2?(A=2,T=1/Fd*2):v<5?(A=5,T=1/Fd*5):v<10?(A=10,T=.006944444444444445):v<30?(A=30,T=.020833333333333336):v<60?(w=1,T=1/24):v<120?(w=2,T=2/24):v<360?(w=6,T=.25):v<720?(w=12,T=.5):b<1/90?(T=1,N=1):b<2/90?(T=2,N=2):b<7/90?(T=7,N=7):b<31/90?(R=1,T=31):b<1?(R=3,T=90):x<1?(k=1,T=366):x<2?(k=2,T=732):x<5?(k=5,T=1826.25):(k=10,T=3652.5),E=Math.floor((d+n%1)/T);C<i;){M=E+1,S=k?jd("year",[l+E*k,0,1],[l+M*k,0,1],a.year.formatter):R?jd("month",[l,c+E*R,1],[l,c+M*R,1],a.date.formatter):N?jd("day",[l,c,u+E*N],[l,c,u+M*N],a.date.formatter):w?jd("hour",[l,c,u,0+E*w],[l,c,u,0+M*w],a.minute.formatter):A?jd("minute",[l,c,u,0,0+E*A],[l,c,u,0,0+M*A],a.minute.formatter):jd("second",[l,c,u,0,0,0+E*O],[l,c,u,0,0,0+M*O],a.second.formatter),C=Xu(S.start),L.inner.push(S);const e=Math.floor(C);if(!(o||k||R||N)){const t={type:"day",start:Yu(e),end:Yu(e+1),formatter:a.date.formatter,qStart:e};L.outer[L.outer.length-1]&&L.outer[L.outer.length-1].qStart===t.qStart||L.outer.push(t)}E++}return L.min=r,L.max=i,Bd[[t,n,r,r,o]]=L,L}(n,e,d.min,l,c,"T"===s.qType);const p={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>m(t,n)[a].map((t=>{let n;return n="start"===i?Xu(t.start):"end"===i?Xu(t.end):(Xu(t.start)+Xu(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:Xu(t.start),end:Xu(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return p}const Hd=/t+/i;const Ud={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function Vd(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const Yd="continuousPan";var Wd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=ku,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=bu,snapshotFetcherFactory:c=Su,cacheFetcherFactory:u=xu,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),p=c({layoutService:t,viewCache:i}),h=u({cache:d}),f=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,r;({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",(n=y,r=v,Math.max(1e-6,(r-n)*wu))),g=t.meta.isSnapshot?p:m,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=p.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Cu(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Tu(y,v,e))).then((e=>this.updateLayout(e))).catch(f)},fetch:(e,t)=>g.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Cu(e.qArea,r);return{...e,qArea:i,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Tu(e,t,n))).catch(f),fetchFromCache:(e,t)=>h.fetch(e,t).then((n=>Tu(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return ce({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return ce({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Ru(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=T(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return O(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=i?1-o:o,{min:u,max:d}=t.get("zoom"),m=Math.abs(d-u),p=m-(r>0?Au:Ou)*m,h=u+p*c,f=d-p*(1-c),g=h<a?a-h:0,y=f>s?f-s:0;t.set("zoom",{min:Math.max(h-y,a),max:Math.min(f+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:Yd,pointers:1,threshold:10,enable(r,i){return this.started===Yd||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{[`${Yd}start`](n){n.preventDefault(),this.started=Yd;const{min:i,max:o}=r.get("zoom");this[Yd]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${Yd}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[Yd],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${Yd}end`](e){e.preventDefault(),this.started=!1},[`${Yd}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Lu,timeAxis:zu},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=ce(!0,{},t[i],o)})),r}(t,Ud,n),{qAxis:i}=r,o=hr(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let c,u,d=[];const m=function(e){return Number.isNaN(+e)?NaN:o(e)};m.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=u.generate(e,n.isDayOrShorter)),d},m.invert=e=>o.invert(e),m.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),m.range=e=>Array.isArray(e)?o.range(e):o.range(),m.norm=e=>(Vd(a,m),a.instance(e)),m.normInvert=e=>(Vd(a,m),a.instance.invert(e)),m.copy=()=>e(t,n),m.clamp=(e=!0)=>(o.clamp(e),o.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const p=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&Hd.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=Yu(t[0].data.start),i=Yu(t[n-1].data.start);return cd.count(r,i)/n>=1?o.date:sd.count(r,i)/n>0?o.minute:od.count(r,i)/n>0?o.second:o.date},t}(r);return u=_d(o.copy(),r,p),c=Vu({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:r.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>p.getFormatFromTicks(d).formatter,m}}};const Xd=e=>e.meta.seriesComponentKeys[0],Gd=(e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}};function Kd({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=Wd,{layoutService:s,seriesModel:l}=t,c=Xd(l),u=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:c}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter((e=>e.key===Ha.COMPONENT.LEGEND_CATEGORICAL));Gd(t,e)}if(n.scroll.enabled()){const[e]=i.filter((e=>e.key===c));e&&(u(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const Jd="continuousPinchZoom";function Zd({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=Wd.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:d,tooltipService:m}=t,p="rtl"===n.options.direction,h=m.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...ks({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Ls({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:u,layoutService:l,dockService:c,rtl:p}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...h.gestures]},y=[Kd({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native,h.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),y.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:Xd(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0},s=Wd.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:Jd,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{[`${Jd}start`](e){a.last=e.scale,e.preventDefault()},[`${Jd}move`](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:Xd(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:p})),[g,...y]}const Qd=({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},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}}}),em="lasso",tm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:em,enable(e,n){if(this.started===em||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==em&&(i.actions.select.emit("start",em),this.chart.component(e).emit("lassoStart",t),this.started=em)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",em),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const nm=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),m=this.chart.component("tooltip"),p="mouse"!==t.pointerType&&m&&m.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(m&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,m,{nodes:n,opts:o,customTooltipModel:e})}else m.emit("show",t,{nodes:d})}else p&&m.emit("hide")}}}};const rm=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const im=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>-1!==n.indexOf(e.key))),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function om(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:m}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>`@${e}`)).join(",")},on:m?{bubbleEnd(){m()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=im(e,t,"range");return{interactions:[e.onEdited?rm(e,t):null,r].filter(Boolean),components:[n]}}const am=/axis|legend/,sm=e=>e.some((e=>am.test(e.type)));function lm({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${Ha.COMPONENT.BAR}-${Ua.AXIS.PRIMARY}`,`${Ha.COMPONENT.BAR}-${Ua.AXIS.SECONDARY}`,...n.query.series(Ua.TYPE.MARKER).map((e=>wl(Ha.COMPONENT.MARKER,e))),...n.query.series(Ua.TYPE.LINE).map((e=>wl(Ha.COMPONENT.POINT,e))),Ha.COMPONENT.AXIS.MAJOR,Ha.COMPONENT.AXIS_OVERLAY.TIME_INNER,Ha.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Ha.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Ha.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[Ha.COMPONENT.AXIS.MAJOR,Ha.COMPONENT.AXIS_OVERLAY.TIME_INNER,Ha.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Ha.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Ha.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]}},l={actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>sm(e)?0:3,debouncer:T,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[nm(e,t)],components:[]}}(s,l)}function cm({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,Ha.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[im(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Ha.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const um={components:[],interactions:[]};function dm({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&om({eventName:"minorRange",key:"minor-range-brush",targets:[Ha.COMPONENT.AXIS.MINOR.PRIMARY,`${Ha.COMPONENT.BAR}-${Ua.AXIS.PRIMARY}`,...i.query.series(Ua.TYPE.MARKER).filter((e=>e.isPrimary)).map((e=>wl(Ha.COMPONENT.MARKER,e))),...i.query.series(Ua.TYPE.LINE).filter((e=>e.isPrimary)).map((e=>wl(Ha.COMPONENT.POINT,e)))],fillTargets:[Ha.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:Ha.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||um,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&om({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Ha.COMPONENT.AXIS.MINOR.SECONDARY,`${Ha.COMPONENT.BAR}-${Ua.AXIS.SECONDARY}`,...i.query.series(Ua.TYPE.MARKER).filter((e=>!e.isPrimary)).map((e=>wl(Ha.COMPONENT.MARKER,e))),...i.query.series(Ua.TYPE.LINE).filter((e=>!e.isPrimary)).map((e=>wl(Ha.COMPONENT.POINT,e)))],fillTargets:[Ha.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:Ha.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||um,a=cm({actions:e,models:n})||um,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:i,seriesModel:o}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[Ha.COMPONENT.AXIS_OVERLAY.TIME_INNER,Ha.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Ha.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return om({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Ha.COMPONENT.BAR}-${Ua.AXIS.PRIMARY}`,`${Ha.COMPONENT.BAR}-${Ua.AXIS.SECONDARY}`,...o.query.series(Ua.TYPE.MARKER).map((e=>wl(Ha.COMPONENT.MARKER,e))),...o.query.series(Ua.TYPE.LINE).map((e=>wl(Ha.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?Ha.SCALE.MAJOR_INNER:Ha.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(Ha.FORMATTER.PRIMARY),o=t.scale(Ha.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||um,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[i]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!i)return!1;const s=`${Ha.SCALE.COLOR}Range`,{type:l,key:c}=i,u=o[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&om({eventName:"legendRange",key:"legend-range-brush",targets:[c],fillTargets:[c],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||um;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function mm({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};const o={key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=Qd(n);return{interactions:[tm(n,t)],components:[r]}}(o,{actions:e})}function pm({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:c,pluginService:u}=n,d=n.layoutService.getLayout(),{options:m}=r,p=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:d,options:m}),h=(f={logicalSize:p,minCenterRatio:0},{layoutModes:me.getLayoutModes(),center:void 0!==f.minCenterRatio?{minWidthRatio:f.minCenterRatio,minHeightRatio:f.minCenterRatio}:void 0,logicalSize:f.logicalSize?{align:.5,preserveAspectRatio:!0,...f.logicalSize}:void 0});var f;const g=function({chart:e,models:t,environment:n,flags:r,viewState:i,viewCache:o,actions:a}){const{colorService:s,layoutService:l,dockService:c,tooltipService:u,disclaimerService:d}=t,m=function({environment:e,models:t}){const{translator:n,options:r}=e,{themeService:i,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=i.getStyles();return{key:"disclaimer",type:"disclaimer",layout:{dock:a.alignment},settings:{isRTL:"rtl"===r.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return d.getHasSuppressingDisclaimer()?[m]:[...Hc({models:t}),...fl({models:t,flags:r}),...$c({chart:e,models:t,environment:n,flags:r,viewState:i,viewCache:o}),au({models:t,environment:n}),...Sl({models:t,environment:n,flags:r}),...Wc({models:t,environment:n,actions:a,flags:r}),...Kc({models:t,environment:n,actions:a,viewCache:o,flags:r}),No({viewState:i,viewCache:o,layoutService:l,dockService:c}),...nu({models:t}),...ru({chart:e,models:t,environment:n}),Jc({models:t,environment:n,viewState:i,viewCache:o}),...s.custom.legendComponents(),iu(t),...tu({chart:e,models:t,viewState:i,viewCache:o,environment:n}),...u.getComponents(),m].filter(Boolean)}({chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s}),y=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:i}=n,o=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=lm({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=dm({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=mm({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:s,chart:t,models:n,isUnsupportedFeature:l}),v=u.extendComponents([...g,...y.components]);return{collections:el({models:n}),scales:ml({picasso:e,models:n,viewState:o,viewCache:a,environment:r}),components:v,formatters:su({models:n}),interactions:Zd({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s,selectables:y}),strategy:h,palettes:c.getPalettes()}}const hm=({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})=>{const{width:d,height:m}=i(),[,p]=o((async()=>{if(!(null!=t&&t.update&&n&&r&&s))return;const{colorService:i,discreteModel:o,dockService:p,layoutService:h,refLineModel:f,animationsModel:g}=n;function y(){t.update({settings:pm({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})})}p.update({width:d,height:m}),i.custom.updateLegend(),f.update({picasso:e,chart:t,models:n,environment:r,viewState:s,viewCache:l,actions:c});const v=h.getDataPages();g.meta.isSizeChanging=!0,h.setDataPages([]),y(),h.setDataPages(v),h.meta.isContinuous||await o.command.initialize(),y()}),[d,m]);if(p)throw p},fm=[Ha.COMPONENT.AXIS_TITLE.MAJOR,Ha.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Ha.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Ha.COMPONENT.GRID_LINE,Ha.COMPONENT.ZERO_LINE],gm=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Ha.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),ym=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:Ha.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[];const vm={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function bm(e){return vm[e]||e}function xm(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=bm(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=bm(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}const Sm={d:"M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z"},Em={d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"},Mm={d:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"},Cm={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"},Tm="m 13.914 4.5 l -7.707 7.707 L 2 8 l 0.707 -0.707 l 3.5 3.5 l 7 -7 Z",Om={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"},Am={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"},wm="N",Nm="H",Rm="C",km={N:void 0,H:Sm,C:Mm},Lm=(e,t)=>{switch(e.qGrouping){case wm:return;case Nm:return{path:Sm,tooltip:"Tooltip.dimensions.drilldown",onClick:void 0};case Rm:return{path:t?Em:Mm,tooltip:"Tooltip.dimensions.cyclic",onClick:t?({onError:n})=>{t.getDimension(e.qLibraryId).then((e=>{e.stepCycle?e.stepCycle(1):n()})).catch((()=>null))}:void 0};default:return}};function Im(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=qo.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 Pm(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),c=ce(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],o||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,i&&i({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),Im(e,a,c)}))}function qm(e){return e.qGrouping===wm?e.qFallbackTitle||"":e.title||""}const Dm=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))},zm=async(e,t,n,r,i)=>{const o=await Dm(e,n),a=n.filter((e=>!o.includes(e.qDef.cId))),s=await Promise.all(a.map((async n=>{const o=await((e,t)=>{if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null))})(n,e),a=await function(e,t,n,r){if(e.qLibraryId)return r?r.qDim.qGrouping===wm&&r.qDim.qLabelExpression?Promise.resolve(r.qDim.qLabelExpression):Promise.resolve(r.qDim.title):Promise.resolve(n.get("Object.ErrorMessage.MissingDimension"));const i=e.qDef.qLabelExpression;if(i)return t.evaluate(i);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(n,e,r,o),s=(null==o?void 0:o.qDim.qGrouping)||n.qDef.qGrouping,l=km[s],c=s!==wm;return{id:n.qDef.cId,icon:l,groupItem:c,selected:!1,title:a,onSelect(e){Pm(t,e,n.qDef.cId,"qDimensions",i)}}})));return s};function $m({column:e,dir:t,dock:n,altList:r,model:i,translator:o,app:a,onChange:s,activeInfo:l,allowChangeOfAlternatives:c}){const u=l.qGrouping===wm,d=l.qGrouping===Nm;return 0===r.length&&u?null:{dir:t,dock:n,getPopoverOptions:async()=>{const t=await(async(e,t,n,r,i="/qHyperCubeDef")=>{switch(e.qGrouping){case Nm:{const n=e.qGroupFallbackTitles.slice(0,e.qGroupPos+1).map(((n,o)=>({id:`${e.cId}-${o}`,title:n,selected:e.qGroupPos===o,onSelect:()=>{t.drillUp(i,r,e.qGroupPos-o)}})));return{id:e.cId,icon:Sm,groupItem:!0,title:e.title,selected:!1,children:n}}case Rm:{const t=await(null==n?void 0:n.getDimension(e.qLibraryId)),r=null!=t&&t.setActiveField?e.qGroupFallbackTitles.map(((n,r)=>({id:`${e.cId}-${r}`,title:n,selected:e.qGroupPos===r,onSelect:()=>{t.setActiveField(r).catch((()=>null))}}))):[];return{id:e.cId,icon:Mm,groupItem:!0,title:e.title,selected:!1,children:r}}default:return{selected:!0,id:e.cId,title:qm(e)}}})(l,i,a,e),n=c?await zm(a,i,r,o,s):[];return(u||d||0===t.children.length)&&0===n.length?[]:[t,...n]}}}function Fm(e,t,n,r,i="/qHyperCubeDef"){return{breadcrumbs:e.qGrouping===Nm?e.qGroupFallbackTitles.slice(0,e.qGroupPos):[],icon:Lm(e,r),index:t,locked:!!e.qLocked,text:e.qGrouping===wm?e.qFallbackTitle:e.qGroupFallbackTitles[e.qGroupPos],popoverText:qm(e),...n&&{drillUp(e){n.drillUp(i,t,e)}},id:e.cId}}function Bm({activeInfo:e,altList:t,app:n,dir:r,dock:i,model:o,onChange:a,skipAttributeExpressions:s,translator:l,allowChangeOfAlternatives:c}){return 0===t.length?null:{dir:r,dock:i,getPopoverOptions:async()=>{const r=[{id:e.cId,title:e.qFallbackTitle,selected:!0,onSelect:()=>{}}],i=await Dm(n,t),u=t.filter((e=>!i.includes(e.qDef.cId))),d=c?await Promise.all(u.map((async e=>{const t=await 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 i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,n,l);return{id:e.qDef.cId,selected:!1,title:t,onSelect(t){Pm(o,t,e.qDef.cId,"qMeasures",a,s)}}}))):[];return 0===d.length?[]:[...r,...d]}}}function jm(e,t){return{breadcrumbs:[],index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_m.apply(null,arguments)}var Hm={exports:{}};function Um(){}function Vm(){}Vm.resetWarningCache=Um;Hm.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){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,bigint: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:Vm,resetWarningCache:Um};return n.PropTypes=n,n}();var Ym=Q(Hm.exports),Wm={black:"#000",white:"#fff"},Xm="#e57373",Gm="#f44336",Km="#d32f2f",Jm="#ff4081",Zm="#f50057",Qm="#c51162",ep="#7986cb",tp="#3f51b5",np="#303f9f",rp="#64b5f6",ip="#2196f3",op="#1976d2",ap="#81c784",sp="#4caf50",lp="#388e3c",cp="#ffb74d",up="#ff9800",dp="#f57c00",mp={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"};function pp(){return pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pp.apply(null,arguments)}function hp(e){return hp="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},hp(e)}function fp(e){return e&&"object"===hp(e)&&e.constructor===Object}function gp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?pp({},e):e;return fp(e)&&fp(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(fp(t[i])&&i in e?r[i]=gp(e[i],t[i],n):r[i]=t[i])})),r}function yp(e){var t=function(e,t){if("object"!=hp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=hp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hp(t)?t:t+""}function vp(e,t,n){return(t=yp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bp(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function xp(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 Math.min(Math.max(t,e),n)}function Sp(e){if(e.type)return e;if("#"===e.charAt(0))return Sp(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(bp(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Ep(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 Mp(e){var t="hsl"===(e=Sp(e)).type?Sp(function(e){var t=(e=Sp(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*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])),Ep({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 Cp(e,t){return e=Sp(e),t=xp(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Ep(e)}function Tp(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Op(e,t){if(null==e)return{};var n,r,i=Tp(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Ap=["xs","sm","md","lg","xl"];function wp(e,t,n){var r;return pp({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),pp({paddingLeft:t(2),paddingRight:t(2)},n,vp({},e.up("sm"),pp({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},vp(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),vp(r,e.up("sm"),{minHeight:64}),r)},n)}var Np={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:Wm.white,default:mp[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Rp={text:{primary:Wm.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:mp[800],default:"#303030"},action:{active:Wm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function kp(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Sp(e),t=xp(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 Ep(e)}(e.main,i):"dark"===t&&(e.dark=function(e,t){if(e=Sp(e),t=xp(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 Ep(e)}(e.main,o)))}function Lp(e){var t=e.primary,n=void 0===t?{light:ep,main:tp,dark:np}:t,r=e.secondary,i=void 0===r?{light:Jm,main:Zm,dark:Qm}:r,o=e.error,a=void 0===o?{light:Xm,main:Gm,dark:Km}:o,s=e.warning,l=void 0===s?{light:cp,main:up,dark:dp}:s,c=e.info,u=void 0===c?{light:rp,main:ip,dark:op}:c,d=e.success,m=void 0===d?{light:ap,main:sp,dark:lp}:d,p=e.type,h=void 0===p?"light":p,f=e.contrastThreshold,g=void 0===f?3:f,y=e.tonalOffset,v=void 0===y?.2:y,b=Op(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=Mp(e),r=Mp(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Rp.text.primary)>=g?Rp.text.primary:Np.text.primary;return t}var S=function(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;if(!(e=pp({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(bp(4,t));if("string"!=typeof e.main)throw new Error(bp(5,JSON.stringify(e.main)));return kp(e,"light",n,v),kp(e,"dark",r,v),e.contrastText||(e.contrastText=x(e.main)),e},E={dark:Rp,light:Np};return gp(pp({common:Wm,type:h,primary:S(n),secondary:S(i,"A400","A200","A700"),error:S(a),warning:S(l),info:S(u),success:S(m),grey:mp,contrastThreshold:g,getContrastText:x,augmentColor:S,tonalOffset:v},E[h]),b)}function Ip(e){return Math.round(1e5*e)/1e5}function Pp(e){return Ip(e)}var qp={textTransform:"uppercase"},Dp='"Roboto", "Helvetica", "Arial", sans-serif';function zp(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?Dp:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,l=void 0===s?300:s,c=n.fontWeightRegular,u=void 0===c?400:c,d=n.fontWeightMedium,m=void 0===d?500:d,p=n.fontWeightBold,h=void 0===p?700:p,f=n.htmlFontSize,g=void 0===f?16:f,y=n.allVariants,v=n.pxToRem,b=Op(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,S=v||function(e){return"".concat(e/g*x,"rem")},E=function(e,t,n,r,o){return pp({fontFamily:i,fontWeight:e,fontSize:S(t),lineHeight:n},i===Dp?{letterSpacing:"".concat(Ip(r/t),"em")}:{},o,y)},M={h1:E(l,96,1.167,-1.5),h2:E(l,60,1.2,-.5),h3:E(u,48,1.167,0),h4:E(u,34,1.235,.25),h5:E(u,24,1.334,0),h6:E(m,20,1.6,.15),subtitle1:E(u,16,1.75,.15),subtitle2:E(m,14,1.57,.1),body1:E(u,16,1.5,.15),body2:E(u,14,1.43,.15),button:E(m,14,1.75,.4,qp),caption:E(u,12,1.66,.4),overline:E(u,12,2.66,1,qp)};return gp(pp({htmlFontSize:g,pxToRem:S,round:Pp,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:m,fontWeightBold:h},M),b,{clone:!1})}function $p(){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 Fp=["none",$p(0,2,1,-1,0,1,1,0,0,1,3,0),$p(0,3,1,-2,0,2,2,0,0,1,5,0),$p(0,3,3,-2,0,3,4,0,0,1,8,0),$p(0,2,4,-1,0,4,5,0,0,1,10,0),$p(0,3,5,-1,0,5,8,0,0,1,14,0),$p(0,3,5,-1,0,6,10,0,0,1,18,0),$p(0,4,5,-2,0,7,10,1,0,2,16,1),$p(0,5,5,-3,0,8,10,1,0,3,14,2),$p(0,5,6,-3,0,9,12,1,0,3,16,2),$p(0,6,6,-3,0,10,14,1,0,4,18,3),$p(0,6,7,-4,0,11,15,1,0,4,20,3),$p(0,7,8,-4,0,12,17,2,0,5,22,4),$p(0,7,8,-4,0,13,19,2,0,5,24,4),$p(0,7,9,-4,0,14,21,2,0,5,26,4),$p(0,8,9,-5,0,15,22,2,0,6,28,5),$p(0,8,10,-5,0,16,24,2,0,6,30,5),$p(0,8,11,-5,0,17,26,2,0,6,32,5),$p(0,9,11,-5,0,18,28,2,0,7,34,6),$p(0,9,12,-6,0,19,29,2,0,7,36,6),$p(0,10,13,-6,0,20,31,3,0,8,38,7),$p(0,10,13,-6,0,21,33,3,0,8,40,7),$p(0,10,14,-6,0,22,35,3,0,8,42,7),$p(0,11,14,-7,0,23,36,3,0,9,44,8),$p(0,11,15,-7,0,24,38,3,0,9,46,8)],Bp={borderRadius:4};function jp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _p(e,t){if(e){if("string"==typeof e)return jp(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jp(e,t):void 0}}function Hp(e){return function(e){if(Array.isArray(e))return jp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_p(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 Up(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||_p(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 Vp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var Yp={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)"},Wp={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Xp(e){return"".concat(Math.round(e),"ms")}var Gp={easing:Yp,duration:Wp,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?Wp.standard:n,i=t.easing,o=void 0===i?Yp.easeInOut:i,a=t.delay,s=void 0===a?0:a;return Op(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Xp(r)," ").concat(o," ").concat("string"==typeof s?s:Xp(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))}},Kp={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Jp(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.spacing,l=e.typography,c=void 0===l?{}:l,u=Op(e,["breakpoints","mixins","palette","spacing","typography"]),d=Lp(a),m=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=Op(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function c(e,t){var r=Ap.indexOf(t);return r===Ap.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[Ap[r+1]]?n[Ap[r+1]]:t)-a/100).concat(i,")")}return pp({keys:Ap,values:n,up:l,down:function(e){var t=Ap.indexOf(e)+1,r=n[Ap[t]];return t===Ap.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:c,only:function(e){return c(e,e)},width:function(e){return n[e]}},s)}(n),p=Vp(s),h=gp({breakpoints:m,direction:"ltr",mixins:wp(m,p,i),overrides:{},palette:d,props:{},shadows:Fp,typography:zp(d,c),spacing:p,shape:Bp,transitions:Gp,zIndex:Kp},u),f=arguments.length,g=new Array(f>1?f-1:0),y=1;y<f;y++)g[y-1]=arguments[y];return h=g.reduce((function(e,t){return gp(e,t)}),h)}var Zp="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Qp=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function eh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,c=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Qp.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Zp]&&""===a?"".concat(o,"-").concat(c()):o}return"".concat(s).concat(i).concat(c())}}function th(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var nh="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},rh="object"===("undefined"==typeof window?"undefined":nh(window))&&"object"===("undefined"==typeof document?"undefined":nh(document))&&9===document.nodeType;function ih(e,t,n){return t&&function(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,yp(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oh(e,t){return oh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oh(e,t)}function ah(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oh(e,t)}function sh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var lh={}.constructor;function ch(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(ch);if(e.constructor!==lh)return e;var t={};for(var n in e)t[n]=ch(e[n]);return t}function uh(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=ch(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var dh=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},mh=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=dh(e[n]," ");else t=dh(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function ph(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function hh(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function fh(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=ph(n),l=s.linebreak,c=s.space;if(e&&o++,a)if(Array.isArray(a))for(var u=0;u<a.length;u++){var d=a[u];for(var m in d){var p=d[m];null!=p&&(r&&(r+=l),r+=hh(m+":"+c+mh(p)+";",o))}}else for(var h in a){var f=a[h];null!=f&&(r&&(r+=l),r+=hh(h+":"+c+mh(f)+";",o))}for(var g in t){var y=t[g];null!=y&&"fallbacks"!==g&&(r&&(r+=l),r+=hh(g+":"+c+mh(y)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),hh(""+e+c+"{"+r,--o)+hh("}",o)):r}var gh=/([[\].#*$><+~=|^:(),"'`\s])/g,yh="undefined"!=typeof CSS&&CSS.escape,vh=function(e){return yh?yh(e):e.replace(gh,"\\$1")},bh=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),xh=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(sh(sh(i)),s),i.selectorText="."+vh(i.id)),i}ah(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=mh(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?pp({},e,{allowEmpty:!0}):e;return fh(this.selectorText,this.style,n)},ih(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(bh),Sh={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new xh(e,t,n)}},Eh={indent:1,children:!0},Mh=/@([\w-]+)/,Ch=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(Mh);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Xh(pp({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=Eh);var t=ph(e).linebreak;if(null==e.indent&&(e.indent=Eh.indent),null==e.children&&(e.children=Eh.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),Th=/@container|@media|@supports\s+/,Oh={onCreateRule:function(e,t,n){return Th.test(e)?new Ch(e,t,n):null}},Ah={indent:1,children:!0},wh=/@keyframes\s+([\w-]+)/,Nh=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(wh);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:vh(a(this,o)),this.rules=new Xh(pp({},n,{parent:this})),t)this.rules.add(s,t[s],pp({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=Ah);var t=ph(e).linebreak;if(null==e.indent&&(e.indent=Ah.indent),null==e.children&&(e.children=Ah.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),Rh=/@keyframes\s+/,kh=/\$([\w-]+)/g,Lh=function(e,t){return"string"==typeof e?e.replace(kh,(function(e,n){return n in t?t[n]:e})):e},Ih=function(e,t,n){var r=e[t],i=Lh(r,n);i!==r&&(e[t]=i)},Ph={onCreateRule:function(e,t,n){return"string"==typeof e&&Rh.test(e)?new Nh(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&Ih(e,"animation-name",n.keyframes),"animation"in e&&Ih(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return Lh(e,r.keyframes);default:return e}}},qh=function(e){function t(){return e.apply(this,arguments)||this}return ah(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?pp({},e,{allowEmpty:!0}):e;return fh(this.key,this.style,n)},t}(bh),Dh={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new qh(e,t,n):null}},zh=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=ph(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=fh(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return fh(this.at,this.style,e)},e}(),$h=/@font-face/,Fh={onCreateRule:function(e,t,n){return $h.test(e)?new zh(e,t,n):null}},Bh=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return fh(this.key,this.style,e)},e}(),jh={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Bh(e,t,n):null}},_h=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Hh={"@charset":!0,"@import":!0,"@namespace":!0},Uh={onCreateRule:function(e,t,n){return e in Hh?new _h(e,t,n):null}},Vh=[Sh,Oh,Ph,Dh,Fh,jh,Uh],Yh={process:!0},Wh={force:!0,process:!0},Xh=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,c=r.scoped,u=pp({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:c,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(u.selector="."+vh(this.classes[d]));var m=uh(d,t,u);if(!m)return null;this.register(m);var p=void 0===u.index?this.index.length:u.index;return this.index.splice(p,0,m),m},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=pp({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof xh?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof Nh&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof xh?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof Nh&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Yh);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var c=t.style[l];c!==s[l]&&t.prop(l,c,Wh)}for(var u in s){var d=t.style[u],m=s[u];null==d&&d!==m&&t.prop(u,null,Wh)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=ph(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),Gh=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=pp({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Xh(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Kh=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Jh=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Tp(t,["attached"]),i=ph(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},ih(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Zh=new Jh,Qh="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),ef="2f1acc6c3a606b082e5eef5e54414ffb";null==Qh[ef]&&(Qh[ef]=0);var tf=Qh[ef]++,nf=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+tf+i+t:o+n.key+"-"+tf+(i?"-"+i:"")+"-"+t}},rf=function(e){var t;return function(){return t||(t=e()),t}},of=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},af=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=mh(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},sf=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},lf=function(e,t){return e.selectorText=t,e.selectorText===t},cf=rf((function(){return document.querySelector("head")}));function uf(e){var t=Zh.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=cf(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var df=rf((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),mf=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},pf=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},hf=function(){function e(e){this.getPropertyValue=of,this.setProperty=af,this.removeProperty=sf,this.setSelector=lf,this.hasInsertedRules=!1,this.cssRules=[],e&&Zh.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=df();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=uf(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else cf().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=pf(n,t);if(!1===(i=mf(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=pf(n,t),l=mf(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Gh&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),ff=0,gf=function(){function e(e){this.id=ff++,this.version="10.10.0",this.plugins=new Kh,this.options={id:{minify:!1},createGenerateId:nf,Renderer:rh?hf:null,plugins:[]},this.generateId=nf({minify:!1});for(var t=0;t<Vh.length;t++)this.plugins.use(Vh[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=pp({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Zh.index?0:Zh.index+1);var r=new Gh(e,pp({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Zh.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=pp({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=uh(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),yf=function(e){return new gf(e)},vf="object"==typeof CSS&&null!=CSS&&"number"in CSS;function bf(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=bf(r);o&&(t||(t={}),t[n]=o)}}return t}
7
+ System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-chart-modules/react","qlik-object-conversion"],(function(e){"use strict";var t,n,r,i,o,a,s,l,u,c,d,m,p,h,f,g,v,y,b,x,S,E,M,C,O,A,T,N,w,k,R,L,I,P,q,D,z,$,F,j,B,_,V,H,U,Y,W,X,G,K,J,Z,Q;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useModel,s=e.useStaleLayout,l=e.useApp,u=e.useAppLayout,c=e.usePlugins,d=e.useEmbed,m=e.useOptions,p=e.useTranslator,h=e.useTheme,f=e.useDeviceType,g=e.useConstraints,v=e.useLayout,y=e.useAction,b=e.useSelections,x=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.setValue,C=e.createColor,O=e.cache,A=e.debouncer,T=e.throttler,N=e.pointLabelComponent,w=e.colorService,k=e.disclaimerService,R=e.tooltipService,L=e.layoutService,I=e.alternativeService,P=e.dockService,q=e.themeService,D=e.pluginService,z=e.storage,$=e.selectionService,F=e.fontResolver},function(e){j=e.default},function(e){B=e.default},function(e){_=e.default},function(e){V=e.default,H=e,U=e.isValidElement,Y=e.cloneElement,W=e.Children},function(e){X=e,G=e.default},function(e){K=e.reactRenderer,J=e.axisTitleComponent,Z=e.disclaimerComponent},function(e){Q=e.default}],execute:function(){e("default",(function(e){var i;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(ee).forEach((t=>{e.add(ee[t])}))}}(e.translator);const{flags:a}=e,s=null===(i=e.anything)||void 0===i||null===(i=i.sense)||void 0===i?void 0:i.isUnsupportedFeature,l=Fx();return{qae:_C(e),ext:vO(e),component(){const e=function(){const[e,t]=n();return r((()=>t(O())),[]),e}(),i=function(){const[e,t]=n();return r((()=>{t(z({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),u=function(){const e=m(),t=p(),i=d(),o=h(),[a,s]=n(),l=f();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:i,deviceType:l})}),[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),c=function(){const e=g(),[t,i]=n(!1),[o,a]=n(!1),[s,l]=n(!1),u=function(){const e=g(),[t,i]=n(!1),[o,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&i(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=o[e])||void 0===n?void 0:n.indexOf(t);r>-1&&o[e].splice(r,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),c=function(){var e;const t=g(),[i,o]=n(!1),[a,s]=n(!1),l=v(),u=p(),c=!!l.qSelectionInfo.qInSelections,d=!(null===(e=l.qHyperCube)||void 0===e||null===(e=e.qDimensionInfo)||void 0===e||null===(e=e[0])||void 0===e||!e.qIsOneAndOnlyOne);r((()=>{t&&o(!t.select&&!t.active)}),[t]);const m=e=>{s("boolean"==typeof e?e:!a)};return y((()=>({key:"lasso",label:u.get(a?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:LC,hidden:!i||!c||d,active:a,action:m})),[c,d,a,i,u.language()]),{action:m,enabled:()=>i,active:()=>a}}();let d=IC;r((()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=n({});return m.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||IC}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=c,m.select=u,m}(),b=function({picasso:e,environment:i}){const o=t(),[a,s]=n();return r((()=>{if(!i)return;o.style.overflow="hidden";const t=e({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[i]),a}({picasso:l,environment:u}),x=DC({chart:b,actions:c}),S=RC({picasso:l,chart:b,environment:u,flags:a,viewState:i,viewCache:e,actions:c,selectionService:x});!function({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:u,onZoomChange:c}}=gm,[,d]=o((async()=>{if(!(null!=t&&t.update&&n&&r&&a&&s))return;const{layoutService:o,colorService:d,continuousModel:m,discreteModel:p,refLineModel:h,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:v}=f.meta,{options:y}=r,{viewState:b={}}=y,{legendScrollOffset:x,scrollOffset:S}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):b;a.preventSet("scrollOffset",S),a.preventSet("legendScrollOffset",x),a.preventSet("title",o.getLayoutValue("title"));const E=()=>{h&&h.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...Fm,...v]}),g.meta.isPartialUpdating=!1};function M(o=!1){const u=zm({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}),c=o&&[jm({models:n}),...Bm({models:n}),...d.getData()];o?(t.layoutComponents({settings:u,data:c}),g.meta.hasSlicedHats=u.components.filter((e=>"box-sliced-hat"===e.type)).length>0):t.update({settings:u,data:c})}a.onChanged("scrollOffset",E),o.meta.isContinuous&&(a.onChanged("zoom",c({layoutService:o,continuousDataModel:m},E)),a.intercept("zoom",u({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),M(!0),o.setDataPages(C),o.meta.isContinuous||await p.command.initialize(),M(!1),Da.cacheProperties({viewCache:s,layout:o.getLayout()})}),[null==t?void 0:t.update,n,r]);if(d)throw d}({picasso:l,chart:b,models:S,environment:u,flags:a,viewState:i,viewCache:e,actions:c}),$m({picasso:l,chart:b,models:S,environment:u,flags:a,viewState:i,viewCache:e,actions:c,isUnsupportedFeature:s}),VC({models:S,chart:b,viewState:i})}}}));var ee={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"en-US":"The chart is not displayed because it contains only negative values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。","zh-CN":"未显示图表,因为它仅包含负值。","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения."}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"en-US":"The data set contains negative values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值。","zh-CN":"数据集包含无法在此图表中显示的负值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne=Object.prototype.hasOwnProperty,re=Object.prototype.toString,ie=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,ae=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===re.call(e)},se=function(e){if(!e||"[object Object]"!==re.call(e))return!1;var t,n=ne.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ne.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ne.call(e,t)},le=function(e,t){ie&&"__proto__"===t.name?ie(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ue=function(e,t){if("__proto__"===t){if(!ne.call(e,t))return;if(oe)return oe(e,t).value}return e[t]},ce=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=ue(s,n),s!==(i=ue(t,n))&&(c&&i&&(se(i)||(o=ae(i)))?(o?(o=!1,a=r&&ae(r)?r:[]):a=r&&se(r)?r:{},le(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&le(s,{name:n,newValue:i}));return s},de=te(ce);const me=[["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}]],pe={};me.forEach((([e,{width:t,height:n}])=>{pe[e]={width:t,height:n}}));const he={getLayoutModes:()=>pe,getLayoutMode(e,t){let n;for(n=0;n<me.length;++n)if(e>=me[n][1].width&&t>=me[n][1].height)return me[n][0];return"SPARK"}};const fe=["$date","$timestamp","$time"],ge=["D","TS","T"],ve={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>fe.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&ge.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(ve.hasTimeTag(t)&&ve.hasUnknownFormat(t)||ve.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&ve.isTimeDimension(e,t.qHyperCube.qDimensionInfo.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}))[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n;const r=null==e||null===(t=e.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0)<1)&&ve.canBeContinuousDimension(r[0])},maxNumberOfLines:12},ye=/^[A-Z][A-z0-9_]*$/i,be={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}},xe={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||ye.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},generateId:()=>be.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},Se=e=>xe.getValue(e,"qHyperCube.qDimensionInfo",[]),Ee=e=>xe.getValue(e,"qHyperCube.qMeasureInfo",[]),Me=e=>xe.getValue(e,"barGrouping.grouping"),Ce={continuous:(e,t=!1)=>!!ve.canBeContinuous(e)&&(xe.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!Se(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===Me(e)&&(Se(e).length>1||Ee(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&Se(e).length>1&&1===Ee(e).length},groupedByMeasure(e){return this.grouped(e)&&1===Se(e).length&&Ee(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==Me(e)&&"butterfly"!==Me(e)||this.continuous(e))&&(Se(e).length>1||Ee(e).length>1)},stackedByDimension(e){return this.stacked(e)&&Se(e).length>1&&1===Ee(e).length},stackedByMeasure(e){return this.stacked(e)&&1===Se(e).length&&Ee(e).length>1},simple:e=>0===Se(e).length||1===Se(e).length&&1===Ee(e).length,snapshot:e=>!!xe.getValue(e,"snapshotData")};function Oe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Ae=e=>{throw e.isHandled=!0,e};const Te={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?Te.getVerticalDock(t):n?Te.getOppositeDock(Te.getHorizontalDock(t)):Te.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},Ne=166/26,we=12/11,ke={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*Ne)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach((e=>{i=ke.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk})):e.forEach((e=>{i=ke.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk}));const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=ke.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(ke.stringWidthOverMWidth(o)+a*we)}},Re=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Le=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Pe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Re.test(e),isRtlChar:e=>Le.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],Pe.isLtrChar(r))return"ltr";if(Pe.isRtlChar(r))return"rtl"}return"ltr"}},qe={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,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("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=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?qe.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=Pe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getDescriptionRow(e,t){const n=Pe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},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:Pe.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=Pe.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Pe.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,qe.getColorSymbol(e,t)]:[qe.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Pe.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Pe.detectTextDirection(e.value);let l;return l=i?r?[e.value,qe.getColorSymbol(t,n)]:[qe.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function De(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ze(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $e(){}var Fe=.7,je=1/Fe,Be="\\s*([+-]?\\d+)\\s*",_e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",He=/^#([0-9a-f]{3,8})$/,Ue=new RegExp(`^rgb\\(${Be},${Be},${Be}\\)$`),Ye=new RegExp(`^rgb\\(${Ve},${Ve},${Ve}\\)$`),We=new RegExp(`^rgba\\(${Be},${Be},${Be},${_e}\\)$`),Xe=new RegExp(`^rgba\\(${Ve},${Ve},${Ve},${_e}\\)$`),Ge=new RegExp(`^hsl\\(${_e},${Ve},${Ve}\\)$`),Ke=new RegExp(`^hsla\\(${_e},${Ve},${Ve},${_e}\\)$`),Je={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 Ze(){return this.rgb().formatHex()}function Qe(){return this.rgb().formatRgb()}function et(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=He.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?tt(t):3===n?new ot(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?nt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?nt(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=Ue.exec(e))?new ot(t[1],t[2],t[3],1):(t=Ye.exec(e))?new ot(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=We.exec(e))?nt(t[1],t[2],t[3],t[4]):(t=Xe.exec(e))?nt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ge.exec(e))?dt(t[1],t[2]/100,t[3]/100,1):(t=Ke.exec(e))?dt(t[1],t[2]/100,t[3]/100,t[4]):Je.hasOwnProperty(e)?tt(Je[e]):"transparent"===e?new ot(NaN,NaN,NaN,0):null}function tt(e){return new ot(e>>16&255,e>>8&255,255&e,1)}function nt(e,t,n,r){return r<=0&&(e=t=n=NaN),new ot(e,t,n,r)}function rt(e){return e instanceof $e||(e=et(e)),e?new ot((e=e.rgb()).r,e.g,e.b,e.opacity):new ot}function it(e,t,n,r){return 1===arguments.length?rt(e):new ot(e,t,n,null==r?1:r)}function ot(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function at(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}`}function st(){const e=lt(this.opacity);return`${1===e?"rgb(":"rgba("}${ut(this.r)}, ${ut(this.g)}, ${ut(this.b)}${1===e?")":`, ${e})`}`}function lt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ut(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ct(e){return((e=ut(e))<16?"0":"")+e.toString(16)}function dt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pt(e,t,n,r)}function mt(e){if(e instanceof pt)return new pt(e.h,e.s,e.l,e.opacity);if(e instanceof $e||(e=et(e)),!e)return new pt;if(e instanceof pt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new pt(a,s,l,e.opacity)}function pt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ht(e){return(e=(e||0)%360)<0?e+360:e}function ft(e){return Math.max(0,Math.min(1,e||0))}function gt(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($e,et,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ze,formatHex:Ze,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mt(this).formatHsl()},formatRgb:Qe,toString:Qe}),De(ot,it,ze($e,{brighter(e){return e=null==e?je:Math.pow(je,e),new ot(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Fe:Math.pow(Fe,e),new ot(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ot(ut(this.r),ut(this.g),ut(this.b),lt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:at,formatHex:at,formatHex8:function(){return`#${ct(this.r)}${ct(this.g)}${ct(this.b)}${ct(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:st,toString:st})),De(pt,(function(e,t,n,r){return 1===arguments.length?mt(e):new pt(e,t,n,null==r?1:r)}),ze($e,{brighter(e){return e=null==e?je:Math.pow(je,e),new pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Fe:Math.pow(Fe,e),new pt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ot(gt(e>=240?e-240:e+120,i,r),gt(e,i,r),gt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pt(ht(this.h),ft(this.s),ft(this.l),lt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=lt(this.opacity);return`${1===e?"hsl(":"hsla("}${ht(this.h)}, ${100*ft(this.s)}%, ${100*ft(this.l)}%${1===e?")":`, ${e})`}`}}));const vt=Math.PI/180,yt=180/Math.PI,bt=.96422,xt=.82521,St=4/29,Et=6/29,Mt=3*Et*Et,Ct=Et*Et*Et;function Ot(e){if(e instanceof At)return new At(e.l,e.a,e.b,e.opacity);if(e instanceof Lt)return It(e);e instanceof ot||(e=rt(e));var t,n,r=kt(e.r),i=kt(e.g),o=kt(e.b),a=Tt((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Tt((.4360747*r+.3850649*i+.1430804*o)/bt),n=Tt((.0139322*r+.0971045*i+.7141733*o)/xt)),new At(116*a-16,500*(t-a),200*(a-n),e.opacity)}function At(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Tt(e){return e>Ct?Math.pow(e,1/3):e/Mt+St}function Nt(e){return e>Et?e*e*e:Mt*(e-St)}function wt(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 Rt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Lt)return new Lt(e.h,e.c,e.l,e.opacity);if(e instanceof At||(e=Ot(e)),0===e.a&&0===e.b)return new Lt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*yt;return new Lt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Lt(e,t,n,null==r?1:r)}function Lt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function It(e){if(isNaN(e.h))return new At(e.l,0,0,e.opacity);var t=e.h*vt;return new At(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}De(At,(function(e,t,n,r){return 1===arguments.length?Ot(e):new At(e,t,n,null==r?1:r)}),ze($e,{brighter(e){return new At(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new At(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new ot(wt(3.1338561*(t=bt*Nt(t))-1.6168667*(e=1*Nt(e))-.4906146*(n=xt*Nt(n))),wt(-.9787684*t+1.9161415*e+.033454*n),wt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),De(Lt,Rt,ze($e,{brighter(e){return new Lt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Lt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return It(this).rgb()}}));var Pt={isDark:function(e){return Rt(e).l<70}};function qt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function Dt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function zt(e){return 1===e.length&&(e=function(e){return function(t,n){return Dt(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var $t=zt(Dt).right,Ft=Math.sqrt(50),jt=Math.sqrt(10),Bt=Math.sqrt(2);function _t(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=Ft?10:o>=jt?5:o>=Bt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Ft?10:o>=jt?5:o>=Bt?2:1)}function Vt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Ft?i*=10:o>=jt?i*=5:o>=Bt&&(i*=2),t<e?-i:i}function Ht(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Ut="$";function Yt(){}function Wt(e,t){var n=new Yt;if(e instanceof Yt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Xt(){}Yt.prototype=Wt.prototype={constructor:Yt,has:function(e){return Ut+e in this},get:function(e){return this[Ut+e]},set:function(e,t){return this[Ut+e]=t,this},remove:function(e){var t=Ut+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ut&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ut&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ut&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ut&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ut&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ut)return!1;return!0},each:function(e){for(var t in this)t[0]===Ut&&e(this[t],t.slice(1),this)}};var Gt=Wt.prototype;Xt.prototype={constructor:Xt,has:Gt.has,add:function(e){return this[Ut+(e+="")]=e,this},remove:Gt.remove,clear:Gt.clear,values:Gt.keys,size:Gt.size,empty:Gt.empty,each:Gt.each};var Kt=Array.prototype,Jt=Kt.map,Zt=Kt.slice;function Qt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function en(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function tn(){}var nn=.7,rn=1/nn,on="\\s*([+-]?\\d+)\\s*",an="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",sn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ln=/^#([0-9a-f]{3,8})$/,un=new RegExp("^rgb\\("+[on,on,on]+"\\)$"),cn=new RegExp("^rgb\\("+[sn,sn,sn]+"\\)$"),dn=new RegExp("^rgba\\("+[on,on,on,an]+"\\)$"),mn=new RegExp("^rgba\\("+[sn,sn,sn,an]+"\\)$"),pn=new RegExp("^hsl\\("+[an,sn,sn]+"\\)$"),hn=new RegExp("^hsla\\("+[an,sn,sn,an]+"\\)$"),fn={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 gn(){return this.rgb().formatHex()}function vn(){return this.rgb().formatRgb()}function yn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ln.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?bn(t):3===n?new En(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?xn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?xn(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=un.exec(e))?new En(t[1],t[2],t[3],1):(t=cn.exec(e))?new En(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=dn.exec(e))?xn(t[1],t[2],t[3],t[4]):(t=mn.exec(e))?xn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=pn.exec(e))?An(t[1],t[2]/100,t[3]/100,1):(t=hn.exec(e))?An(t[1],t[2]/100,t[3]/100,t[4]):fn.hasOwnProperty(e)?bn(fn[e]):"transparent"===e?new En(NaN,NaN,NaN,0):null}function bn(e){return new En(e>>16&255,e>>8&255,255&e,1)}function xn(e,t,n,r){return r<=0&&(e=t=n=NaN),new En(e,t,n,r)}function Sn(e,t,n,r){return 1===arguments.length?((i=e)instanceof tn||(i=yn(i)),i?new En((i=i.rgb()).r,i.g,i.b,i.opacity):new En):new En(e,t,n,null==r?1:r);var i}function En(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Mn(){return"#"+On(this.r)+On(this.g)+On(this.b)}function Cn(){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 On(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function An(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Nn(e,t,n,r)}function Tn(e){if(e instanceof Nn)return new Nn(e.h,e.s,e.l,e.opacity);if(e instanceof tn||(e=yn(e)),!e)return new Nn;if(e instanceof Nn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Nn(a,s,l,e.opacity)}function Nn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function wn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function kn(e){return function(){return e}}function Rn(e){return 1==(e=+e)?Ln: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):kn(isNaN(t)?n:t)}}function Ln(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):kn(isNaN(e)?t:e)}Qt(tn,yn,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:gn,formatHex:gn,formatHsl:function(){return Tn(this).formatHsl()},formatRgb:vn,toString:vn}),Qt(En,Sn,en(tn,{brighter:function(e){return e=null==e?rn:Math.pow(rn,e),new En(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?nn:Math.pow(nn,e),new En(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:Mn,formatHex:Mn,formatRgb:Cn,toString:Cn})),Qt(Nn,(function(e,t,n,r){return 1===arguments.length?Tn(e):new Nn(e,t,n,null==r?1:r)}),en(tn,{brighter:function(e){return e=null==e?rn:Math.pow(rn,e),new Nn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?nn:Math.pow(nn,e),new Nn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new En(wn(e>=240?e-240:e+120,i,r),wn(e,i,r),wn(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},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 In=function e(t){var n=Rn(t);function r(e,t){var r=n((e=Sn(e)).r,(t=Sn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Ln(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Pn(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function qn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=_n(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Dn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function zn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function $n(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=_n(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Fn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jn=new RegExp(Fn.source,"g");function Bn(e,t){var n,r,i,o=Fn.lastIndex=jn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Fn.exec(e))&&(r=jn.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:zn(n,r)})),o=jn.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function _n(e,t){var n,r=typeof t;return null==t||"boolean"===r?kn(t):("number"===r?zn:"string"===r?(n=yn(t))?(t=n,In):Bn:t instanceof yn?In:t instanceof Date?Dn:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Pn:Array.isArray(t)?qn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?$n:zn)(e,t)}function Vn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Hn(e){return+e}var Un=[0,1];function Yn(e){return e}function Wn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Xn(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Gn(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Wn(i,r),o=n(a,o)):(r=Wn(r,i),o=n(o,a)),function(e){return o(r(e))}}function Kn(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Wn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=$t(e,t,1,r)-1;return o[n](i[n](t))}}function Jn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zn(e,t){return function(){var e,t,n,r,i,o,a=Un,s=Un,l=_n,u=Yn;function c(){return r=Math.min(a.length,s.length)>2?Kn:Gn,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),zn)))(n)))},d.domain=function(e){return arguments.length?(a=Jt.call(e,Hn),u===Yn||(u=Xn(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Zt.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Zt.call(e),l=Vn,c()},d.clamp=function(e){return arguments.length?(u=e?Xn(a):Yn,d):u!==Yn},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function Qn(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)]}function er(e){return(e=Qn(Math.abs(e)))?e[1]:NaN}var tr,nr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rr(e){if(!(t=nr.exec(e)))throw new Error("invalid format: "+e);var t;return new ir({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function ir(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function or(e,t){var n=Qn(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}rr.prototype=ir.prototype,ir.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ar={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return or(100*e,t)},r:or,s:function(e,t){var n=Qn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(tr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Qn(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function sr(e){return e}var lr,ur,cr,dr=Array.prototype.map,mr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pr(e){var t=void 0===e.grouping||void 0===e.thousands?sr:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(dr.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?sr:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(dr.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function u(e){var u=(e=rr(e)).fill,c=e.align,d=e.sign,m=e.symbol,p=e.zero,h=e.width,f=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(f=!0,y="g"):ar[y]||(void 0===g&&(g=12),v=!0,y="g"),(p||"0"===u&&"="===c)&&(p=!0,u="0",c="=");var b="$"===m?n:"#"===m&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===m?r:/[%p]/.test(y)?a:"",S=ar[y],E=/[defgprs%]/.test(y);function M(e){var n,r,a,m=b,M=x;if("c"===y)M=S(e)+M,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:S(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),m=(C?"("===d?d:s:"-"===d||"("===d?"":d)+m,M=("s"===y?mr[8+tr/3]:"")+M+(C&&"("===d?")":""),E)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){M=(46===a?i+e.slice(n+1):e.slice(n))+M,e=e.slice(0,n);break}}f&&!p&&(e=t(e,1/0));var O=m.length+e.length+M.length,A=O<h?new Array(h-O+1).join(u):"";switch(f&&p&&(e=t(A+e,A.length?h-M.length:1/0),A=""),c){case"<":e=m+e+M+A;break;case"=":e=m+A+e+M;break;case"^":e=A.slice(0,O=A.length>>1)+m+e+M+A.slice(O);break;default:e=A+m+e+M}return o(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:u,formatPrefix:function(e,t){var n=u(((e=rr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(er(t)/3))),i=Math.pow(10,-r),o=mr[8+r/3];return function(e){return n(i*e)+o}}}}function hr(e,t,n,r){var i,o=Vt(e,t,n);switch((r=rr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(er(t)/3)))-er(Math.abs(e)))}(o,a))||(r.precision=i),cr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,er(t)-er(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-er(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return ur(r)}function fr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=_t(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return hr(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=_t(s,l,n))>0?r=_t(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=_t(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function gr(){var e=Zn(Yn,Yn);return e.copy=function(){return Jn(e,gr())},Ht.apply(e,arguments),fr(e)}lr=pr({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),ur=lr.format,cr=lr.formatPrefix;var vr=new Date,yr=new Date;function br(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return br((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return vr.setTime(+t),yr.setTime(+r),e(vr),e(yr),Math.floor(n(vr,yr))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var xr=br((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));xr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?br((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):xr:null},xr.range;var Sr=6e4,Er=36e5,Mr=864e5,Cr=6048e5,Or=br((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}));Or.range;var Ar=br((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Sr)/Mr}),(function(e){return e.getDate()-1}));function Tr(e){return br((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Sr)/Cr}))}Ar.range;var Nr=Tr(0),wr=Tr(1),kr=Tr(2),Rr=Tr(3),Lr=Tr(4),Ir=Tr(5),Pr=Tr(6);Nr.range,wr.range,kr.range,Rr.range,Lr.range,Ir.range,Pr.range;var qr=br((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()}));qr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?br((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},qr.range;var Dr=br((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Sr)}),(function(e,t){return(t-e)/Sr}),(function(e){return e.getUTCMinutes()}));Dr.range;var zr=br((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Er)}),(function(e,t){return(t-e)/Er}),(function(e){return e.getUTCHours()}));zr.range;var $r=br((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Mr}),(function(e){return e.getUTCDate()-1}));function Fr(e){return br((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)/Cr}))}$r.range;var jr=Fr(0),Br=Fr(1),_r=Fr(2),Vr=Fr(3),Hr=Fr(4),Ur=Fr(5),Yr=Fr(6);jr.range,Br.range,_r.range,Vr.range,Hr.range,Ur.range,Yr.range;var Wr=br((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()}));Wr.range;var Xr=br((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 Gr(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 Kr(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 Jr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Xr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?br((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},Xr.range;var Zr,Qr,ei={"-":"",_:" ",0:"0"},ti=/^\s*\d+/,ni=/^%/,ri=/[\\^$*+?|[\]().{}]/g;function ii(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function oi(e){return e.replace(ri,"\\$&")}function ai(e){return new RegExp("^(?:"+e.map(oi).join("|")+")","i")}function si(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function li(e,t,n){var r=ti.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ui(e,t,n){var r=ti.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ci(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function di(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function mi(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function pi(e,t,n){var r=ti.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hi(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function fi(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 gi(e,t,n){var r=ti.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function vi(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function yi(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function bi(e,t,n){var r=ti.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function xi(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Si(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ei(e,t,n){var r=ti.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Mi(e,t,n){var r=ti.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ci(e,t,n){var r=ti.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Oi(e,t,n){var r=ni.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ai(e,t,n){var r=ti.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ti(e,t,n){var r=ti.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Ni(e,t){return ii(e.getDate(),t,2)}function wi(e,t){return ii(e.getHours(),t,2)}function ki(e,t){return ii(e.getHours()%12||12,t,2)}function Ri(e,t){return ii(1+Ar.count(qr(e),e),t,3)}function Li(e,t){return ii(e.getMilliseconds(),t,3)}function Ii(e,t){return Li(e,t)+"000"}function Pi(e,t){return ii(e.getMonth()+1,t,2)}function qi(e,t){return ii(e.getMinutes(),t,2)}function Di(e,t){return ii(e.getSeconds(),t,2)}function zi(e){var t=e.getDay();return 0===t?7:t}function $i(e,t){return ii(Nr.count(qr(e)-1,e),t,2)}function Fi(e){var t=e.getDay();return t>=4||0===t?Lr(e):Lr.ceil(e)}function ji(e,t){return e=Fi(e),ii(Lr.count(qr(e),e)+(4===qr(e).getDay()),t,2)}function Bi(e){return e.getDay()}function _i(e,t){return ii(wr.count(qr(e)-1,e),t,2)}function Vi(e,t){return ii(e.getFullYear()%100,t,2)}function Hi(e,t){return ii((e=Fi(e)).getFullYear()%100,t,2)}function Ui(e,t){return ii(e.getFullYear()%1e4,t,4)}function Yi(e,t){var n=e.getDay();return ii((e=n>=4||0===n?Lr(e):Lr.ceil(e)).getFullYear()%1e4,t,4)}function Wi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ii(t/60|0,"0",2)+ii(t%60,"0",2)}function Xi(e,t){return ii(e.getUTCDate(),t,2)}function Gi(e,t){return ii(e.getUTCHours(),t,2)}function Ki(e,t){return ii(e.getUTCHours()%12||12,t,2)}function Ji(e,t){return ii(1+$r.count(Xr(e),e),t,3)}function Zi(e,t){return ii(e.getUTCMilliseconds(),t,3)}function Qi(e,t){return Zi(e,t)+"000"}function eo(e,t){return ii(e.getUTCMonth()+1,t,2)}function to(e,t){return ii(e.getUTCMinutes(),t,2)}function no(e,t){return ii(e.getUTCSeconds(),t,2)}function ro(e){var t=e.getUTCDay();return 0===t?7:t}function io(e,t){return ii(jr.count(Xr(e)-1,e),t,2)}function oo(e){var t=e.getUTCDay();return t>=4||0===t?Hr(e):Hr.ceil(e)}function ao(e,t){return e=oo(e),ii(Hr.count(Xr(e),e)+(4===Xr(e).getUTCDay()),t,2)}function so(e){return e.getUTCDay()}function lo(e,t){return ii(Br.count(Xr(e)-1,e),t,2)}function uo(e,t){return ii(e.getUTCFullYear()%100,t,2)}function co(e,t){return ii((e=oo(e)).getUTCFullYear()%100,t,2)}function mo(e,t){return ii(e.getUTCFullYear()%1e4,t,4)}function po(e,t){var n=e.getUTCDay();return ii((e=n>=4||0===n?Hr(e):Hr.ceil(e)).getUTCFullYear()%1e4,t,4)}function ho(){return"+0000"}function fo(){return"%"}function go(e){return+e}function vo(e){return Math.floor(+e/1e3)}!function(e){Zr=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=ai(i),c=si(i),d=ai(o),m=si(o),p=ai(a),h=si(a),f=ai(s),g=si(s),v=ai(l),y=si(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Ni,e:Ni,f:Ii,g:Hi,G:Yi,H:wi,I:ki,j:Ri,L:Li,m:Pi,M:qi,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:go,s:vo,S:Di,u:zi,U:$i,V:ji,w:Bi,W:_i,x:null,X:null,y:Vi,Y:Ui,Z:Wi,"%":fo},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Xi,e:Xi,f:Qi,g:co,G:po,H:Gi,I:Ki,j:Ji,L:Zi,m:eo,M:to,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:go,s:vo,S:no,u:ro,U:io,V:ao,w:so,W:lo,x:null,X:null,y:uo,Y:mo,Z:ho,"%":fo},S={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:yi,e:yi,f:Ci,g:hi,G:pi,H:xi,I:xi,j:bi,L:Mi,m:vi,M:Si,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:gi,Q:Ai,s:Ti,S:Ei,u:ui,U:ci,V:di,w:li,W:mi,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:hi,Y:pi,Z:fi,"%":Oi};function E(e,t){return function(n){var r,i,o,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!=(i=ei[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=Jr(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Kr(Jr(o.y,0,1))).getUTCDay(),r=i>4||0===i?Br.ceil(r):Br(r),r=$r.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Gr(Jr(o.y,0,1))).getDay(),r=i>4||0===i?wr.ceil(r):wr(r),r=Ar.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Kr(Jr(o.y,0,1)).getUTCDay():Gr(Jr(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Kr(o)):Gr(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in ei?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}(e),Zr.format,Zr.parse,Qr=Zr.utcFormat,Zr.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var yo=1e3,bo=6e4,xo=36e5,So=864e5,Eo=2592e6,Mo=31536e6;function Co(e){return new Date(e)}function Oo(e){return e instanceof Date?+e:+new Date(+e)}function Ao(e,t,n,r,i,o,a,s,l){var u=Zn(Yn,Yn),c=u.invert,d=u.domain,m=l(".%L"),p=l(":%S"),h=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),b=l("%Y"),x=[[a,1,yo],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,bo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,xo],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,So],[r,2,1728e5],[n,1,6048e5],[t,1,Eo],[t,3,7776e6],[e,1,Mo]];function S(s){return(a(s)<s?m:o(s)<s?p:i(s)<s?h:r(s)<s?f:t(s)<s?n(s)<s?g:v:e(s)<s?y:b)(s)}function E(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=zt((function(e){return e[2]})).right(x,o);a===x.length?(i=Vt(n/Mo,r/Mo,t),t=e):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(Vt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Jt.call(e,Oo)):d().map(Co)},u.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=E(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?S:l(t)},u.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):u},u.copy=function(){return Jn(u,Ao(e,t,n,r,i,o,a,s,l))},u}function To(){return Ht.apply(Ao(Xr,Wr,jr,$r,zr,Dr,Or,xr,Qr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const No={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},wo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var ko={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=No[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:wo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:wo(t.shadow.endOffset)}}})(n),u="horizontal"===n&&r,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function Ro({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Lo;function Io(){Lo=Lo||document.createElement("canvas").getContext("2d")}const Po={measureTextWidth(e){Io();const{width:t}=Lo.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Io();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],p=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Lo.font=n),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[p]=m,c="",i=1;i<m.length;i++)if(l=`${p} ${m[i]}`,u=Po.measureTextWidth(l),u>t&&("number"!=typeof r||r>s.length)?(s.push(p),p=m[i]):p=l,"number"==typeof r&&s.length>=r){c=m.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(p):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${p} ${c}`}return s},wordWrap(e,t,n,r,i){if(Io(),!e||!e.length)return[];n&&(Lo.font=n);let o=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||Po.measureTextWidth(u)<=t?o.push(u):(s=Po.splitWord(u,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?Po.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=r?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+1]}`:a.push(l))));return o.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),o.length>r?(o=o.splice(0,r),o[o.length-1]=Po.truncate(o[o.length-1],t,n,i).text):(u=o[o.length-1],u&&u.length>1&&Po.measureTextWidth(u)>t&&(o[o.length-1]=Po.truncate(u,t,n,i).text)),o},truncate(e,t,n,r="…"){Io();let i,o,a,s,l=e;const u=Po.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Lo.font=n),e&&t){if(Po.measureTextWidth(l)>t){for(i=Math.min(c,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,Po.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;Io();let o,a=e,s="",l=[];if(Po.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/r);for(i=Math.min(e.length,u);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(Po.measureTextWidth(a)<=t));i--);return(!i&&!a||Po.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Po.measureTextWidth(s)>t?(s=Po.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Io(),e&&t?(n&&(Lo.font=n),Po.explodeWord(e,t,r,Math.max(1,Po.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?Po.lineWrap(e,t,n,r):[e],o=Po.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Io(),e&&(Lo.font=e),1.5*Po.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Io(),t&&(Lo.font=t);const s=Po.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(r)||r<=0?m:Math.min(m,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(Po.wrapText(e,i,t,u[n])))})):d=Po.wrapText(e,i,t,u[0],n),d}},qo={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(de({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}},Do=de.bind(null,!0),zo={},{isArray:$o}=Array;function Fo(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function jo(e){return void 0===e}function Bo(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function _o(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=jo(e[r||t])?o:e[t],e=e[r||t]})),e}function Vo(e,t){return t?Object.keys(e).filter((t=>void 0!==e[t])).length:Object.keys(e).length}function Ho(e,t,n){let r=!0;if(Fo(e)&&Fo(t))return Vo(e,n)===Vo(t,n)&&(Object.keys(e).forEach((i=>{Ho(e[i],t[i],n)||(r=!1)})),r);if($o(e)&&$o(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!Ho(e[r],t[r],n))return!1;return!0}return e===t}zo.compare=Ho,zo.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Do({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;Ho(o,a)||Bo(t,i)||(jo(a)?r.push({op:"add",path:s,value:o}):Fo(o)&&Fo(a)?r=r.concat(zo.generate(a,o,s)):$o(o)&&$o(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&jo(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(Ho(t,i))return r;if(!jo(t[0])&&jo(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(zo.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{jo(t[i])&&!Bo(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},zo.apply=function(e,t){t.forEach((t=>{let n=_o(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if($o(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if($o(i)&&$o(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(Fo(i)&&Fo(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Bo(a,e)&&delete a[e]})),Do(i,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 i=_o(e,t.from);$o(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&($o(n)?n.splice(+r,1):delete n[r]);var a}))},zo.clone=function(e){return Do({},e)},zo.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},zo.updateObject=function(e,t){Object.keys(e).length?zo.apply(e,zo.generate(e,t)):Do(e,t)};const Uo=Math.log(10);function Yo(e){return 10**e}const Wo={pow10:Yo,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/Uo,eliminateFloatingError(e){const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e},getNiceNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/Uo),r=e/Yo(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*Yo(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/Uo);const r=e/Yo(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*Yo(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return Yo(Math.floor(Math.log(Math.abs(e))/Uo))},getFraction(e){if(0===e)return 0;return e/Yo(Math.floor(Math.log(Math.abs(e))/Uo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/Uo),r=e/Yo(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*Yo(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},Xo=[[2,4,6],[2,4],[3]],Go=[,[,,[[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 Ko(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function Jo(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Ko(e[r],t,n)}!function(){let e,t;for(Jo(Xo,1,10),e=0;e<Go.length;e++)if(Go[e])for(t=0;t<Go[e].length;t++)Array.isArray(Go[e][t])&&Jo(Go[e][t])}();const Zo={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=Zo.findSegmentPositionMeetMin(e,t);return Zo.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=Zo.findSegmentPositionMeetMax(e,n);return Zo.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=Zo.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=Zo.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let u,c=0;for(o=i;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,Zo.getGap(s,a)-r),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));o--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,o=0;o<=i;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0))if(0!==i)Zo.layoutPositionFromMin(e,t,n,r),Zo.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=Zo.findSegmentPositionMeetMaxThenMin(r,t,n)}}},Qo=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},ea=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,ta=e=>e.filter(ea),na=(e,t)=>ta(xe.getValue(e,t,[])),ra=e=>ea(e)&&(!1!==e.showValue||!1!==e.showLabel),ia=e=>e.filter(ra),oa=(e,t)=>ia(xe.getValue(e,t,[])),aa=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,sa=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},la=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},ua=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},ca=({value:e,qMin:t})=>"NaN"!==t&&e<t,da=({value:e,qMax:t})=>"NaN"!==t&&e>t,ma={isRefLineVisible:ea,getVisibleRefLines:ta,getRefLines:na,getMeasureRefLines:e=>na(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:na(e,"refLine.dimRefLines"),isRefLineLabelVisible:ra,getVisibleRefLineLabels:ia,getRefLineLabels:oa,getMeasureRefLineLabels:e=>oa(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:oa(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let u;var l;if(a.meta.isGroupedByMeasure)return u=Qo(s,i,o,null!==(l=a.meta.groupSize)&&void 0!==l?l:a.meta.measureCount),s([n,0])+u;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let l;return u=Qo(s,i,o,t),e&&e.length&&(l=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===l?s(n):l)+u}return u=Qo(s,i,o),s(n)+u}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=xe.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():xe.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=s?"qData.0.qSubNodes":"qMatrix",c=xe.getValue(l,u,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),m=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:c[e]})}})():i?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],r=c[t][1],i=t+m,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}],dataNode:c[t]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:c[e]})}})(),o},getInputValue:aa,extractInfoFromInputValue:sa,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=aa({refLineLayout:e,layoutService:n});return sa(r,t,"id")},isDiscreteMinOutOfBounds:la,isDiscreteMaxOutOfBounds:ua,isContinuousMinOutOfBounds:ca,isContinuousMaxOutOfBounds:da,isOutOfRange:({value:e,qMin:t,qMax:n})=>ca({value:e,qMin:t})||da({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&ua({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&la({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},pa=({label:e,labelStyle:t})=>[(null==e?void 0:e.fontStyle)||(null==t?void 0:t.fontStyle),(null==e?void 0:e.fontWeight)||(null==t?void 0:t.fontWeight),(null==e?void 0:e.fontSize)||(null==t?void 0:t.fontSize),(null==e?void 0:e.fontFamily)||(null==t?void 0:t.fontFamily)].filter((e=>!!e)).join(" ");function ha(e){return e.showValue?`… ${e.valueString}`:"…"}function fa(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=pa({label:i,labelStyle:t});i.lines=Po.tokenize(i.title,o,ha(i),3,n),i.maxNumLines=i.lines.length}}function ga({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=Po.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function va({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map((e=>ga({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i}))),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function ya(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const ba=3,xa=2;function Sa({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const Ea=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ma.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ma.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ma.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ma.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},Ma={hasEngineFormat:Sa,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=ma.getInvert({orientation:i,rtl:o,isContinuous:a}),u="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=r.getHyperCubeValue(u),{canBeContinuous:d}=r.meta;let m,p;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,p=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:u,valueInfo:d}=o,h=Ea({label:o,dataPages:c,qMin:m,qMax:p});o.scaledValue=1===h?l?-.1:1.1:-1===h?l?1.1:-.1:ma.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=Sa({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Pe.lrm}(${o})${Pe.lrm}`,r.title=Ma.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=Sa({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Pe.lrm}(${o})${Pe.lrm}`,n.title=Ma.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Pe.lrm}(${o})${Pe.lrm}`,n.title=Ma.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((n=>t(n,e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=Ma.getTotalNumLines(e)-r;if(t<=0)return;Ma.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,Ma.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:p,isContinuous:h,isDimension:f}){const g=e.map((e=>e)),v=n;Ma.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:p,orientation:c,rtl:m,isContinuous:h,isDimension:f}),ya(e,"center"),Ma.addLabelsNeighborInfo(e,r,i,o),fa(e,a,s),Ma.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===c&&(Ma.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=pa({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=Po.tokenize(i.title,o,ha(i),i.maxNumLines,n))}}(e,a,s)),Ma.addLabelsSize(e,s,l,d),Ma.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:u}=r,{minorCenter:c}=i,{fontSize:d,fontFamily:m,fontStyle:p,fontWeight:h,textDecoration:f,background:g}=t;let v=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,i=t.map(((t,i)=>{const g={type:"text",text:t,title:ga({title:e.title,font:a,ellipsis:ha(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||d,fontFamily:e.fontFamily||m,fontStyle:e.fontStyle||p,fontWeight:e.fontWeight||h,textDecoration:e.textDecoration||f,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:u};return g[l]=c,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g}));e.background&&v.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=ba,padding:u={}}=a,{top:c=xa,bottom:d=xa,left:m=xa,right:p=xa}=u,h=s.length,f={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(m+p),height:i.height+(c+d),value:i.value,dock:r};return f[n]=e,f[t]=i.segment.position,f.x-=i.width/2+m,f.y-=h*o/2+c,f}({minorCenter:c,majorAxis:s,minorAxis:l,dock:u,label:e,lineHeight:o,background:g})),v=v.concat(i)})),v}};function Ca(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function Oa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return Ma.getMaxTextWidth(e)>o&&(fa(e,t,o),a=Math.max(...e.map((e=>e.lines.length)))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,Ma.getMaxTextWidth(e))+n+r}(t,n)}function Aa(e,t){return t?e.domain():[0,1]}function Ta(e,t,n,r="value"){let i=e.filter((e=>e[r]>=t));i=i.filter((e=>e[r]<=n));const o=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function Na(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function wa(e,t){return e>9?t[1]:t[0]}function ka({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:u}){const c=n?n.length:0;if(c<1)return[];const{flipXY:d,majorAxis:m,minorAxis:p,minorDimension:h,dock:f}=s,g=i[h],v=qo.createOob({oob:qo.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});v.dock=f;const y=`c${m}`,b=`c${p}`,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:f};x[b]=g/2,x[y]=a;const S={type:"text",text:c>9?"9+":c,title:va({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:f};return S[p]=g/2,S[m]=a,[v,x,S]}const Ra=e=>{const t=pa({labelStyle:e}),n=Po.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},La=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var Ia={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=La(this.settings.labels),s=Ca(this.chart,this.settings.formatter,e);Ma.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=Aa(t,n);return Ta(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Ta(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},c&&c.length){const e=Ra(t.label),{dock:n}=this.settings.layout;return Ma.measureLabelsWidth(c,this.measureText),d=Oa(n,c,e),d}const m=Na(this.measureText),p=l?wa(l,m):0,h=u?wa(u,m):0;return d=Math.max(p,h),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,u=La(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=n.label,p=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(c),h=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,p,m),{orientation:f,majorDimension:g}=p,{majorSize:v}=h,y=Ra(n.label),{font:b,lineHeight:x,gap:S,maxLabelWidth:E}=y,M=Ca(this.chart,this.settings.formatter,e),C=v;Ma.addLabelTitles({labels:u,formatter:M,isContinuous:o,canBeContinuous:l,localeInfo:s}),Ma.calculateLabelPositions({labels:u,scale:e,size:C,layoutService:r,orientation:f,rtl:d,isContinuous:o,isDimension:a});const[O,A]=Aa(e,o),{filteredLabels:T,lowerOobs:N,upperOobs:w,lowerCircleSize:k,upperCircleSize:R,lowerOobSpace:L,upperOobSpace:I}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=Ta(e,t,n,u),p="scaledValue"!==u&&ma.getInvert({orientation:r,rtl:i,isContinuous:o}),h=function(e,t,n){return n?t:e}(d,c,p),f=function(e,t,n){return n?e:t}(d,c,p),g=h.length,v=f.length,y=Na(l),b=wa(g,y),x=wa(v,y),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),E=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(v,a.oob.size,x,r,s);return{filteredLabels:m,lowerOobs:h,upperOobs:f,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:S,upperOobSpace:E}}({labels:u,minValue:O,maxValue:A,orientation:f,rtl:d,isContinuous:o,style:n,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),P=L,q=v-I;ya(N),ya(w);const D=ka({alignment:0,dockValue:0,oobs:N,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+k/2,areaProps:p,radius:k/2,font:b}),z=ka({alignment:1,dockValue:1,oobs:w,style:n.oob,rect:this.rect,symbol:t,position:v-(n.oob.size+R/2),areaProps:p,radius:R/2,font:b});Ma.addLabelsInfo({labels:T,scale:e,majorSize:v,lowerLimit:P,upperLimit:q,labelStyle:y,lineHeight:x,gap:S,maxLabelWidth:E,majorDimension:g,orientation:f,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),Zo.layout(T.map((e=>e.segment)),P,q,n.label.gap);const $=T.filter((e=>Zo.isInside(e.segment,P,q,o)));return Ma.createLabels({labels:$,style:n.label,maxLabelWidth:E,areaProps:p,area:h,lineHeight:x,font:b,theme:i}).concat([...D,...z])}};var Pa={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function qa(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=de(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=Pa;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(l,e)&&M(l,e,null);else{const e=t[0],n=t[1].split("].")[1];E(l,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),l}var Da={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,u=a.y-s.y,c=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+c)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=qa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=qa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:za,extractInfoFromInputValue:$a,resolveValue:Fa}=ma;var ja={resolveValue:Fa,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=za({refLineLayout:e,layoutService:n});return $a(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=za({refLineLayout:e,layoutService:n});return $a(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=za({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=za({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const Ba=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,p;const h={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(p=t.style)||void 0===p?void 0:p.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(h.scale=s,h.value=t.refLineExpr.value):(h.valueInfo=ja.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),h.value=()=>{var e;const i=ma.getScaledPosition({scale:a.scale(s),value:ja.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:h.valueInfo,size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:r,isContinuous:d});return Number.isNaN(i)?void 0:i}),h};function _a({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:u,key:c,mainComponentKey:d,path:m,minimumLayoutMode:p}){const h=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!h.length)return!1;const f={key:c,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Da.lines.trackBy,compensateForLayoutChanges:Da.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!u),v=!e||n.meta.isContinuous;return h.forEach((o=>{f.lines[l].push(Ba({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:v}))})),f}const Va=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:u,theme:c,isContinuous:d,localeInfo:m})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:u},theme:c,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:u?2:4,right:u?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Da.refLineLabels.trackBy,compensateForLayoutChanges:Da.refLineLabels.compensateForLayoutChanges}}),Ha=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:u}=e,{fontSize:c,fontFamily:d,fontStyle:m,fontWeight:p,textDecoration:h}=u||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:c,fontFamily:d,fontStyle:m,fontWeight:p,textDecoration:h,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(f.background={fill:s}),a?(f.scale=i,f.value=e.refLineExpr.value):(f.value=()=>ja.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>ja.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>ja.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function Ua({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:u,localeInfo:c,rtl:d,key:m,path:p}){const h=e?t.dimensionRefLineLabels:p?t.query.getRefLineLabels(p):t.measureRefLineLabels;if(!h.length)return[];const f=[],g=!e||n.meta.isContinuous,v=h.map((e=>Ha({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:u,isContinuous:g})));return f.push(Va({isDimension:e,rtl:d,style:s,dock:o,key:m,labels:v,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:u,isContinuous:g,localeInfo:c})),f}function Ya({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=Ce.dimensionless(o),l=ma.getMeasureRefLines(o),u=ma.getDimensionRefLines(o,s),c=ma.getMeasureRefLineLabels(o),d=ma.getDimensionRefLineLabels(o,s);let m={},p={};const h=()=>!(!u||!u.length)&&!u.every((t=>{const o=ma.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return ma.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!p[t])return!1;if(!n&&i){const n={valueInfo:p[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return ma.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)})),f={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:p,dimensionValuesInfo:m,query:{getRefLines:e=>ma.getRefLines(o,e),getRefLineLabels:e=>ma.getRefLineLabels(o,e)},update:()=>{p=f.dimensionRefLineInfo,h()&&(m=ma.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=m,u.forEach((t=>{const n=ma.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(p[n]?(p[n].innerValues=m[n].innerValues,p[n].minOrder=Math.min(p[n].minOrder,m[n].minOrder),p[n].maxOrder=Math.max(p[n].maxOrder,m[n].maxOrder),p[n].isMinOrderOk=p[n].isMinOrderOk||m[n].isMinOrderOk,p[n].isMaxOrderOk=p[n].isMaxOrderOk||m[n].isMaxOrderOk):p[n]={id:m[n].id,qText:m[n].qText,innerValues:m[n].innerValues,minOrder:m[n].minOrder,maxOrder:m[n].maxOrder,isMinOrderOk:m[n].isMinOrderOk,isMaxOrderOk:m[n].isMaxOrderOk},p[n].numInnerValues=(p[n].maxOrder||0)-(p[n].minOrder||0)+1)})))}};return f.update(),f}function Wa(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=e&&e.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Xa({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=C(n);return r.setAlpha((null==e?void 0:e.alpha)>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}function Ga({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:r}=e,i=""===e.measureValue?void 0:+e.measureValue;if(Wo.isNumber(i))return i;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;var l;if(Wo.isNumber(s)&&(!(s>=a||0===o)&&1===o))return null===(l=t[r])||void 0===l||null===(l=l.dataNode[s+1])||void 0===l?void 0:l.qNum}const Ka=3,Ja=10,Za={index:-1,color:"#595959"};function Qa({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,flags:s,rtl:l,majorScale:u,minorScale:c,mainComponentKey:d,data:m,key:p}){var h;if(!Array.isArray(m)||0===m.length)return!1;const f={resolveUIColor:r.getMain().getPaletteColor},g=i.getTheme(),v="horizontal"===a.meta.major.orientation,y=!(!v||!l),{canBeContinuous:b,isContinuous:x,isButterfly:S}=o.meta,E=o.getLayout(),M=null!==(h=function({layout:e,colorModel:t}){var n,r,i;const o=null==e||null===(n=e.components)||void 0===n?void 0:n.find((e=>"general"===e.key));if(null!=o&&null!==(r=o.bgColor)&&void 0!==r&&r.useColorExpression){var a;const e=C(null==o||null===(a=o.bgColor)||void 0===a?void 0:a.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}return Xa({color:null==o||null===(i=o.bgColor)||void 0===i?void 0:i.color,colorModel:t})}({layout:E,colorModel:f}))&&void 0!==h?h:g.getStyle("object","","backgroundColor"),O=ma.getDimensionValuesInfo({layout:E,canBeContinuous:b,discreteModel:n,layoutService:o}),A=x?m:m.filter((e=>!!O[e.dimensionValue])),T={},N=A.map((e=>e.dimensionValue));N.forEach((e=>{O[e]&&(T[e]?(T[e].innerValues=O[e].innerValues,T[e].minOrder=Math.min(T[e].minOrder,O[e].minOrder),T[e].maxOrder=Math.max(T[e].maxOrder,O[e].maxOrder),T[e].isMinOrderOk=T[e].isMinOrderOk||O[e].isMinOrderOk,T[e].isMaxOrderOk=T[e].isMaxOrderOk||O[e].isMaxOrderOk):T[e]={id:O[e].id,dataNode:O[e].dataNode,qText:O[e].qText,innerValues:O[e].innerValues,minOrder:O[e].minOrder,maxOrder:O[e].maxOrder,isMinOrderOk:O[e].isMinOrderOk,isMaxOrderOk:O[e].isMaxOrderOk},T[e].numInnerValues=(T[e].maxOrder||0)-(T[e].minOrder||0)+1)})),A.forEach((e=>{var t,n,r;const a=Ga({point:e,dimensionValueInfo:T,layoutService:o});if(e.validMeasureValue=S&&1===e.measureIndex?-a:a,null!=o&&null!==(t=o.meta)&&void 0!==t&&t.isStacked){var s;const t=null===(s=T[e.dimensionValue])||void 0===s?void 0:s.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){var l;const n=t.slice(0,e.measureIndex+2),r=null===(l=t[e.measureIndex+1])||void 0===l?void 0:l.qNum;if("number"==typeof r&&0!==r){const t=Math.sign(r);e.validMeasureValue=n.reduce(((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e}),0)}}}const u=Xa({colorModel:f,color:(null===(n=e.style)||void 0===n||null===(n=n.label)||void 0===n?void 0:n.color)||Za}),c=!(null===(r=e.style)||void 0===r||null===(r=r.label)||void 0===r||!r.coloredBackground);e.labelBackgroundColor=c?u:void 0,e.labelColor=c?i.getTheme().getContrastingColorTo(u):u,e.hasBackground=c,e.maxLabelWidth=100}));const w={scale:u,fn:({datum:t})=>{var n;const r=e.scale(u),i=t.value.dimensionValue;if(x)return r("string"==typeof i?""===i?void 0:+i:i);if(void 0===T[i])return;return ma.getScaledPosition({scale:r,value:T[i].id,valueInfo:T[i],size:null===(n=e.component(d))||void 0===n?void 0:n.rect[v?"width":"height"],align:"center",invert:y,layoutService:o,isContinuous:x})}},k={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:p,type:"point",data:A,settings:{x:v?w:k,y:v?k:w,strokeWidth:({datum:e})=>{var t,n;return null!==(t=null===(n=e.value.style)||void 0===n?void 0:n.lineThickness)&&void 0!==t?t:Ka},stroke:({datum:e})=>{var t,n;return Xa({colorModel:f,color:null!==(t=e.value.style)&&void 0!==t&&null!==(t=t.lineColor)&&void 0!==t&&t.color?null===(n=e.value.style)||void 0===n?void 0:n.lineColor:{index:-1,color:"#000"}})},fill:({datum:e})=>{var t,n;return null!==(t=e.value.style)&&void 0!==t&&null!==(t=t.fill)&&void 0!==t&&t.color?Xa({colorModel:f,color:null===(n=e.value.style)||void 0===n?void 0:n.fill}):M},size:({datum:e})=>{var t,n;return`${null!==(t=null===(n=e.value.style)||void 0===n?void 0:n.dataPointSize)&&void 0!==t?t:Ja}px`},shape:null!=s&&s.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL")?({datum:e})=>{var t;return(null===(t=e.value.style)||void 0===t?void 0:t.symbol)||"circle"}:void 0},animations:{enabled:t.query.animationsEnabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.points.compensateForLayoutChanges}}}const es=2;const ts=e=>{var t;return(null==e||null===(t=e.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})).length)||0},ns=!0,rs=!1,is={index:0,color:"none"},os={index:-1,color:"#595959"},as={index:-1,color:"#595959"},ss=e=>{var t,n;null!==(t=e.dimensionValue)&&void 0!==t&&t.qValueExpression||null===(n=e.dimensionValue)||void 0===n||!n.qStringExpression||(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},ls=e=>{var t,n;null===(t=e.dimensionValue)||void 0===t||!t.qValueExpression||null!==(n=e.dimensionValue)&&void 0!==n&&n.qStringExpression||(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},us=e=>{var t,n,r,i,o,a,s,l;switch(e.type){case"point":delete e.points,null===(t=e.style)||void 0===t||delete t.lineType;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,null===(n=e.style)||void 0===n||delete n.dataPointSize,null===(r=e.style)||void 0===r||delete r.fill;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,null===(i=e.style)||void 0===i||delete i.lineType,null===(o=e.style)||void 0===o||delete o.lineThickness,null===(a=e.style)||void 0===a||delete a.lineColor,null===(s=e.style)||void 0===s||delete s.dataPointSize,null===(l=e.style)||void 0===l||delete l.fill}},cs=({flags:e,translator:t})=>({label:null!=e&&e.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL")?{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""}:void 0,dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>ve.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!ve.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===ts(n.layout),convertFunctions:{get:(e,t,n,r)=>void 0===r.measureValue?1:0,set(e,t,n,r,i){0===e?(i.measureValue=0,delete i.measureIndex):(i.measureIndex=0,delete i.measureValue)}},options:[{value:0,translation:t.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:t.get("properties.plugins.measureInputType.measureIndex")}]},measureValue:{ref:"measureValue",translation:"properties.plugins.measureInputType.measureValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,schemaIgnore:!0,show:(e,t,n)=>void 0!==e.measureValue||2===ts(n.layout)},measureIndex:{ref:"measureIndex",translation:"properties.plugins.measureInputType.measureIndex",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>void 0===e.measureValue&&1===ts(n.layout),invalid:(e,t,n)=>{return e.measureIndex<0||e.measureIndex>=((null==(r=n.layout)||null===(i=r.qHyperCube)||void 0===i||null===(i=i.qMeasureInfo)||void 0===i?void 0:i.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})).length)||0);var r,i}}}),ds=e=>({symbol:null!=e&&e.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL")?{type:"string",component:"dropdown",ref:"style.symbol",translation:"Object.GridChart.Symbol",options:[{value:"circle",translation:"Object.GridChart.Symbol.Circle"},{value:"cross",translation:"Object.GridChart.Symbol.Cross"},{value:"diamond",translation:"Object.GridChart.Symbol.Diamond"},{value:"saltire",translation:"Object.GridChart.Symbol.Saltire"},{value:"square",translation:"Object.GridChart.Symbol.Square"},{value:"star",translation:"Object.GridChart.Symbol.Star"},{value:"triangle",translation:"Object.GridChart.Symbol.Triangle"}]}:void 0,labelPlacement:null!=e&&e.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL")?{type:"string",component:"dropdown",ref:"label.placement",translation:"geo.properties.labelPosition",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"top",translation:"geo.properties.labelPosition.above"},{value:"bottom",translation:"geo.properties.labelPosition.below"}]}:void 0,fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:rs,showAlpha:ns,defaultValue:is},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:rs,showAlpha:ns,defaultValue:os},labelColor:null!=e&&e.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL")?{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:rs,showAlpha:ns,defaultValue:as}:void 0,colorBackground:null!=e&&e.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL")?{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0}:void 0,lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:3,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:10,min:3,max:30,step:1}}),ms=({flags:e,translator:t,pluginOptions:n})=>{const r={type:"array",ref:"plugins",translation:"properties.shapes",show:e=>{var t;return((null==e||null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions)||[]).length>0},itemTitleRef:e=>{var t;return n.filter((t=>t.value===e.type))[0].translation+(null!==(t=e.label)&&void 0!==t&&t.value?`: ${e.label.value}`:"")},allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:n},add(e,t){void 0===t.plugins&&(t.plugins=[]),us(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(us),ve.canBeContinuous(n.layout)?e.plugins.forEach((e=>{switch(e.type){case"point":ss(e);break;case"line":null===(t=e.points)||void 0===t||t.forEach(ss)}var t})):e.plugins.forEach((e=>{switch(e.type){case"point":ls(e);break;case"line":null===(t=e.points)||void 0===t||t.forEach(ls)}var t})))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:cs({flags:e,translator:t})},styleSection:{component:"items",items:ds(e)}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:null!=e&&e.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL")?{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""}:void 0,points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(e,n)=>{var r;return t.get("properties.plugins.Points.Point",n+1)+(null!==(r=e.label)&&void 0!==r&&r.value?`: ${e.label.value}`:"")},allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:cs({flags:e,translator:t})},styleSection:{component:"items",items:ds(e),show:(e,t,n)=>{const r=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return null==r?void 0:r.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:rs,showAlpha:ns,defaultValue:os},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:2,min:1,max:6,step:1},lineType:{component:"dropdown",type:"string",expression:"optional",ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"",options:[{value:"",translation:"LayerStyleEditor.style.solid"},{value:"8 4",translation:"LayerStyleEditor.style.dashed"}],convertFunctions:{get(e,t){const n=e(t.type);return void 0===n||""===n?"":"8 4"}}},lineCurve:{translation:"LayerStyleEditor.style.lineCurve",type:"string",ref:"style.lineCurve",component:"dropdown",defaultValue:"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return r};var ps={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",MARKER_LABEL:"marker-label",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},hs={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const fs={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 gs(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const vs={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={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=o[t]*(n>l?1:n/l),c=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(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=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{i(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function ys(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r;let i,o,a,s,l,u;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(r=e.session)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.url)){var c;if(i=e.session.options||(null===(c=e.enigmaModel)||void 0===c?void 0:c.session.sessionConfig),!i){var d;i=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(i.url);i.host=t.hostname,i.port=t.port,i.isSecure="wss:"===t.protocol}return u=void 0!==i.secure?i.secure:i.isSecure,o=u?"https://":"http://",a=i.host||"localhost",s=i.port?`:${i.port}`:"",l=i.prefix?i.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await vs.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function bs(e,t,n,r){var i,o,a;const{app:s,flags:l}=t,u=null===(i=e.layout)||void 0===i||null===(i=i.tooltip)||void 0===i?void 0:i.imageComponents;if(!u)return[];const[c]=u,d=c.size||"small",m=c.type||"media";let p=-1;for(let e=0;e<n.length;e++)if(n[e].cId===c.cId){p=e;break}const h=(null===(o=r.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let f;if(-1!==p&&h[p]&&(f=h[p]),"media"===m&&null!==(a=c.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return ys(c,d,s);if("url"===m)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&gs(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await vs.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await vs.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(s,l,c,d,f);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===m&&f&&f.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(gs(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await vs.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(s,n[p],d,f)}return[]}const xs={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(bs(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},Ss={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await xs.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>xs.checkIfPromisesExist({customTooltipModel:e})};const Es=(e,t)=>{var n,r,i;const o=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===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:fs.CHART.CHART_PARENT_TYPE,qId:fs.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Ms=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:fs.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const Cs={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r;const i=null!==(n=null===(r=t.tooltip)||void 0===r||null===(r=r.chart)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.size)&&void 0!==n?n:"medium",o=fs.CHART.STYLE[i];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:fs.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":o}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a;const s=i,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Cs.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=fs.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=fs.CHART.STATE,a=Es(t,o),s=await e.createSessionObject(a),l=Ms(t);if(s.id!==fs.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var u,c,d,m;const e=n.length>0&&void 0!==(null===(u=n[0].data)||void 0===u?void 0:u.value)?[null===(c=n[0].data)||void 0===c?void 0:c.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var p,h;const e=null!==(p=n[0].data.selectionOuterDimension)&&void 0!==p?p:n[0].data.selectionDimension;if(null!=e&&null!==(h=e.source)&&void 0!==h&&h.field){var f;const t=null==e||null===(f=e.source)||void 0===f?void 0:f.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(fs.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await i.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(m=s.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await Cs.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(Cs.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(fs.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=fs.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function Os(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function As(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=fs.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function Ts(e){const t=As();return e.filter((e=>t[e.id]))}const Ns={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 i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[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(i).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[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:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=Ns.getAttrExprData(a);o.length||n.length?Ss.handlePromises({customTooltipModel:i,nodes:Ns.getDataNodes(s,o.length>0?o: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!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&Cs.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Ss.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[t])||void 0===o?void 0:o.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[fs.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[fs.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[fs.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Ts(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[fs.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[fs.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Os(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===Ts(i).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...i,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=Os(e)||[];[...i,t].forEach((e=>{const t=Ts(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=As(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[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:Pe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Pe.detectTextDirection(e.src),r=[],i={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"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function ws(e,t,n,r){var i;const o=(null===(i=t.qHyperCube)||void 0===i||null===(i=i[n])||void 0===i||null===(i=i[r])||void 0===i?void 0:i.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const i=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case fs.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case fs.CUSTOM.TITLE:case fs.CUSTOM.DESCRIPTION:case fs.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);a.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const ks={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>ws(t,e,r,n)}}};const Rs={getCustomAttrExps(e,t,n){var r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(r=t.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(o))return i;return function(e,t,n,r){const i={[fs.CUSTOM.TITLE]:!0,[fs.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=Ns.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===fs.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===fs.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,o.map((t=>qe.getMeasure(e,t))),e,i)}};function Ls({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(Rs.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Is}=fs;function Ps({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:u}){const c={properties:void 0},d=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Ns,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,p=()=>{var e;const n=!(null===(e=c.properties)||void 0===e||null===(e=e.qHyperCubeDef)||void 0===e||!e.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv})));return!(!t.tooltip||t.tooltip.auto||n)};return{setProperties:e=>{c.properties=e},isEnabled:()=>p(),hideBasic:()=>p()&&E(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=Ls({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Is.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Is.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>Ns.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>Ns.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const i=Ns.getDataNodes(o,r),{attrExps:a}=Ns.getAttrExprData(t);return Ss.handlePromises({customTooltipModel:d,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(p()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>Cs.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>Ns.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>Cs.show({app:n,properties:t,selectedNodes:e,customTooltipModel:d,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=d.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>Cs.hide({app:n,customTooltipModel:d}),destroy:()=>Cs.destroyVisualization({customTooltipModel:d})}}}function qs({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter((e=>e.type===hs.TYPE.BAR)),u=n.meta.isContinuous?s:a,c=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},segment:{field:e,value:c,reduceLabel:"none"},end:{field:e,value:c,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:ks.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Ds({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,u=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},c)=>({source:n,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:c,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:ks.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function zs({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter((e=>e.type===hs.TYPE.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const $s={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var Fs={OPTIONS:$s,DEFAULT:$s.MINI_CHART};function js({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,u=r[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function Bs({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const _s=e=>({miniChart:e===Fs.OPTIONS.MINI_CHART.value,bar:e===Fs.OPTIONS.BAR.value,none:e===Fs.OPTIONS.NONE.value}),Vs=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return _s(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return _s(Fs.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return _s(!n&&(r||!r&&i)?Fs.OPTIONS.NONE.value:Fs.OPTIONS.MINI_CHART.value)};function Hs({layoutService:e,override:t}){const n=Vs({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Fs.OPTIONS.MINI_CHART.value,n.bar=t.value===Fs.OPTIONS.BAR.value,n.none=t.value===Fs.OPTIONS.NONE.value),n}function Us({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),m="horizontal"===o.meta.major.orientation,p=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,h=m?d.rect.computedInner.width:d.rect.computedInner.height,f=m&&a?h-p:p,g=Math.max(0,Math.min(f/h,1)),[v,y]=Bs({layoutService:i,viewState:n,viewCache:r}),b=g<v,x=g>y,S=!b&&!x;return{pixel:f,relative:g,thumb:S?f-v*h:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function Ys({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,m]=Bs({layoutService:i,viewState:n,viewCache:r});return{size:c,thumbSize:(m-d)*c}}}function Ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Us({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=Ys({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Xs="data-scrollbar-handle";function Gs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Xs)||""}const Ks="scrollbarResize",Js=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function Zs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Us({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Ks}`,options:{event:Ks,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Ks]=this[Ks]||{},Js(t)&&Gs({e:t})&&(this[Ks].panningEvent=t.srcEvent),!!this[Ks].panningEvent))}},events:{[`${Ks}start`](n){n.preventDefault(),this[Ks]=this[Ks]||{},this[Ks].panningEvent&&t.component(e).emit("dragStart",this[Ks].panningEvent)},[`${Ks}move`](n){if(n.preventDefault(),this[Ks]=this[Ks]||{},!this[Ks].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Gs({e:this[Ks].panningEvent});let m="start"===d?Math.min(c,o.max):o.min,p="end"===d?Math.max(c,o.min):o.max;m===p&&(m-="start"===d?u:0,p+="end"===d?u:0),r.set("zoom",{min:m,max:p}),t.component(e).emit("render")},[`${Ks}end`](n){n.preventDefault(),this[Ks]=this[Ks]||{},delete this[Ks].panningEvent,t.component(e).emit("dragEnd")},[`${Ks}cancel`](n){n.preventDefault(),this[Ks]=this[Ks]||{},delete this[Ks].panningEvent,t.component(e).emit("dragEnd")}}}}const Qs="scrollbarPan";function el({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Us({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=Ys({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Qs}`,options:{event:Qs,threshold:0,enable(r,i){return this[Qs]=this[Qs]||{},!(i&&!this[Qs].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{[`${Qs}start`](n){n.preventDefault();const a=u(n);if(this[Qs]=this[Qs]||{},this[Qs].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Qs].relative=a.relative,this[Qs].zoom=r.get("zoom"),this[Qs].zoom.span=this[Qs].zoom.max-this[Qs].zoom.min,this[Qs].zoom.fullSpan=o-n}else if(a.onThumb)this[Qs].offset=a.thumb;else{const e=c();this[Qs].offset=a.beforeThumb?0:e.thumbSize}},[`${Qs}move`](n){n.preventDefault();const a=u(n);if(this[Qs]=this[Qs]||{},o.meta.isContinuous){const e=a.relative-this[Qs].relative,{fullSpan:t,span:n,min:o,max:s}=this[Qs].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Qs].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Qs}end`](n){n.preventDefault(),this[Qs]=this[Qs]||{},this[Qs].isPanning=!1,t.component(e).emit("unlockState")},[`${Qs}cancel`](n){n.preventDefault(),this[Qs]=this[Qs]||{},this[Qs].isPanning=!1,t.component(e).emit("unlockState")}}}}function tl({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[Ws({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),Zs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),el({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function nl({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const rl={background:"rgba(0, 0, 0, 0.1)"},il={top:-1,bottom:-1,width:6},ol={width:2,background:"#595959"};var al={before:rl,after:rl,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:il,endHandle:il,startHandleBorder:ol,endHandleBorder:ol};const sl={background:"rgba(0, 0, 0, 0.1)"},ll={top:-1,bottom:-1,width:6},ul={width:2,background:"#595959"};var cl={before:sl,after:sl,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:ll,endHandle:ll,startHandleBorder:ul,endHandleBorder:ul};const dl={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},ml={pointerEvents:"initial"},pl={pointerEvents:"none"};const hl="ew-resize",fl="default";function gl(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function vl(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?hl:fl}function yl(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function bl(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function xl(){const{size:e,start:t,end:n}=gl.call(this);this.renderer.render(this.elements(this.h,yl.call(this,e,t,n)))}function Sl(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?cl:al;return{container:{...dl},before:{...dl,...n.before,...t.before},after:{...dl,...n.after,...t.after},thumb:{...dl,...n.thumb,...t.thumb},startHandle:{...dl,...ml,...n.startHandle},endHandle:{...dl,...ml,...n.endHandle},startHandleBorder:{...dl,...pl,...n.startHandleBorder},endHandleBorder:{...dl,...pl,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var El={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){xl.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!bl.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Gs({e:e});t&&(this.state.hover[t]=!0),vl.call(this),xl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),vl.call(this),xl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Gs({e:e});t&&(this.state.drag[t]=!0),vl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),vl.call(this),xl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=gl.call(this);return this.elements(e,yl.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[i.end]:t-n},m={[i.start]:r},p={left:-3},h={left:1},f={right:-3,left:"auto"},g={left:3},v=e("div",{style:{...s.before,...u?m:d},class:"scrollbar--before"}),y=e("div",{style:{...s.after,...u?d:m},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...u?f:p},class:"scrollbar--start-handle",[Xs]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?g:h}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...u?p:f},class:"scrollbar--end-handle",[Xs]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?h:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[v,x,y,...c])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:Sl.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function Ml({layoutService:e}){return e.meta.isContinuous&&Hs({layoutService:e}).miniChart}function Cl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(hs.TYPE.LINE),l=[...Ds({forceCreate:!0,key:ps.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...Ds({key:ps.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...Ds({key:ps.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...qs({key:ps.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...qs({key:ps.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...zs({key:ps.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...zs({key:ps.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return Ml(e)&&(l.push(...Ds({key:ps.COLLECTION.REDUCED,source:ps.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),l.push(...Ds({key:ps.COLLECTION.REDUCED_PRIMARY,source:ps.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),l.push(...Ds({key:ps.COLLECTION.REDUCED_SECONDARY,source:ps.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),l.push(...qs({key:ps.COLLECTION.REDUCED_STACKED_PRIMARY,source:ps.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===hs.TYPE.BAR)),colorService:i})),l.push(...qs({key:ps.COLLECTION.REDUCED_STACKED_SECONDARY,source:ps.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===hs.TYPE.BAR)),colorService:i}))),l}const Ol=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function Al({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const Tl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:Ol({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:Al({models:e})}},Nl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:Ol({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:Al({models:e})}};function wl({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function kl({viewCache:e,mainMajor:t}){return de(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function Rl({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Ll({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:u}=e.renderer("svg")(),{majorNumeric:c}=a.main,d=l.getStyles(),m={type:"time",data:{field:c},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:c,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>u({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:Rl({viewState:t,viewCache:n,layoutService:o})};return{[ps.SCALE.MAJOR]:de(!0,{},m,{ticks:{level:"outer"}}),[ps.SCALE.MAJOR_INNER]:de(!0,{},m,{ticks:{level:"inner"}})}}function Il({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Ll({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[ps.SCALE.MAJOR]:wl({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[ps.SCALE.MAJOR]:Nl({models:t,environment:i})}:{[ps.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?Nl({models:t,environment:i}):Tl({models:t,environment:i})};return Ml(t)?{...a,[ps.SCALE.REDUCED]:kl({viewCache:r,mainMajor:a[ps.SCALE.MAJOR]})}:a}function Pl({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function ql({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!Ml({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}var Dl={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const zl=["all","labels"];function $l({models:e,flags:t}){const{layoutService:n,dockService:r,seriesModel:i,themeService:o,styleModel:a,animationsModel:s}=e,l=n.getLayoutValue("measureAxes");if(!l||!l.length)return[];const u=o.getStyles(),c=a.query.axis.label.getStyle(),{measureAxes:d}=i.meta;return d.filter((e=>{const t=e.isPrimary?0:1;return zl.some((e=>l[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?ps.COMPONENT.AXIS.MINOR.PRIMARY:ps.COMPONENT.AXIS.MINOR.SECONDARY,renderer:Wa(t),scale:e.scale,layout:{dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock,minimumLayoutMode:Dl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},line:{stroke:u.axis.line.major.color},ticks:{stroke:u.axis.line.major.color},minorTicks:{stroke:u.axis.line.minor.color}},animations:{enabled:s.enabled,trackBy:Da.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:Da.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?r.meta.minor.dock:r.meta.minorSecondary.dock})}})))}var Fl={INACTIVE:.5},jl={LOWER:3,UPPER:13};const Bl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return ke.getAdjustedMaxGlyphCount(t,r,0,"qText")};function _l({models:e,environment:t,flags:n}){const{layoutService:r,dockService:i,styleModel:o,themeService:a,animationsModel:s}=e,l="rtl"===t.options.direction,u=r.getLayoutValue("dimensionAxis"),c=o.query.axis.label.getStyle(),d=Bl({layoutService:r}),{orientation:m}=i.meta.major,p="horizontal"===m,h=p?u.label:"auto",f=a.getStyles(),{auto:g,spacing:v}=r.getLayoutValue("gridLine",{});return{type:"axis",key:ps.COMPONENT.AXIS.MAJOR,renderer:Wa(n),scale:ps.SCALE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:Dl.AXIS.MAJOR[m.toUpperCase()]},settings:{labels:{mode:u.label,tiltAngle:l?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===h?void 0:i.meta.minor.size/4,maxGlyphCount:d,tiltThreshold:d>jl.LOWER&&d<jl.UPPER?1:void 0,fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},line:{show:!g&&0===v,stroke:f.axis.line.major.color},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:Fl.INACTIVE}}}]},animations:{enabled:s.enabled,trackBy:Da.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:Da.axes.compensateForLayoutChanges({isHorizontal:p})}}}function Vl({models:e,flags:t}){const{dockService:n,styleModel:r,themeService:i,layoutService:o,animationsModel:a}=e,{orientation:s}=n.meta.major,l=r.query.axis.label.getStyle(),u=i.getStyles(),{auto:c,spacing:d}=o.getLayoutValue("gridLine",{});return{type:"axis",key:ps.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:Wa(t),scale:ps.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:Dl.AXIS.MAJOR[s.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{show:!c&&0===d,stroke:u.axis.line.major.color}},animations:{enabled:a.enabled,trackBy:Da.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:Da.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Hl({models:e,environment:t,flags:n}){const{layoutService:r}=e,i=r.getLayoutValue("dimensionAxis");if(!i)return[];const{show:o}=i;return"none"===o||"title"===o?[]:r.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:i,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,u="bottom"===n.meta.major.dock?0:1,c=r.getStyles(),d=i.query.axis.label.getStyle(),m=s?1:0,{auto:p,spacing:h}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Dl.AXIS.MAJOR[l]},preferredSize:()=>({size:2*parseFloat(d.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:s?"end":"start",label:{align:u,justify:m},guideLine:{major:{justify:m},minor:{align:u}},line:{show:!1}},style:{label:{fontFamily:d.fontFamily,fontSize:d.fontSize,fill:d.fill},majorGuideLine:{stroke:c.axis.line.major.color},minorGuideLine:{stroke:c.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:Da.axes.trackBy({isTime:!0}),compensateForLayoutChanges:Da.axes.compensateForLayoutChanges({isTime:!0})}};return[de(!0,{},f,{key:ps.COMPONENT.AXIS.TIME_INNER,scale:ps.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!p&&0===h}},style:{majorGuideLine:{stroke:c.axis.line.minor.color},minorGuideLine:{stroke:c.axis.line.major.color},line:{stroke:c.axis.line.major.color}}}),de(!0,{},f,{key:ps.COMPONENT.AXIS.TIME_OUTER,scale:ps.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):r.meta.isContinuous?[Vl({models:e,flags:n})]:[_l({models:e,environment:t,flags:n})]}const Ul=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,Yl=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function Wl({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:1},...t},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)?0:Fl.INACTIVE},...n}}}]}}var Xl="max",Gl="min";function Kl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Jl=(e,t)=>`${e}-${t.id}`,Zl=4,Ql=12,eu=4;function tu({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${eu}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(ps.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(Zl,Math.min(Ql,l));o.size=`${"bar"===i?2*u:u}px`}return o.size}}const nu=({series:e,isPrimary:t,seriesModel:n})=>e?"qMeasureInfo/0"===e.ref:t?n.meta.primarySeries.some((e=>"qMeasureInfo/0"===e.ref)):n.meta.secondarySeries.some((e=>"qMeasureInfo/0"===e.ref)),{isDark:ru}=Pt;const iu=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,animationsModel:c}=t,d=a.getColor(),{fill:m,marker:p}=n.options,{isContinuous:h}=i.meta,f="rtl"===r.options.direction,{orientation:g}=s.meta.major,v="horizontal"===g,y=(n.isPrimary?l:u).query.getExtrema(),b=({end:e})=>{const{value:t}=e;return Kl(t,y)},x=Jl(ps.COMPONENT.MARKER,n);return{type:"point",key:x,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[v?"x":"y"]:{scale:ps.SCALE.MAJOR,fn:Yl({layoutService:i,seriesModel:o,rtl:f,orientation:g}),ref:h?"major":void 0},[v?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:m||"bar"===p?d:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||b(e.datum)?0:1},stroke:e=>{const t=d(e);return m?ru(t)?function(e){return it(e).brighter(.5).toString()}(t):function(e){return it(e).darker().toString()}(t):t},size:tu({chart:e,layoutService:i,dockService:s,markerKey:x,markerType:p}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:p,horizontal:v,rtl:f})},brush:Wl({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||b(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||b(e.data)?0:Fl.INACTIVE}}}),animations:{enabled:c.enabled,isMainComponent:nu({series:n}),trackBy:Da.markers.trackBy,compensateForLayoutChanges:Da.markers.compensateForLayoutChanges}}};function ou({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(ps.SCALE.MAJOR),u=s(ps.SCALE.COLOR),c=t&&i?[...a.points].reverse():a.points,d=c.reduce(((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t}),[]),m="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),p=d.map(m),h=Math.min(...p),f=Math.max(...p)-h,g=0===f?1:f,v=p.map(((e,t)=>0===t?0:t===p.length-1?1:(e-h)/g)),y=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=n?o||r:u(o)||r,s=0===t,l=t===d.length-1,c=v[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))y[t-1].virtual||y.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?y.push({color:a,offset:s?0:Math.max(0,parseFloat((c-(c-v[t-1])/2).toFixed(5)))}):y.push({color:a,offset:c});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?y.push({color:a,offset:l?1:Math.max(0,parseFloat((c+(v[t+1]-c)/2).toFixed(5)))}):y.push({color:a,offset:c})}}const b=y.reduce(((e,t,n)=>{if(t.virtual){const t=y[n-1],r=y[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function au({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:u,nil:c}=i.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return i.getColor();if("measure"===l&&"categorical"===u)return i.getColor();const m=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?ou({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):i.getColor();const p=r.getLayoutValue("color",{}),h=!p.auto&&"byExpression"===p.mode,f=!!p.colorExpression;if(h&&!f)return c;const g=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex;return s||!g?ou({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(ps.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/c))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(ps.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),u=Math.min(...l),c=Math.max(...l),d=t?Math.min(0,u):u,m=(t?Math.max(0,c):c)-d,p=0===m?1:m,h=s.domain(),f=[];for(let e=0;e<h.length-1;e++){const t=h[e],r=s(t)||n;f.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/p))});const i=h[e+1];f.push({color:r,offset:Math.min(1,Math.max(0,(i-d)/p))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:d,fallback:c,rtl:a})}const su=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a,animationsModel:s}=e,l="rtl"===t.options.direction,{orientation:u}=o.meta.major,c=Yl({layoutService:r,seriesModel:i,rtl:l,orientation:u});return{key:Jl(ps.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:ps.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:au({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:Wl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:Fl.INACTIVE},inactive:{opacity:Fl.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!nu({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:Da.lines.trackBy,compensateForLayoutChanges:Da.lines.compensateForLayoutChanges}}};var lu={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear"},WIDTH:{FULL:{DEFAULT:2},LESS:{DEFAULT:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function uu({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const cu=3,du=20;function mu({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c,animationsModel:d}=e,m=r.getLayoutValue("dataPoint.show",!1),{orientation:p}=a.meta.major,h="horizontal"===p,f="SPARK"===a.meta.chart.mode,g=i.getColor(),{POINT:v}=lu,y=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=uu({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){const t=e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{});return t}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:u}=r({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:r}),b="rtl"===n.options.direction,x=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:S}=r.meta,E=({end:e})=>{const{value:t}=e;return Kl(t,x)};return{type:"point",key:Jl(ps.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:h?v.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[h?"x":"y"]:{scale:ps.SCALE.MAJOR,fn:Yl({layoutService:r,seriesModel:o,rtl:b,orientation:p}),ref:"major"},sizeLimits:{minPx:cu,maxPx:du},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:g,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||E(e)?0:f?y({item:e,items:t.items})?1:0:m||y({item:e,items:t.items})?1:0}},brush:Wl({layoutService:r,active:{r:e=>e.r+lu.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data))return 0;if(!S||m)return 1;const{event:n,components:r=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;const i=[ps.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ps.COMPONENT.AXIS_OVERLAY.TIME_INNER,ps.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0));return i?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:d.enabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.points.compensateForLayoutChanges}}}const pu=(e,{dataset:t},n=!1)=>{const{value:r,label:i,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return xe.shouldUseFormat(a.raw())?a.formatter()(r):i};function hu({chart:e,models:t,environment:n,flags:r,lineSeries:i}){const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,animationsModel:c}=t,d="rtl"===n.options.direction,m=o.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;if(!i.length)return!1;const p=s.query.point.label.getStyle();return{type:"point-label",key:ps.COMPONENT.POINT_LABEL,renderer:Wa(r),layout:{displayOrder:2,minimumLayoutMode:Dl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>pu(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:i.map((e=>({key:`${ps.COMPONENT.POINT}-${e.id}`,labels:!0,lines:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(i.find((e=>e.id===t)).isPrimary?l:u).query.getExtrema();return!Kl(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(ps.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,fill:p.fill},animations:{enabled:c.enabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.labels.compensateForLayoutChanges}}}const fu=({chart:e,models:t,environment:n,flags:r,markerSeries:i})=>{const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,animationsModel:c}=t,d="rtl"===n.options.direction,m=s.query.marker.label.getStyle(),p=o.getLayoutValue("dataPoint");return!(null==p||!p.showMarkerLabels)&&(!!i.length&&{type:"point-label",key:ps.COMPONENT.MARKER_LABEL,renderer:Wa(r),layout:{displayOrder:2,minimumLayoutMode:Dl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>pu(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:i.map((e=>({key:`${ps.COMPONENT.MARKER}-${e.id}`,labels:!0,lines:!1,fixed:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(i.find((e=>e.id===t)).isPrimary?l:u).query.getExtrema();return!Kl(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(ps.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},animations:{enabled:c.enabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.labels.compensateForLayoutChanges}})},gu=({chart:e,dock:t})=>{let n=t;const r=e.component(`${ps.COMPONENT.SLICED_HAT}-${Xl}`),i=e.component(`${ps.COMPONENT.SLICED_HAT}-${Xl}-${hs.AXIS.PRIMARY}`),o=e.component(`${ps.COMPONENT.SLICED_HAT}-${Xl}-${hs.AXIS.SECONDARY}`);return r?n=`@${ps.COMPONENT.SLICED_HAT}-${Xl}`:i?n=`@${ps.COMPONENT.SLICED_HAT}-${Xl}-${hs.AXIS.PRIMARY}`:o&&(n=`@${ps.COMPONENT.SLICED_HAT}-${Xl}-${hs.AXIS.SECONDARY}`),n},vu=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${ps.COMPONENT.SLICED_HAT}-${Xl}`&&e!==`@${ps.COMPONENT.SLICED_HAT}-${Xl}-${hs.AXIS.PRIMARY}`&&e!==`@${ps.COMPONENT.SLICED_HAT}-${Xl}-${hs.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${ps.COMPONENT.SLICED_HAT}-${Gl}`&&e!==`@${ps.COMPONENT.SLICED_HAT}-${Gl}-${hs.AXIS.PRIMARY}`&&e!==`@${ps.COMPONENT.SLICED_HAT}-${Gl}-${hs.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function yu({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(c&&"top"===e)return!1;if(!c&&e===(u?"left":"right"))return!1}const m=u?"left":"right";return{type:"label-space",key:ps.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Dl.LABEL_SPACE,dock:gu({chart:e,dock:c?"top":m})},settings:{size:10},preferredSize:()=>{const t=e.component(`${ps.COMPONENT.LINE}-${r[0].id}`);if(null==t||!t.rect)return 0;const n=(c?17:34)/t.rect[c?"height":"width"],i=a.query.getExtrema(),o=e.scale(ps.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=c||u?o:1-o,d=r.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),p=e.scale(ps.SCALE.MINOR.SECONDARY)(m.implicit.line.max),h=c||u?p:1-p,f=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||f&&h<n?10:0}}}const bu={min:"Min",max:"Max"};function xu(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function Su(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function Eu(e,t,n){return xu(e,t,n)||Su(e,t,n)}function Mu(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function Cu(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function Ou(e,t){return Mu(e,t)||Cu(e,t)}function Au({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${bu[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Xl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Xl?!Mu(r,e):!Cu(r,e)}({extrema:e,type:t}))}var Tu=Object.freeze({__proto__:null,isMaxOutOfBounds:Mu,isMinOutOfBounds:Cu,isOutOfBounds:Ou,isSegmentMaxOutOfBounds:xu,isSegmentMinOutOfBounds:Su,isSegmentOutOfBounds:Eu,shouldShowOob:Au});const Nu={min:"Min",max:"Max"},wu=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:m,seriesModel:p,themeService:h,fieldModel:f,animationsModel:g}=t,v="rtl"===o.options.direction,{dock:y,opposite:b,orientation:x}=s.meta.major,S=l.query.getExtrema(),E=u.query.getExtrema(),M=a===Xl,{isBarSeriesGrouped:C}=m.meta,O=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===Xl?n:r;const o=e.component(`${ps.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.PRIMARY}`),s=e.component(`${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.SECONDARY}`),l=e.component(ps.COMPONENT.LABEL_SPACE),u=e.component(`${ps.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${ps.COMPONENT.BAR_OOB}-${t}-${hs.AXIS.PRIMARY}`),d=e.component(`${ps.COMPONENT.BAR_OOB}-${t}-${hs.AXIS.SECONDARY}`);return o?i=`@${ps.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.PRIMARY}`:s?i=`@${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.SECONDARY}`:u||c||d?l&&t===Xl?i=`@${ps.COMPONENT.LABEL_SPACE}`:u?i=`@${ps.COMPONENT.BAR_OOB}-${t}`:c?i=`@${ps.COMPONENT.BAR_OOB}-${t}-${hs.AXIS.PRIMARY}`:d&&(i=`@${ps.COMPONENT.BAR_OOB}-${t}-${hs.AXIS.SECONDARY}`):l&&t===Xl&&(i=`@${ps.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:b,dock:y}),A=Yl({layoutService:m,seriesModel:p,rtl:v,orientation:x}),T=r.concat(n);if(!T.length)return!1;const N=M?S.implicit.bar.max:S.implicit.bar.min,w=Number(N.toFixed(13));if(!C&&i.length&&Tu[`is${Nu[a]}OutOfBounds`](w,S))return!1;if(!S.meta.hasExplicit&&!E.meta.hasExplicit)return!1;const k=M?"max":"min",R=Math[k](Number(S.implicit.line[k].toFixed(13)),Number(S.implicit.marker[k].toFixed(13))),L=Math[k](Number(E.implicit.line[k].toFixed(13)),Number(E.implicit.marker[k].toFixed(13))),I=T.filter((e=>e.isPrimary)),P=T.filter((e=>!e.isPrimary)),q=I.length>0,D=P.length>0,{major:z,majorNumeric:$}=f.main,F=e=>"NaN"!==e.qNum?e.qNum:0,j=m.meta.isContinuous?$:z;return{type:"data-out-of-bounds-marker",key:`${ps.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:O,minimumLayoutMode:Dl.OUT_OF_BOUNDS_MARKER},data:{extract:T.map((({ref:e,typeIndex:t,options:n})=>({field:z,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?F:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:M?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:M?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:I,secondarySeries:P,orientation:x,rtl:v,major:{scale:ps.SCALE.MAJOR,fn:A},markerOffset:vu({dockPosition:O,orientation:x,rtl:v})},brush:Wl({layoutService:m}),show:()=>{if(M){if(q&&R>c.query.getMax())return!0;if(D&&L>d.query.getMax())return!0}if(!M){if(q&&R<c.query.getMin())return!0;if(D&&L<d.query.getMin())return!0}return!1},style:{fill:h.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:Da.lineOobs.compensateForLayoutChanges}}},ku={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Ru({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=O(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${ps.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=ku[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=ku[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Lu=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Iu(e){return Math.min(Math.max(0,e),1)}const Pu=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:m,animationsModel:p}=t,{isContinuous:h,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:v}=o.meta,y=e=>e.datum.start?e.datum.start.value:e.scale.min(),b=i?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY,x=i?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const S=f?{scale:x,start:{ref:"start",fn:e=>{const t=y(e);return Iu(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:y(e))(e);return Iu(e.scale(t))}}}:{scale:x,start:{ref:"start",fn:e=>{const t=y(e);return Iu(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?y(e):e.datum.end.value;return Iu(e.scale(n))}}},E=(i?d:m).query.getExtrema(),M=f?({start:e,end:t})=>Eu(e.value,t.value,E):({end:e})=>Ou(e.value,E);return{type:"box",key:`${ps.COMPONENT.BAR}-${b}`,data:{filter:(()=>{if(f)return;const e=l.query.series(hs.TYPE.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?i?ps.COLLECTION.STACKED_PRIMARY:ps.COLLECTION.STACKED_SECONDARY:i?ps.COLLECTION.PRIMARY:ps.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:ps.SCALE.MAJOR,fn:Ul({layoutService:o,axis:b}),ref:h?{start:"major",end:"major"}:void 0},minor:S,box:{width:Lu({isContinuous:h,isBarSeriesGrouped:g,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:v}),minWidthPx:h?Ru({chart:e,models:t,viewState:n,viewCache:r,axis:b}):void 0,fill:s.getColor(),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t;return!0===(null===(t=e.datum)||void 0===t||null===(t=t.null)||void 0===t?void 0:t.value)||M(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:Wl({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||M(e.data)?0:Fl.INACTIVE}}}),animations:{enabled:p.enabled,isMainComponent:nu({isPrimary:i,seriesModel:l}),trackBy:Da.bars.trackBy,compensateForLayoutChanges:Da.bars.compensateForLayoutChanges}}},qu=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:h}=o.meta,f=i?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY,g=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${ps.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:i?ps.COLLECTION.STACKED_TOTAL_PRIMARY:ps.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:ps.SCALE.MAJOR,fn:Ul({layoutService:o,axis:f}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Lu({isContinuous:m,isBarSeriesGrouped:p,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:h}),minWidthPx:m?Ru({chart:e,models:t,viewState:n,viewCache:r,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Du(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,i=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map((e=>{const t=i.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Pt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):i.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:t,isHorizontal:n})})),label:t.label}}function zu(e,t,n,r){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const $u=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!i||!o&&!!r},Fu=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!!i&&(!!o||!1!==r)};function ju(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}const Bu=({models:e,environment:t,flags:n,isPrimary:r})=>{const{layoutService:i,seriesModel:o,styleModel:a,themeService:s,animationsModel:l}=e,{meta:u}=i,{isBarSeriesStacked:c}=u,d="rtl"===t.options.direction,m=s.getStyles(),p=a.query.bar.label.getStyle(),h=e.layoutService.getLayoutValue("dataPoint",{}),f=r?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY;if(!(r?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!$u(h,u))return!1;let g;!c&&(g=c?1:0);const v={label:e=>pu(e.data,e,c),simplifiedPlacements:ju(g,0===g?1:0,c?.5:1,u.isContinuous),style:m.label.value},y=[Du(e,v)],b={component:`${ps.COMPONENT.BAR}-${f}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>zu(t.data.end.value,e.dockService.meta.minor.orientation,d,0),labels:y,fontSize:parseInt(p.fontSize,10),fontFamily:p.fontFamily}}},x=[b];return{type:"labels",key:`${ps.COMPONENT.BAR_LABEL}-${f}`,renderer:Wa(n),layout:{minimumLayoutMode:Dl.VALUE_LABEL},settings:{sources:x},animations:{enabled:l.enabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.labels.compensateForLayoutChanges}}};function _u(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function Vu({chart:e,models:t,environment:n,flags:r,isPrimary:i}){const{meta:o}=t.layoutService,a="rtl"===n.options.direction,s=t.themeService.getStyles(),l=t.styleModel.query.bar.label.getStyle(),u=t.layoutService.getLayoutValue("dataPoint",{}),c=i?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY;if(0===(i?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Fu(u,o))return!1;const d=!$u(u,o),m=l.useContrastColor,p=e.formatter(i?ps.FORMATTER.PRIMARY:ps.FORMATTER.SECONDARY)||(e=>e),h=e=>p(e),f={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":h(e.data.sumOfPositives.value),simplifiedPlacements:_u("outside",d,m,o.isContinuous),style:s.label.value},g={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":h(e.data.sumOfNegatives.value),simplifiedPlacements:_u("opposite",d,m,o.isContinuous),style:s.label.value},v=[Du(t,f),Du(t,g)];return{type:"labels",key:`${ps.COMPONENT.STACK_BAR_LABEL}-${c}`,renderer:Wa(r),layout:{displayOrder:2,minimumLayoutMode:Dl.VALUE_LABEL},settings:{sources:[{component:`${ps.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>zu(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,a),labels:v,fontSize:parseInt(l.fontSize,10),fontFamily:l.fontFamily}}}]},animations:{enabled:t.animationsModel.enabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.labels.compensateForLayoutChanges}}}var Hu=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const Uu={min:"Min",max:"Max"};function Yu({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:p,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:f}=a.meta,g=m?qu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Pu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),v=o?l.query.getExtrema():u.query.getExtrema(),y=n===Xl,b=o?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${Uu[t]}`]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!Hu[`has${Uu[t]}Hat`](i,e)}(v,n,y)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${Uu[t]}`]&&r(e.explicit[t])}(v,n,y))return!1;let x="end";m&&(x=y?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.PRIMARY}`),a=e.component(`${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:y?s.meta.minor.end:s.meta.minor.start}),M={type:"box-sliced-hat",key:`${ps.COMPONENT.SLICED_HAT}-${n}-${b}`,layout:{dock:E},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:de({},g.settings.box,{fill:m?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[x].value);return y?n>t:n<t},width:Lu({isContinuous:p,isBarSeriesGrouped:h,styleModel:c,discreteModel:d,isBarSeriesStackedInBothAxis:f}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:Wl({layoutService:a})};return M}const Wu={min:"Min",max:"Max"},Xu={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Gu({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c,animationsModel:d}=t,{end:m,start:p}=s.meta.minor,{isBarSeriesStacked:h}=a.meta,f=h?qu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Pu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),g=o?l.query.getExtrema():u.query.getExtrema(),v=n===Xl?g.implicit.bar.max:g.implicit.bar.min,y=Number(v.toFixed(13)),b=o?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY;if(!f)return!1;if(!Tu[`is${Wu[n]}OutOfBounds`](y,g))return!1;const x=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===Xl?n:r;const a=e.component(ps.COMPONENT.LABEL_SPACE),s=e.component(`${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.PRIMARY}`),l=e.component(`${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.SECONDARY}`),u=e.component(`${ps.COMPONENT.BAR_OOB}-${t}-${hs.AXIS.PRIMARY}`),c=e.component(`${ps.COMPONENT.BAR_OOB}-${t}-${hs.AXIS.SECONDARY}`);return s?o=`@${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.PRIMARY}`:l?o=`@${ps.COMPONENT.SLICED_HAT}-${t}-${hs.AXIS.SECONDARY}`:u&&c&&!i?o=`@${ps.COMPONENT.BAR_OOB}-${t}-${hs.AXIS.PRIMARY}`:a&&t===Xl&&(o=`@${ps.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:m,start:p,isPrimary:o});let S="end";h&&(S=n===Xl?"sumOfPositives":"sumOfNegatives");const E={type:"box-out-of-bounds",key:`${ps.COMPONENT.BAR_OOB}-${n}-${b}`,layout:{dock:x},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:Te.getDockValue(n===Xl?m:p),oob:de({},f.settings.box,{fill:c.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=h&&0===e.datum[S].value,i=Tu[`is${Wu[n]}OutOfBounds`](e.datum[S].value,g,n),o=(!r||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Xu[n]].value;return 0!==i&&Tu[`is${Wu[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:S,extrema:g}))&&i;return o}})},brush:Wl({layoutService:a}),animations:{enabled:d.enabled,compensateForLayoutChanges:Da.barOobs.compensateForLayoutChanges}};return E}function Ku(e){return Math.min(Math.max(0,e),1)}const Ju=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(r?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY),p=r?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY,h=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Xl;if(!Au({extrema:h,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e),y={type:"box",key:`${ps.COMPONENT.GHOST_BAR_OOB}-${n}-${p}`,data:{filter:(()=>{if(l)return;const e=a.query.series(hs.TYPE.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?ps.COLLECTION.STACKED_TOTAL_PRIMARY:ps.COLLECTION.STACKED_TOTAL_SECONDARY:r?ps.COLLECTION.PRIMARY:ps.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:ps.SCALE.MAJOR,fn:Ul({layoutService:s,axis:p}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:r?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Ku(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return Ku(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return Ku(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return Ku(e.scale(t))}}},box:{width:Lu({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=f?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:m.max();return f?n>m.max():n<m.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return y};function Zu(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Qu=({chart:e,models:t,type:n,environment:r,flags:i,isPrimary:o})=>{const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,seriesModel:d,themeService:m,animationsModel:p}=t,h=m.getStyles(),f=c.query.bar.label.getStyle(),{meta:g}=a,{isBarSeriesStacked:v}=g,y=e.formatter(o?ps.FORMATTER.PRIMARY:ps.FORMATTER.SECONDARY),b=a.getLayoutValue("dataPoint",{}),x="horizontal"===s.meta.major.orientation,S="rtl"===r.options.direction;if(!(o?d.meta.primaryBarSeriesCount:d.meta.secondaryBarSeriesCount)||!v&&!$u(b,g)||v&&!Fu(b,g))return!1;const E=o?l.query.getExtrema():u.query.getExtrema();if(!E.meta.hasExplicit)return!1;const M=n===Xl?E.implicit.bar.max:E.implicit.bar.min;if(!(n===Xl?Mu(M,E):Cu(M,E)))return!1;let C=e=>pu(e.data,e);g.isBarSeriesStacked&&(C=n===Xl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(Mu(e.data.sumOfNegatives.value,E)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return y?y(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(Cu(e.data.sumOfPositives.value,E)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return y?y(t):t}return""});const O={label:C,simplifiedPlacements:Zu("outside",0,g.isContinuous,x,S),style:h.label.value},A={label:C,simplifiedPlacements:Zu("opposite",0,g.isContinuous,x,S),style:h.label.value},T=[Du(t,O),Du(t,A)],N=o?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY,w="horizontal"===s.meta.major.orientation?"down":"right",k=[{component:`${ps.COMPONENT.GHOST_BAR_OOB}-${n}-${N}`,selector:"rect",strategy:{type:"bar",settings:{direction:w,labels:T,fontSize:parseInt(f.fontSize,10),fontFamily:f.fontFamily}}}];return{key:`${ps.COMPONENT.BAR_OOB_LABEL}-${n}-${N}`,type:"labels",renderer:Wa(i),layout:{minimumLayoutMode:Dl.VALUE_LABEL},settings:{sources:k},animations:{enabled:p.enabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.labels.compensateForLayoutChanges}}},ec=({chart:e,models:t,viewState:n,viewCache:r})=>[Pu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Pu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],tc=({chart:e,models:t,viewState:n,viewCache:r})=>[qu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),qu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],nc=({chart:e,models:t,environment:n,flags:r})=>{const i=Vu({chart:e,models:t,environment:n,flags:r,isPrimary:!0}),o=Vu({chart:e,models:t,environment:n,flags:r,isPrimary:!1});return[Bu({models:t,environment:n,flags:r,isPrimary:!0}),Bu({models:t,environment:n,flags:r,isPrimary:!1}),i,o]},rc=({chart:e,models:t,viewCache:n,viewState:r})=>[Yu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Yu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Yu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Yu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],ic=({chart:e,models:t,viewCache:n,viewState:r})=>[Gu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Gu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Gu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Gu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],oc=({chart:e,models:t})=>[Ju({chart:e,models:t,type:"max",isPrimary:!0}),Ju({chart:e,models:t,type:"min",isPrimary:!0}),Ju({chart:e,models:t,type:"max",isPrimary:!1}),Ju({chart:e,models:t,type:"min",isPrimary:!1})],ac=({chart:e,models:t,environment:n,flags:r})=>[Qu({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!0}),Qu({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!0}),Qu({chart:e,models:t,type:"max",environment:n,flags:r,isPrimary:!1}),Qu({chart:e,models:t,type:"min",environment:n,flags:r,isPrimary:!1})],sc=({chart:e,environment:t,flags:n,models:r,viewState:i,viewCache:o})=>{const{seriesModel:a}=r,s=a.query.series(hs.TYPE.BAR).slice(-1),l=a.query.series(hs.TYPE.LINE),u=a.query.series(hs.TYPE.MARKER);return[...ec({chart:e,models:r,viewState:i,viewCache:o}),...tc({chart:e,models:r,viewState:i,viewCache:o}),...l.map((e=>su({models:r,environment:t,series:e}))),...l.map((e=>mu({models:r,series:e,environment:t}))),...u.map((n=>iu({chart:e,models:r,series:n,environment:t}))),hu({chart:e,models:r,environment:t,flags:n,lineSeries:l}),fu({chart:e,models:r,environment:t,flags:n,markerSeries:u}),...nc({chart:e,models:r,environment:t,flags:n}),...rc({chart:e,models:r,viewCache:o,viewState:i}),...ic({chart:e,models:r,viewCache:o,viewState:i}),...oc({chart:e,models:r}),...ac({chart:e,models:r,environment:t,flags:n}),wu({chart:e,models:r,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"max"}),wu({chart:e,models:r,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"min"}),yu({chart:e,models:r,environment:t,lineSeries:l})]},lc={NONE:0,WIDE:1,NARROW:3};function uc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=r.getLayoutValue("gridLine",{});if(!a&&s===lc.NONE)return!1;const u=i.getStyles(),c=n.meta.primarySeries.length>0;return{key:ps.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Dl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===lc.WIDE)||((e,t)=>t%2==0),stroke:u.grid.line.major.color},minorTicks:{show:!a&&s===lc.NARROW,stroke:u.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(null!=l?l:0)&&c?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:Da.lines.trackBy,compensateForLayoutChanges:Da.lines.compensateForLayoutChanges}}}function cc({models:e}){var t,n;const{primaryExtremumModel:r,primaryTickModel:i,themeService:o,dockService:a,seriesModel:s,secondaryExtremumModel:l,secondaryTickModel:u,layoutService:c,animationsModel:d}=e,m=0===(null!==(t=null===(n=c.getLayoutValue("gridLine",{}))||void 0===n?void 0:n.axis)&&void 0!==t?t:0),p=r.query.getExtrema(),h=l.query.getExtrema();if(!p.meta.includesZero&&!h.meta.includesZero)return!1;return{key:ps.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Dl.GRID_LINE},show:()=>(()=>{const e=s.meta.primarySeries.length>0,t=s.meta.secondarySeries.length>0;return m&&e&&i.query.getMin()<=0&&i.query.getMax()>=0||!m&&t&&u.query.getMin()<=0&&u.query.getMax()>=0})(),lines:{["horizontal"===a.meta.minor.orientation?"x":"y"]:[{value:0,scale:m?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY,line:{stroke:o.getStyles().grid.line.highContrast.color}}]},animations:{enabled:d.enabled,trackBy:Da.lines.trackBy,compensateForLayoutChanges:Da.lines.compensateForLayoutChanges}}}function dc({models:e}){const{layoutService:t,themeService:n,animationsModel:r}=e,{isContinuous:i,isTime:o}=t.meta;if(!i)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:Dl.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:r.enabled,trackBy:Da.lines.trackBy,compensateForLayoutChanges:Da.lines.compensateForLayoutChanges}};return o?[de(!0,{},s,{key:"time-inner-grid",x:{scale:ps.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),de(!0,{},s,{key:"time-outer-grid",x:{scale:ps.SCALE.MAJOR}})]:[de(!0,{},s,{key:"continuous-grid",x:{scale:ps.SCALE.MAJOR},minorTicks:{show:!0}})]}function mc({models:e}){return[uc({models:e}),cc({models:e}),...dc({models:e})]}function pc({models:e,environment:t,actions:n,flags:r}){const{layoutService:i,dockService:o,propertiesModel:a,appModel:s,genericObjectModel:l,selectionService:u,styleModel:c}=e,d=a.query.getProperties(),m=i.getLayoutValue("dimensionAxis");if(!m)return!1;const{show:p}=m;if("all"!==p&&"title"!==p)return!1;const{orientation:h}=o.meta.major,f=c.query.axis.title.getStyle();return{type:"data-title",key:ps.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:Dl.AXIS_TITLE.MAJOR[h.toUpperCase()]},settings:{hyperCube:i.getHyperCube(),hyperCubeDef:d&&d.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:u.getSelectionsObject(),isEnabled:r.isEnabled},style:{fontFamily:f.fontFamily,fontSize:f.fontSize,color:f.color}}}const hc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function fc({models:e,environment:t,actions:n,flags:r}){const{layoutService:i,dockService:o,seriesModel:a,propertiesModel:s,appModel:l,genericObjectModel:u,selectionService:c,styleModel:d}=e,m=s.query.getProperties(),p=i.getLayoutValue("measureAxes");if(!p||!p.length)return[];const h=d.query.axis.title.getStyle(),{measureAxes:f}=a.meta;return f.filter((e=>e.isPrimary?"all"===p[0].show||"title"===p[0].show:"all"===p[1].show||"title"===p[1].show)).map((e=>{const s=i.getHyperCube(),{isPrimary:d}=e,p=a.query.seriesByAxis(d).length>1,f={type:"data-title",key:d?ps.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:ps.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:d?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:Dl.AXIS_TITLE.MINOR},settings:{hyperCube:s,hyperCubeDef:m&&m.qHyperCubeDef,isDimension:!1,explicitItemInfos:hc(a,s.qMeasureInfo,d),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:u,app:l,translator:t.translator,rtl:"rtl"===t.options.direction,selections:c.getSelectionsObject(),skipAttributeExpressions:!0,isEnabled:r.isEnabled},style:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}};return p&&(f.settings.padding="0",f.settings.minWidth="auto"),f}))}function gc({models:e,environment:t,actions:n,flags:r}){return r.isEnabled("IM_5788_DATA_TITLE_REFACTOR")?[]:[pc({models:e,environment:t,actions:n,flags:r}),...fc({models:e,environment:t,actions:n,flags:r})]}function vc({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,appModel:s,genericObjectModel:l,selectionService:u,styleModel:c}=e,d=o.getLayoutValue("dimensionAxis");if(!d)return!1;const{show:m}=d;if("all"!==m&&"title"!==m)return!1;const p=i.getAlternatives(),{orientation:h}=a.meta.major,f=c.query.axis.title.getStyle();return{type:"axis-title",key:ps.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:a.meta.major.dock,minimumLayoutMode:Dl.AXIS_TITLE.MAJOR[h.toUpperCase()]},data:{infos:o.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:s,cache:r,model:l,selections:u.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:f.color,fontFamily:f.fontFamily,fontSize:f.fontSize}}}}function yc({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,seriesModel:s,appModel:l,genericObjectModel:u,selectionService:c,styleModel:d}=e,m=o.getLayoutValue("measureAxes");if(!m||!m.length)return[];const p=i.getAlternatives(),h=d.query.axis.title.getStyle(),{measureAxes:f}=s.meta;return f.filter((e=>e.isPrimary?"all"===m[0].show||"title"===m[0].show:"all"===m[1].show||"title"===m[1].show)).map((e=>{const i=o.getHyperCube(),{isPrimary:d}=e;return{type:"axis-title",key:d?ps.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:ps.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:d?a.meta.minor.dock:a.meta.minorSecondary.dock,minimumLayoutMode:Dl.AXIS_TITLE.MINOR},data:{infos:hc(s,i.qMeasureInfo,d),alternatives:p.measures},resources:{app:l,cache:r,model:u,selections:c.getSelectionsObject(),translator:t.translator},callbacks:{onChange:({fromItem:e,toItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}}}}))}function bc({models:e,environment:t,actions:n,viewCache:r,flags:i}){return i.isEnabled("IM_5788_DATA_TITLE_REFACTOR")?[vc({models:e,environment:t,actions:n,viewCache:r}),...yc({models:e,environment:t,actions:n,viewCache:r})]:[]}function xc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:u,isDiscrete:c,isContinuous:d}=o.meta,m="rtl"===t.options.direction;return!(u&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=Hs({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,p={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Bs({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(p.settings.style="slim",p.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(p.settings.size.thumb={min:4}));const h=a.getStyles();return h.color&&(p.style={standard:{thumb:{"border-color":h.color,opacity:.4},before:{background:h.color,opacity:.1},after:{background:h.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(p.settings.injections=()=>[js({layoutService:e,discrete:n})]),p}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>c,value:Fs.OPTIONS.BAR.value},deviceType:t.deviceType})}function Sc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Pu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY;return a.key=`${ps.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?ps.COLLECTION.REDUCED_STACKED_PRIMARY:ps.COLLECTION.REDUCED_STACKED_SECONDARY:i?ps.COLLECTION.REDUCED_PRIMARY:ps.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?ps.SCALE.MINOR.REDUCED_PRIMARY:ps.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=ps.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function Ec({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(hs.TYPE.LINE).map((r=>{const i=su({models:t,environment:e,series:r});return i.key=Jl(ps.COMPONENT.MINI_CHART.LINE,r),i.data.collection=ps.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=r.isPrimary?ps.SCALE.MINOR.REDUCED_PRIMARY:ps.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=ps.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function Mc({models:e,environment:t}){return e.seriesModel.query.series(hs.TYPE.MARKER).map((n=>{const r=iu({models:e,environment:t,series:n});return r.key=Jl(ps.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=ps.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?ps.SCALE.MINOR.REDUCED_PRIMARY:ps.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=ps.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function Cc({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return Ml(t)?[Sc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Sc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...Ec({environment:i,models:t}),...Mc({models:t,environment:i})]:[]}function Oc({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=Dl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:ps.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:ps.SCALE.MAJOR_INNER,layout:{dock:`@${ps.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:ps.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:ps.SCALE.MAJOR,layout:{dock:`@${ps.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:ps.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:ps.SCALE.MAJOR,layout:{dock:`@${ps.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function Ac({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u,animationsModel:c}=t,d=l.qLocaleInfo,{options:m,theme:p}=n,h="rtl"===m.direction,f=u.query.series(hs.TYPE.BAR).filter((e=>e.isPrimary)),g=u.query.series(hs.TYPE.BAR).filter((e=>!e.isPrimary)),v=u.query.series(hs.TYPE.LINE),y=u.query.series(hs.TYPE.MARKER),b=u.query.all(),x=b.some((e=>e.isPrimary)),S=b.some((e=>!e.isPrimary)),E=x&&S,M={resolveUIColor:o.getPaletteColor},C=c.enabled,O=x?Ua({refLineModel:r,layoutService:i,colorModel:M,dock:E?a.meta.minor.dock:a.meta.minor.opposite,scale:ps.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:ps.FORMATTER.PRIMARY,theme:p,localeInfo:d,rtl:h,key:ps.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],A=S?Ua({refLineModel:r,layoutService:i,colorModel:M,dock:E?a.meta.minor.opposite:a.meta.minor.dock,scale:ps.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:ps.FORMATTER.SECONDARY,theme:p,localeInfo:d,rtl:h,key:ps.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!x&&_a({refLineModel:r,layoutService:i,colorModel:M,dockService:a,chart:e,scale:ps.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:ps.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Dl.REFERENCE_LINE,animationsEnabled:C}),!!S&&_a({refLineModel:r,layoutService:i,colorModel:M,dockService:a,chart:e,scale:ps.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:ps.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Dl.REFERENCE_LINE,animationsEnabled:C}),_a({isDimension:!0,refLineModel:r,layoutService:i,colorModel:M,dockService:a,chart:e,scale:ps.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:ps.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${ps.COMPONENT.BAR}-${hs.AXIS.PRIMARY}`:g.length?`${ps.COMPONENT.BAR}-${hs.AXIS.SECONDARY}`:v.length?`${ps.COMPONENT.LINE}-${v[0].id}`:y.length?`${ps.COMPONENT.MARKER}-${y[0].id}`:`${ps.COMPONENT.BAR}-${hs.AXIS.PRIMARY}`,minimumLayoutMode:Dl.REFERENCE_LINE,animationsEnabled:C}),...O,...A,...Ua({isDimension:!0,refLineModel:r,layoutService:i,colorModel:M,dock:a.meta.major.opposite,scale:ps.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:d,rtl:h,key:ps.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function Tc({layoutService:e}){return!!Ml({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:ps.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Nc(e){return(null==e?void 0:e.type)||hs.TYPE.BAR}function wc({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:u,isGroupedByMeasure:c}=n.meta;if(!s)return!1;const{options:d}=t,m=n.getLayoutValue("color",{}),p=e=>e.filter((e=>Nc(e)===hs.TYPE.LINE)).map((e=>({key:Jl(ps.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),h=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex,f=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:ps.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:p(o.meta.primarySeries),secondary:p(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!f[e]&&h,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function kc({models:{fieldModel:e}}){return{[ps.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[ps.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var Rc={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Lc}=Rc;function Ic({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Lc}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Pc}=Rc,qc=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Pc}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!Ic({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Dc}=Rc,{MAX_NUM_POINTS:zc,DEFAULT_NUM_POINTS:$c,DEFAULT_NUM_LINES:Fc}=Rc,{DEFAULT_NUM_POINTS:jc}=Rc,Bc=({layoutService:e,largeDataService:t})=>{if(!Ic({layoutService:e,largeDataService:t})){const{maxNumPoints:e=jc}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:i=Fc,maxNumPoints:o=$c,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(qc({layoutService:e,largeDataService:t})*r[0]<=o)return r[0];const s=Math.max(1,Math.min(i,r[1])),l=o/s,u=Math.floor(r[0]<=l?l:l/4),c=2*s*(s+1);return a&&(s>Fc||o>$c)?Math.min(u,Math.ceil(zc/c)):u})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Dc}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function _c({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Ic({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Bc({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>qc({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:Bc({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:qc({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Vc(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Hc({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function Uc(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function Yc(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=Uc(),o=Uc();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function Wc(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Xc(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=Yc(e,t,n.qMatrix),i=Wc(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const Gc=2**.5,Kc=1/Gc,Jc=Kc**44;function Zc(e){return e.qIsOtherCell}function Qc({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Zc)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(Zc)||t++})),t}(n)}const ed={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var td={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function nd(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function rd(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=r;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const m={x:c+i,y:i,width:d-2*i,height:t.height-2*i},p=s(`${l[0]}…`).width,h=Math.max(0,m.width-u.width),f=Math.max(0,m.height-u.height),g=o*h,v=a*f;return{show:m.width>=Math.min(p,u.width),text:l,dx:g,dy:v,rect:m,style:n.label,segment:{x:c+g,width:u.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=nd(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:nd(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function id(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=nd(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:nd(i,n.minorGuideLine.strokeWidth),x2:o,y2:nd(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function od(e){return e.filter((e=>e.show)).map((e=>de({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var ad={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=nd(1,t.line.strokeWidth);return{show:n.line.show,x1:nd(0,t.line.strokeWidth),y1:r,x2:nd(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=rd(n,this),this.state.minor=id(r,this)},render(){return[...od([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>de({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),...od(this.state.major.map((e=>e.guideLine))),...od(this.state.minor.map((e=>e.guideLine)))];var e}};function sd(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function ld(e){return e.qTags.indexOf("$qualified")>-1}function ud({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];sd(o,a)?(ld(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function cd({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(i=u.index,r=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function dd({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+16}))),r.clamp(n),i.rangeAndWidth}}}function md({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function pd({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=dd,queryFactory:s=md}={attributesFactory:dd,queryFactory:md}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function hd({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=pd,mapper:a=ud,resolver:s=cd}={metaFactory:pd,mapper:ud,resolver:cd}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:r,scale:i}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=m.resolve(t);return n.set(r,i),i}}}function fd(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const gd=fd(0).getTime();function vd(e){return(e.getTime()-gd)/86400/1e3}const yd=new Date,bd=new Date;function xd(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>xd((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(yd.setTime(+t),bd.setTime(+r),e(yd),e(bd),Math.floor(n(yd,bd))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const Sd=1e3,Ed=6e4,Md=36e5,Cd=864e5,Od=6048e5,Ad=xd((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*Sd)}),((e,t)=>(t-e)/Sd),(e=>e.getUTCSeconds()));Ad.range;const Td=xd((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Sd)}),((e,t)=>{e.setTime(+e+t*Ed)}),((e,t)=>(t-e)/Ed),(e=>e.getMinutes()));Td.range;const Nd=xd((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*Ed)}),((e,t)=>(t-e)/Ed),(e=>e.getUTCMinutes()));Nd.range;const wd=xd((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Sd-e.getMinutes()*Ed)}),((e,t)=>{e.setTime(+e+t*Md)}),((e,t)=>(t-e)/Md),(e=>e.getHours()));wd.range;const kd=xd((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*Md)}),((e,t)=>(t-e)/Md),(e=>e.getUTCHours()));kd.range;const Rd=xd((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ed)/Cd),(e=>e.getDate()-1));Rd.range;const Ld=xd((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Cd),(e=>e.getUTCDate()-1));Ld.range;const Id=xd((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Cd),(e=>Math.floor(e/Cd)));function Pd(e){return xd((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ed)/Od))}Id.range;const qd=Pd(0),Dd=Pd(1),zd=Pd(2),$d=Pd(3),Fd=Pd(4),jd=Pd(5),Bd=Pd(6);function _d(e){return xd((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/Od))}qd.range,Dd.range,zd.range,$d.range,Fd.range,jd.range,Bd.range;const Vd=_d(0),Hd=_d(1),Ud=_d(2),Yd=_d(3),Wd=_d(4),Xd=_d(5),Gd=_d(6);Vd.range,Hd.range,Ud.range,Yd.range,Wd.range,Xd.range,Gd.range;const Kd=xd((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));Kd.range;const Jd=xd((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));Jd.range;const Zd=xd((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));Zd.every=e=>isFinite(e=Math.floor(e))&&e>0?xd((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,Zd.range;const Qd=xd((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));Qd.every=e=>isFinite(e=Math.floor(e))&&e>0?xd((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,Qd.range;const em=1,tm=2,nm=3,rm=4,im=5,om=6;function am({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:n});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,n,r,i,o){function a(e){return Qd.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=Ad.count(e,t),l=Nd.count(e,t),u=kd.count(e,t),c=Ld.count(e,t),d=Vd.count(e,t),m=Jd.count(e,t),p=Qd.count(e,t),h=n/r.second.width-1,f=n/r.minute.width-1,g=n/r.date.width-1,v=n/r.year.width-1,y={type:"year",desc:"year",count:p,interval:Qd.every(1),formatter:r.year.formatter,offset:e=>Qd.offset(e,-1),floor:Qd.floor};if(s<=h)y.type=em,y.desc="second",y.count=s,y.interval=Ad.every(1),y.formatter=r.second.formatter,y.offset=e=>Ad.offset(e,-1),y.floor=Ad.floor;else if(s/2<=h)y.type=em,y.desc="every other second",y.count=s/2,y.interval=Ad.every(2),y.formatter=r.second.formatter,y.offset=e=>Ad.offset(e,-2),y.floor=Ad.floor;else if(s/5<=h)y.type=em,y.desc="every 5 second",y.count=s/5,y.interval=Ad.every(5),y.formatter=r.second.formatter,y.offset=e=>Ad.offset(e,-5),y.floor=Ad.floor;else if(s/15<=h)y.type=em,y.desc="every 15 second",y.count=s/15,y.interval=Ad.every(15),y.formatter=r.second.formatter,y.offset=e=>Ad.offset(e,-15),y.floor=Ad.floor;else if(s/30<=h)y.type=em,y.desc="every 30 second",y.count=s/30,y.interval=Ad.every(30),y.formatter=r.second.formatter,y.offset=e=>Ad.offset(e,-30),y.floor=Ad.floor;else if(l<=f)y.type=tm,y.desc="minute",y.count=l,y.interval=Nd.every(1),y.formatter=r.minute.formatter,y.offset=e=>Nd.offset(e,-1),y.floor=Nd.floor;else if(l/2<=f)y.type=tm,y.desc="every 2 minute",y.count=l/2,y.interval=Nd.every(2),y.formatter=r.minute.formatter,y.offset=e=>Nd.offset(e,-2),y.floor=Nd.floor;else if(l/5<=f)y.type=tm,y.desc="every 5 minute",y.count=l/5,y.interval=Nd.every(5),y.formatter=r.minute.formatter,y.offset=e=>Nd.offset(e,-5),y.floor=Nd.floor;else if(l/10<=f)y.type=tm,y.desc="every 10 minute",y.count=l/10,y.interval=Nd.every(10),y.formatter=r.minute.formatter,y.offset=e=>Nd.offset(e,-10),y.floor=Nd.floor;else if(l/15<=f)y.type=tm,y.desc="every 15 minute",y.count=l/15,y.interval=Nd.every(15),y.formatter=r.minute.formatter,y.offset=e=>Nd.offset(e,-15),y.floor=Nd.floor;else if(l/30<=f)y.type=tm,y.desc="every 30 minute",y.count=l/30,y.interval=Nd.every(30),y.formatter=r.minute.formatter,y.offset=e=>Nd.offset(e,-30),y.floor=Nd.floor;else if(u<=f)y.type=nm,y.desc="hour",y.count=u,y.interval=kd.every(1),y.formatter=r.minute.formatter,y.offset=e=>kd.offset(e,-1),y.floor=kd.floor;else if(u/2<=f)y.type=nm,y.desc="every 2 hour",y.count=u/2,y.interval=kd.every(2),y.formatter=r.minute.formatter,y.offset=e=>kd.offset(e,-2),y.floor=kd.floor;else if(u/3<=f)y.type=nm,y.desc="every 3 hour",y.count=u/3,y.interval=kd.every(3),y.formatter=r.minute.formatter,y.offset=e=>kd.offset(e,-3),y.floor=kd.floor;else if(u/6<=f)y.type=nm,y.desc="every 6 hour",y.count=u/6,y.interval=kd.every(6),y.formatter=r.minute.formatter,y.offset=e=>kd.offset(e,-6),y.floor=kd.floor;else if(u/12<=f||i)y.type=nm,y.desc="every 12 hour",y.count=u/12,y.interval=kd.every(12),y.formatter=r.minute.formatter,y.offset=e=>kd.offset(e,-12),y.floor=kd.floor;else if(c<=g)y.type=rm,y.desc="day",y.count=c,y.interval=Ld.every(1),y.formatter=r.date.formatter,y.offset=e=>Ld.offset(e,-1),y.floor=Ld.floor;else if(c/2<=g)y.type=rm,y.desc="every 2 day",y.count=c/2,y.interval=Ld.every(2),y.formatter=r.date.formatter,y.offset=e=>Ld.offset(e,-2),y.floor=Ld.floor;else if(c/3<=g)y.type=rm,y.desc="every 3 day",y.count=c/3,y.interval=Ld.every(3),y.formatter=r.date.formatter,y.offset=e=>Ld.offset(e,-3),y.floor=Ld.floor;else if(d<=g)y.type=rm,y.desc="week",y.count=d,y.interval=Vd.every(1),y.formatter=r.date.formatter,y.offset=e=>Vd.offset(e,-1),y.floor=Ld.floor;else if(d/2<=g)y.type=rm,y.desc="every 2 week",y.count=d/2,y.interval=Vd.every(2),y.formatter=r.date.formatter,y.offset=e=>Vd.offset(e,-2),y.floor=Ld.floor;else if(m<=g)y.type=im,y.desc="month",y.count=m,y.interval=Jd.every(1),y.formatter=r.date.formatter,y.offset=e=>Jd.offset(e,-1),y.floor=Ld.floor;else if(m/3<=g)y.type=im,y.desc="quarter",y.count=m/3,y.interval=Jd.every(3),y.formatter=r.date.formatter,y.offset=e=>Jd.offset(e,-3),y.floor=Ld.floor;else if(m/6<=g)y.type=im,y.desc="half year",y.count=m/6,y.interval=Jd.every(6),y.formatter=r.date.formatter,y.offset=e=>Jd.offset(e,-6),y.floor=Ld.floor;else if(p<=v)y.type=om,y.desc="year",y.count=p,y.interval=Qd.every(1),y.formatter=r.year.formatter,y.offset=e=>Qd.offset(e,-1),y.floor=Qd.floor;else if(p/2<=v)y.type=om,y.desc="every 2 year",y.count=p/2,y.interval=a(2),y.formatter=r.year.formatter,y.offset=e=>Qd.offset(e,-2),y.floor=Qd.floor;else if(p/5<=v)y.type=om,y.desc="every 5 year",y.count=p/5,y.interval=a(5),y.formatter=r.year.formatter,y.offset=e=>Qd.offset(e,-5),y.floor=Qd.floor;else if(p/10<=v)y.type=om,y.desc="every 10 year",y.count=p/10,y.interval=a(10),y.formatter=r.year.formatter,y.offset=e=>Qd.offset(e,-10),y.floor=Qd.floor;else{const e=Math.max(1,Math.floor(p/v));y.type=om,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=r.year.formatter,y.offset=t=>Qd.offset(t,-e),y.floor=Qd.floor}return y}(s,l,n,t.all(),r,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.floor(s));const m=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:c.formatter}}));let p=[];if(!o&&c.type<=nm){const n=t.getFormat("date"),r=e.ticks(Ld.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(Ld.offset(r[0],-1)),p=(r.length?r:[Ld.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:m,outer:p}}const sm=86400,lm=1440,um={};function cm(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function dm(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=To().domain([fd(l),fd(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let m;m="d3"===d.type?(e,i)=>am({timeScale:c,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:fd(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(um[[t,n,r,r,o]])return um[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=fd(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=r-n,m=t/(i-r),p=m/1440,h=m/sm,f=366*m,g=3*m*30,v=a.second.width/h,y=a.minute.width/p,b=a.date.width/g,x=a.year.width/f;let S,E,M,C=0,O=0,A=null,T=null,N=null,w=null,k=null,R=null;const L={outer:[],inner:[]};for(v<1?(A=1,O=1/sm):v<2?(A=2,O=1/sm*2):v<5?(A=5,O=1/sm*5):v<10?(A=10,O=1/sm*10):v<30?(A=30,O=1/sm*30):y<1?(T=1,O=1/lm):y<2?(T=2,O=1/lm*2):y<5?(T=5,O=1/lm*5):y<10?(T=10,O=.006944444444444445):y<30?(T=30,O=.020833333333333336):y<60?(N=1,O=1/24):y<120?(N=2,O=2/24):y<360?(N=6,O=.25):y<720?(N=12,O=.5):b<1/90?(O=1,w=1):b<2/90?(O=2,w=2):b<7/90?(O=7,w=7):b<31/90?(k=1,O=31):b<1?(k=3,O=90):x<1?(R=1,O=366):x<2?(R=2,O=732):x<5?(R=5,O=1826.25):(R=10,O=3652.5),E=Math.floor((d+n%1)/O);C<i;){M=E+1,S=R?cm("year",[l+E*R,0,1],[l+M*R,0,1],a.year.formatter):k?cm("month",[l,u+E*k,1],[l,u+M*k,1],a.date.formatter):w?cm("day",[l,u,c+E*w],[l,u,c+M*w],a.date.formatter):N?cm("hour",[l,u,c,0+E*N],[l,u,c,0+M*N],a.minute.formatter):T?cm("minute",[l,u,c,0,0+E*T],[l,u,c,0,0+M*T],a.minute.formatter):cm("second",[l,u,c,0,0,0+E*A],[l,u,c,0,0,0+M*A],a.second.formatter),C=vd(S.start),L.inner.push(S);const e=Math.floor(C);if(!(o||R||k||w)){const t={type:"day",start:fd(e),end:fd(e+1),formatter:a.date.formatter,qStart:e};L.outer[L.outer.length-1]&&L.outer[L.outer.length-1].qStart===t.qStart||L.outer.push(t)}E++}return L.min=r,L.max=i,um[[t,n,r,r,o]]=L,L}(n,e,d.min,l,u,"T"===s.qType);const p={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>m(t,n)[a].map((t=>{let n;return n="start"===i?vd(t.start):"end"===i?vd(t.end):(vd(t.start)+vd(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:vd(t.start),end:vd(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return p}const mm=/t+/i;const pm={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function hm(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const fm="continuousPan";var gm={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=ed,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=_c,snapshotFetcherFactory:u=Hc,cacheFetcherFactory:c=Vc,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),p=u({layoutService:t,viewCache:i}),h=c({cache:d}),f=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,r;({initialMin:v,initialMax:y}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",v),i.set("continuousMax",y),i.set("minimiumZoomSpan",(n=v,r=y,Math.max(1e-6,(r-n)*Jc))),g=t.meta.isSnapshot?p:m,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=p.getSnapshotData()),o.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(v,y).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Wc(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Xc(v,y,e))).then((e=>this.updateLayout(e))).catch(f)},fetch:(e,t)=>g.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Wc(e.qArea,r);return{...e,qArea:i,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Xc(e,t,n))).catch(f),fetchFromCache:(e,t)=>h.fetch(e,t).then((n=>Xc(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return de({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return de({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Qc(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=A(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return T(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),p=m-(r>0?Kc:Gc)*m,h=c+p*u,f=d-p*(1-u),g=h<a?a-h:0,v=f>s?f-s:0;t.set("zoom",{min:Math.max(h-v,a),max:Math.min(f+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:fm,pointers:1,threshold:10,enable(r,i){return this.started===fm||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{[`${fm}start`](n){n.preventDefault(),this.started=fm;const{min:i,max:o}=r.get("zoom");this[fm]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${fm}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[fm],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${fm}end`](e){e.preventDefault(),this.started=!1},[`${fm}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:td,timeAxis:ad},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=de(!0,{},t[i],o)})),r}(t,pm,n),{qAxis:i}=r,o=gr(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let u,c,d=[];const m=function(e){return Number.isNaN(+e)?NaN:o(e)};m.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=c.generate(e,n.isDayOrShorter)),d},m.invert=e=>o.invert(e),m.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),m.range=e=>Array.isArray(e)?o.range(e):o.range(),m.norm=e=>(hm(a,m),a.instance(e)),m.normInvert=e=>(hm(a,m),a.instance.invert(e)),m.copy=()=>e(t,n),m.clamp=(e=!0)=>(o.clamp(e),o.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const p=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&mm.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=fd(t[0].data.start),i=fd(t[n-1].data.start);return Ld.count(r,i)/n>=1?o.date:kd.count(r,i)/n>0?o.minute:Nd.count(r,i)/n>0?o.second:o.date},t}(r);return c=dm(o.copy(),r,p),u=hd({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:r.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>p.getFormatFromTicks(d).formatter,m}}};const vm=e=>e.meta.seriesComponentKeys[0],ym=(e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}};function bm({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=gm,{layoutService:s,seriesModel:l}=t,u=vm(l),c=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:u}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter((e=>e.key===ps.COMPONENT.LEGEND_CATEGORICAL));ym(t,e)}if(n.scroll.enabled()){const[e]=i.filter((e=>e.key===u));e&&(c(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const xm="continuousPinchZoom";function Sm({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=gm.interactions.areaPan,{layoutService:l,dockService:u,discreteModel:c,colorService:d,tooltipService:m}=t,p="rtl"===n.options.direction,h=m.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...tl({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:nl({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:c,layoutService:l,dockService:u,rtl:p}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...h.gestures]},v=[bm({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native,h.native];return l.meta.isDiscrete&&(g.gestures.push(...c.interactions.gestures),v.push(c.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:vm(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0},s=gm.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:xm,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{[`${xm}start`](e){a.last=e.scale,e.preventDefault()},[`${xm}move`](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:vm(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:p})),[g,...v]}const Em=({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},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}}}),Mm="lasso",Cm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:Mm,enable(e,n){if(this.started===Mm||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==Mm&&(i.actions.select.emit("start",Mm),this.chart.component(e).emit("lassoStart",t),this.started=Mm)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",Mm),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const Om=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),m=this.chart.component("tooltip"),p="mouse"!==t.pointerType&&m&&m.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(m&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,m,{nodes:n,opts:o,customTooltipModel:e})}else m.emit("show",t,{nodes:d})}else p&&m.emit("hide")}}}};const Am=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const Tm=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>-1!==n.indexOf(e.key))),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function Nm(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:u=!1,multiple:c=!1,toLabel:d,onEdited:m}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>`@${e}`)).join(",")},on:m?{bubbleEnd(){m()}}:{},settings:{brush:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=Tm(e,t,"range");return{interactions:[e.onEdited?Am(e,t):null,r].filter(Boolean),components:[n]}}const wm=/axis|legend/,km=e=>e.some((e=>wm.test(e.type)));function Rm({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${ps.COMPONENT.BAR}-${hs.AXIS.PRIMARY}`,`${ps.COMPONENT.BAR}-${hs.AXIS.SECONDARY}`,...n.query.series(hs.TYPE.MARKER).map((e=>Jl(ps.COMPONENT.MARKER,e))),...n.query.series(hs.TYPE.LINE).map((e=>Jl(ps.COMPONENT.POINT,e))),ps.COMPONENT.AXIS.MAJOR,ps.COMPONENT.AXIS_OVERLAY.TIME_INNER,ps.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ps.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ps.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[ps.COMPONENT.AXIS.MAJOR,ps.COMPONENT.AXIS_OVERLAY.TIME_INNER,ps.COMPONENT.AXIS_OVERLAY.TIME_OUTER,ps.COMPONENT.AXIS_OVERLAY.CONTINUOUS,ps.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]}},l={actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>km(e)?0:3,debouncer:A,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[Om(e,t)],components:[]}}(s,l)}function Lm({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,ps.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[Tm(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[ps.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const Im={components:[],interactions:[]};function Pm({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&Nm({eventName:"minorRange",key:"minor-range-brush",targets:[ps.COMPONENT.AXIS.MINOR.PRIMARY,`${ps.COMPONENT.BAR}-${hs.AXIS.PRIMARY}`,...i.query.series(hs.TYPE.MARKER).filter((e=>e.isPrimary)).map((e=>Jl(ps.COMPONENT.MARKER,e))),...i.query.series(hs.TYPE.LINE).filter((e=>e.isPrimary)).map((e=>Jl(ps.COMPONENT.POINT,e)))],fillTargets:[ps.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:ps.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Im,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&Nm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[ps.COMPONENT.AXIS.MINOR.SECONDARY,`${ps.COMPONENT.BAR}-${hs.AXIS.SECONDARY}`,...i.query.series(hs.TYPE.MARKER).filter((e=>!e.isPrimary)).map((e=>Jl(ps.COMPONENT.MARKER,e))),...i.query.series(hs.TYPE.LINE).filter((e=>!e.isPrimary)).map((e=>Jl(ps.COMPONENT.POINT,e)))],fillTargets:[ps.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:ps.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Im,a=Lm({actions:e,models:n})||Im,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:i,seriesModel:o}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[ps.COMPONENT.AXIS_OVERLAY.TIME_INNER,ps.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[ps.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return Nm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${ps.COMPONENT.BAR}-${hs.AXIS.PRIMARY}`,`${ps.COMPONENT.BAR}-${hs.AXIS.SECONDARY}`,...o.query.series(hs.TYPE.MARKER).map((e=>Jl(ps.COMPONENT.MARKER,e))),...o.query.series(hs.TYPE.LINE).map((e=>Jl(ps.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?ps.SCALE.MAJOR_INNER:ps.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(ps.FORMATTER.PRIMARY),o=t.scale(ps.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||Im,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[i]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!i)return!1;const s=`${ps.SCALE.COLOR}Range`,{type:l,key:u}=i,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&Nm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||Im;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function qm({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};const o={key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=Em(n);return{interactions:[Cm(n,t)],components:[r]}}(o,{actions:e})}function Dm({chart:e,chartModel:t,colorService:n,context:r,resources:i,viewCache:o,scales:a,models:s}){const{layoutService:l,dockService:u,themeService:c,discreteModel:d,seriesModel:m}=s,p={...n,getMain:()=>({getPaletteColor:n.getPaletteColor.bind(n)})},h=[],f=l.getLayoutValue("plugins");if(!Array.isArray(f)||0===f.length)return h;const{allSeries:g,seriesComponentKeys:v}=m.meta,[y]=v;let b;const x=f.map((e=>{if("point"===e.type){const t=g.find((t=>e.measureIndex===t.id));if(t)return{...e,component:t.type,scale:t.scale}}if("line"===e.type){const t=e.points.map((e=>{const t=g.find((t=>e.measureIndex===t.id));return t?{...e,component:t.type,scale:t.scale}:{...e,scale:g[0].scale}}));return{...e,points:t}}return e}));!function(e){e.forEach((e=>{e&&!e.cId&&(e.cId=xe.generateId)}))}(f);const S=[{key:ps.COMPONENT.POINT,lines:!0,labels:!1,labelKeys:[ps.COMPONENT.POINT_LABEL]},{key:ps.COMPONENT.FORECAST_POINT,lines:!0,labels:!1,labelKeys:[ps.COMPONENT.FORECAST_POINT_LABEL]}],E=function(e){const t=[];return e.forEach((e=>{const n=t[t.length-1],r=null==n?void 0:n[0],i=(null==e?void 0:e.type)===(null==r?void 0:r.type),o=(null==e?void 0:e.scale)===(null==r?void 0:r.scale);let a=!1;if("point"===(null==e?void 0:e.type))a=o&&i;else if("line"===(null==e?void 0:e.type)){const t=!(null!=e&&e.showPoints||null!=r&&r.showPoints);a=i&&o&&t}a?n.push(e):t.push([e])})),t}(x);return E.forEach(((n,o)=>{var s;const m=`points-addon-combo-chart-${o}`,f=`lines-addon-combo-chart-${o}`;var v,x,E,M,C;"point"===n[0].type?b=(null===(v=n[0])||void 0===v?void 0:v.scale)||(null===(x=g[0])||void 0===x?void 0:x.scale):b=null!==(E=null===(M=n[0])||void 0===M||null===(M=M.points[0])||void 0===M?void 0:M.scale)&&void 0!==E?E:null===(C=g[0])||void 0===C?void 0:C.scale;switch(null===(s=n[0])||void 0===s?void 0:s.type){case"point":h.push(Qa({chart:e,chartModel:t,discreteModel:d,colorService:p,themeService:c,layoutService:l,dockService:u,flags:i.flags,rtl:r.rtl,majorScale:ps.SCALE.MAJOR,minorScale:b,mainComponentKey:y,data:n,key:m})),S.push({key:m,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":h.push(function({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:i,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:u,data:c,key:d,scales:m={}}){if(!Array.isArray(c)||0===c.length)return!1;const p={resolveUIColor:r.getMain().getPaletteColor},h="horizontal"===o.meta.major.orientation,f=!(!h||!a),{canBeContinuous:g,isContinuous:v}=i.meta,y=i.getLayout(),b=ma.getDimensionValuesInfo({layout:y,canBeContinuous:g,discreteModel:n,layoutService:i}),x=[];c.forEach(((e,t)=>{var n;const r=(null!==(n=null==e?void 0:e.points)&&void 0!==n?n:[]).map(((n,r)=>({...n,lineId:t,style:0===r?e.style:void 0})));x.push(...r)}));const S={},E=[];c.forEach((e=>{var t;return E.push(...(null!==(t=null==e?void 0:e.points)&&void 0!==t?t:[]).map((e=>e.dimensionValue)))})),E.forEach((e=>{b[e]&&(S[e]?(S[e].innerValues=b[e].innerValues,S[e].minOrder=Math.min(S[e].minOrder,b[e].minOrder),S[e].maxOrder=Math.max(S[e].maxOrder,b[e].maxOrder),S[e].isMinOrderOk=S[e].isMinOrderOk||b[e].isMinOrderOk,S[e].isMaxOrderOk=S[e].isMaxOrderOk||b[e].isMaxOrderOk):S[e]={id:b[e].id,dataNode:b[e].dataNode,qText:b[e].qText,innerValues:b[e].innerValues,minOrder:b[e].minOrder,maxOrder:b[e].maxOrder,isMinOrderOk:b[e].isMinOrderOk,isMaxOrderOk:b[e].isMaxOrderOk},S[e].numInnerValues=(S[e].maxOrder||0)-(S[e].minOrder||0)+1)}));const M=x[0];x.forEach((t=>{var n,r,o;const a=Ga({point:t,dimensionValueInfo:S,layoutService:i}),s=null==t?void 0:t.scale,l=null==M?void 0:M.scale,u=null==i||null===(n=i.meta)||void 0===n?void 0:n.isButterfly,c=null==i||null===(r=i.meta)||void 0===r?void 0:r.isStacked,d=null===(o=S[t.dimensionValue])||void 0===o?void 0:o.dataNode;let p=a;const h=l&&s&&l!==s,f=u&&1===t.measureIndex,g=c&&Array.isArray(d);if(h)p=function(e,t,n){const r=t.min(),i=t.max(),o=n.min(),a=n.max();return i===r?o:o+(e-r)/(i-r)*(a-o)}(a,m[s]||e.scale(s),m[l]||e.scale(l));else if(f)p=-a;else if(g&&void 0!==t.measureIndex&&Array.isArray(d)){var v;const e=d.slice(0,t.measureIndex+2),n=null===(v=d[t.measureIndex+1])||void 0===v?void 0:v.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);p=e.reduce(((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e}),0)}}t.validMeasureValue=p}));const C={scale:s,fn:({datum:t})=>{var n;const r=e.scale(s),o=t.value.dimensionValue;return v?r("string"==typeof o?""===o?void 0:+o:o):void 0!==S[o]?ma.getScaledPosition({scale:r,value:S[o].id,valueInfo:S[o],size:null===(n=e.component(u))||void 0===n?void 0:n.rect[h?"width":"height"],align:"center",invert:f,layoutService:i,isContinuous:v}):void 0}},O={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"line",data:x,settings:{connect:!0,coordinates:{major:h?C:O,minor:h?O:C,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>{var t,n;return null!==(t=null===(n=e.value.style)||void 0===n?void 0:n.lineCurve)&&void 0!==t?t:"linear"},line:{strokeWidth:({datum:e})=>{var t,n;return null!==(t=null===(n=e.value.style)||void 0===n?void 0:n.lineThickness)&&void 0!==t?t:es},stroke:({datum:e})=>{var t,n;return Xa({colorModel:p,color:null!==(t=e.value.style)&&void 0!==t&&null!==(t=t.lineColor)&&void 0!==t&&t.color?null===(n=e.value.style)||void 0===n?void 0:n.lineColor:{index:-1,color:"#000"}})},strokeDasharray:({datum:e})=>{var t;return null===(t=e.value.style)||void 0===t?void 0:t.lineType}}}},animations:{enabled:t.query.animationsEnabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:d,colorService:p,layoutService:l,dockService:u,rtl:r.rtl,majorScale:ps.SCALE.MAJOR,minorScale:b,mainComponentKey:y,data:n,key:f,scales:a})),n.forEach((n=>{null!=n&&n.showPoints&&null!=n&&n.points?n.points.forEach(((n,o)=>{const a=`points-${o}-for-${f}`;h.push(Qa({chart:e,chartModel:t,discreteModel:d,colorService:p,themeService:c,layoutService:l,dockService:u,flags:i.flags,rtl:r.rtl,majorScale:ps.SCALE.MAJOR,minorScale:n.scale,mainComponentKey:y,data:[n],key:a})),S.push({key:a,lines:!0,labels:!0,duplicates:!0})})):null!=n&&n.points&&S.push({key:f,lines:!0,labels:!1,duplicates:!0,points:n.points})}))}})),h.push(function({layoutService:e,dockService:t,chartModel:n,themeService:r,configs:i,flags:o,cache:a}){if(null==o||!o.isEnabled("TLV_1019_PLUGIN_SYMBOL_LABEL"))return!1;const s=e.getLayoutValue("plugins"),{rtl:l}=t.config,{orientation:u}=t.meta.major,{isOneDimensional:c,isStacked:d}=e.meta,m=r.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:Wa(o),settings:{all:!0,cache:a,configs:i,label:e=>{var t,n,r,i;return null!==(t=e.value)&&void 0!==t&&null!==(t=t.label)&&void 0!==t&&t.value?null===(i=e.value)||void 0===i||null===(i=i.label)||void 0===i?void 0:i.value:d?null===(n=e.point)||void 0===n?void 0:n.label:null===(r=e.end)||void 0===r?void 0:r.label},lineId:({data:e})=>{for(let t=0;t<s.length;t++){const n=s[t];switch(n.type){case"point":if(n.cId===e.value.cId)return n.cId;break;case"line":if(n.points.some((t=>t.cId===e.value.cId)))return n.cId}}return e.value.cId||e.line.value},majorValue:e=>{var t,n;return null!==(t=e.value)&&void 0!==t&&t.dimensionValue?e.value.dimensionValue:c?e.value:null===(n=e.major)||void 0===n?void 0:n.value},orientation:u,pointValue:e=>e.value.validMeasureValue,rtl:l},style:m.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:Da.nonUpdatingNode.trackBy,compensateForLayoutChanges:Da.labels.compensateForLayoutChanges}}}({layoutService:l,dockService:u,chartModel:t,themeService:c,configs:S,flags:i.flags,cache:o})),h}function zm({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:u,pluginService:c}=n,d=n.layoutService.getLayout(),{options:m}=r,p=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:d,options:m}),h=(f={logicalSize:p,minCenterRatio:0},{layoutModes:he.getLayoutModes(),center:void 0!==f.minCenterRatio?{minWidthRatio:f.minCenterRatio,minHeightRatio:f.minCenterRatio}:void 0,logicalSize:f.logicalSize?{align:.5,preserveAspectRatio:!0,...f.logicalSize}:void 0});var f;const g=function({chart:e,models:t,environment:n,flags:r,viewState:i,viewCache:o,actions:a}){const{colorService:s,layoutService:l,dockService:u,tooltipService:c,disclaimerService:d}=t,m=function({environment:e,models:t}){const{translator:n,options:r}=e,{themeService:i,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=i.getStyles();return{key:"disclaimer",type:"disclaimer",layout:{dock:a.alignment},settings:{isRTL:"rtl"===r.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return d.getHasSuppressingDisclaimer()?[m]:[...mc({models:t}),...$l({models:t,flags:r}),...sc({chart:e,models:t,environment:n,flags:r,viewState:i,viewCache:o}),wc({models:t,environment:n}),...Hl({models:t,environment:n,flags:r}),...gc({models:t,environment:n,actions:a,flags:r}),...bc({models:t,environment:n,actions:a,viewCache:o,flags:r}),Ro({viewState:i,viewCache:o,layoutService:l,dockService:u}),...Oc({models:t}),...Ac({chart:e,models:t,environment:n}),xc({models:t,environment:n,viewState:i,viewCache:o}),...s.custom.legendComponents(),Tc(t),...Cc({chart:e,models:t,viewState:i,viewCache:o,environment:n}),...c.getComponents(),m].filter(Boolean)}({chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s}),v=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:i}=n,o=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=Rm({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=Pm({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=qm({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:s,chart:t,models:n,isUnsupportedFeature:l}),y={flags:i},b=function({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Il({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[ps.SCALE.MINOR.PRIMARY]:Pl({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:i}),[ps.SCALE.MINOR.SECONDARY]:Pl({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:i}),[ps.SCALE.MINOR.REDUCED_PRIMARY]:ql({layoutService:o,tickModel:s,dockService:c,environment:i}),[ps.SCALE.MINOR.REDUCED_SECONDARY]:ql({layoutService:o,tickModel:l,dockService:c,environment:i}),...u.custom.wrappedScales()}}({picasso:e,models:n,viewState:o,viewCache:a,environment:r}),x=i.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?Dm({chart:t,chartModel:{query:{animationsEnabled:n.animationsModel.enabled}},colorService:u,context:{},resources:y,viewCache:a,scales:b,models:n}):[],S=c.extendComponents([...g,...v.components,...x]);return{collections:Cl({models:n}),scales:b,components:S,formatters:kc({models:n}),interactions:Sm({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s,selectables:v}),strategy:h,palettes:u.getPalettes()}}const $m=({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})=>{const{width:d,height:m}=i(),[,p]=o((async()=>{if(!(null!=t&&t.update&&n&&r&&s))return;const{colorService:i,discreteModel:o,dockService:p,layoutService:h,refLineModel:f,animationsModel:g,styleModel:v}=n;function y(){t.update({settings:zm({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})})}p.update({width:d,height:m}),i.custom.updateLegend(v),f.update({picasso:e,chart:t,models:n,environment:r,viewState:s,viewCache:l,actions:u});const b=h.getDataPages();g.meta.isSizeChanging=!0,h.setDataPages([]),y(),h.setDataPages(b),h.meta.isContinuous||await o.command.initialize(),y()}),[d,m]);if(p)throw p},Fm=[ps.COMPONENT.AXIS_TITLE.MAJOR,ps.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,ps.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,ps.COMPONENT.GRID_LINE,ps.COMPONENT.ZERO_LINE],jm=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:ps.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Bm=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:ps.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[];const _m={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Vm(e){return _m[e]||e}function Hm(e){return function(t,n,r){let i,o,a,s,l=[],u=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=Vm(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=Vm(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),u&&c()},off(){u=!1,d()},on(){u=!0,0===l.length&&c()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}const Um={d:"M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z"},Ym={d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"},Wm={d:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"},Xm={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"},Gm="m 13.914 4.5 l -7.707 7.707 L 2 8 l 0.707 -0.707 l 3.5 3.5 l 7 -7 Z",Km={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"},Jm={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"},Zm="N",Qm="H",ep="C",tp={N:void 0,H:Um,C:Wm},np=(e,t)=>{switch(e.qGrouping){case Zm:return;case Qm:return{path:Um,tooltip:"Tooltip.dimensions.drilldown",onClick:void 0};case ep:return{path:t?Ym:Wm,tooltip:"Tooltip.dimensions.cyclic",onClick:t?({onError:n})=>{t.getDimension(e.qLibraryId).then((e=>{e.stepCycle?e.stepCycle(1):n()})).catch((()=>null))}:void 0};default:return}};function rp(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=zo.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 ip(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),u=de(!0,{},a),c=u.qHyperCubeDef[r][s],d=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=c.qAttributeDimensions,c.qAttributeDimensions=[],o||(d.qAttributeExpressions=c.qAttributeExpressions,c.qAttributeExpressions=[]),u.qHyperCubeDef[r][s]=d,u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=c,i&&i({oldItem:c,newItem:d,oldProperties:a,newProperties:u,model:e}),rp(e,a,u)}))}function op(e){return e.qGrouping===Zm?e.qFallbackTitle||"":e.title||""}const ap=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))},sp=async(e,t,n,r,i)=>{const o=await ap(e,n),a=n.filter((e=>!o.includes(e.qDef.cId))),s=await Promise.all(a.map((async n=>{const o=await((e,t)=>{if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null))})(n,e),a=await function(e,t,n,r){if(e.qLibraryId)return r?r.qDim.qGrouping===Zm&&r.qDim.qLabelExpression?Promise.resolve(r.qDim.qLabelExpression):Promise.resolve(r.qDim.title):Promise.resolve(n.get("Object.ErrorMessage.MissingDimension"));const i=e.qDef.qLabelExpression;if(i)return t.evaluate(i);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(n,e,r,o),s=(null==o?void 0:o.qDim.qGrouping)||n.qDef.qGrouping,l=tp[s],u=s!==Zm;return{id:n.qDef.cId,icon:l,groupItem:u,selected:!1,title:a,onSelect(e){ip(t,e,n.qDef.cId,"qDimensions",i)}}})));return s};function lp({column:e,dir:t,dock:n,altList:r,model:i,translator:o,app:a,onChange:s,activeInfo:l,allowChangeOfAlternatives:u}){const c=l.qGrouping===Zm,d=l.qGrouping===Qm;return 0===r.length&&c?null:{dir:t,dock:n,getPopoverOptions:async()=>{const t=await(async(e,t,n,r,i="/qHyperCubeDef")=>{switch(e.qGrouping){case Qm:{const n=e.qGroupFallbackTitles.slice(0,e.qGroupPos+1).map(((n,o)=>({id:`${e.cId}-${o}`,title:n,selected:e.qGroupPos===o,onSelect:()=>{t.drillUp(i,r,e.qGroupPos-o)}})));return{id:e.cId,icon:Um,groupItem:!0,title:e.title,selected:!1,children:n}}case ep:{const t=await(null==n?void 0:n.getDimension(e.qLibraryId)),r=null!=t&&t.setActiveField?e.qGroupFallbackTitles.map(((n,r)=>({id:`${e.cId}-${r}`,title:n,selected:e.qGroupPos===r,onSelect:()=>{t.setActiveField(r).catch((()=>null))}}))):[];return{id:e.cId,icon:Wm,groupItem:!0,title:e.title,selected:!1,children:r}}default:return{selected:!0,id:e.cId,title:op(e)}}})(l,i,a,e),n=u?await sp(a,i,r,o,s):[];return(c||d||0===t.children.length)&&0===n.length?[]:[t,...n]}}}function up(e,t,n,r,i="/qHyperCubeDef"){return{breadcrumbs:e.qGrouping===Qm?e.qGroupFallbackTitles.slice(0,e.qGroupPos):[],icon:np(e,r),index:t,locked:!!e.qLocked,text:e.qGrouping===Zm?e.qFallbackTitle:e.qGroupFallbackTitles[e.qGroupPos],popoverText:op(e),...n&&{drillUp(e){n.drillUp(i,t,e)}},id:e.cId}}function cp({activeInfo:e,altList:t,app:n,dir:r,dock:i,model:o,onChange:a,skipAttributeExpressions:s,translator:l,allowChangeOfAlternatives:u}){return 0===t.length?null:{dir:r,dock:i,getPopoverOptions:async()=>{const r=[{id:e.cId,title:e.qFallbackTitle,selected:!0,onSelect:()=>{}}],i=await ap(n,t),c=t.filter((e=>!i.includes(e.qDef.cId))),d=u?await Promise.all(c.map((async e=>{const t=await 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 i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,n,l);return{id:e.qDef.cId,selected:!1,title:t,onSelect(t){ip(o,t,e.qDef.cId,"qMeasures",a,s)}}}))):[];return 0===d.length?[]:[...r,...d]}}}function dp(e,t){return{breadcrumbs:[],index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mp.apply(null,arguments)}var pp={exports:{}};function hp(){}function fp(){}fp.resetWarningCache=hp;pp.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){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,bigint: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:fp,resetWarningCache:hp};return n.PropTypes=n,n}();var gp=te(pp.exports),vp={black:"#000",white:"#fff"},yp="#e57373",bp="#f44336",xp="#d32f2f",Sp="#ff4081",Ep="#f50057",Mp="#c51162",Cp="#7986cb",Op="#3f51b5",Ap="#303f9f",Tp="#64b5f6",Np="#2196f3",wp="#1976d2",kp="#81c784",Rp="#4caf50",Lp="#388e3c",Ip="#ffb74d",Pp="#ff9800",qp="#f57c00",Dp={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"};function zp(){return zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zp.apply(null,arguments)}function $p(e){return $p="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},$p(e)}function Fp(e){return e&&"object"===$p(e)&&e.constructor===Object}function jp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?zp({},e):e;return Fp(e)&&Fp(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(Fp(t[i])&&i in e?r[i]=jp(e[i],t[i],n):r[i]=t[i])})),r}function Bp(e){var t=function(e,t){if("object"!=$p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=$p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$p(t)?t:t+""}function _p(e,t,n){return(t=Bp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vp(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function Hp(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 Math.min(Math.max(t,e),n)}function Up(e){if(e.type)return e;if("#"===e.charAt(0))return Up(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Vp(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Yp(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 Wp(e){var t="hsl"===(e=Up(e)).type?Up(function(e){var t=(e=Up(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*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])),Yp({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 Xp(e,t){return e=Up(e),t=Hp(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Yp(e)}function Gp(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Kp(e,t){if(null==e)return{};var n,r,i=Gp(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Jp=["xs","sm","md","lg","xl"];function Zp(e,t,n){var r;return zp({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),zp({paddingLeft:t(2),paddingRight:t(2)},n,_p({},e.up("sm"),zp({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},_p(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),_p(r,e.up("sm"),{minHeight:64}),r)},n)}var Qp={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:vp.white,default:Dp[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},eh={text:{primary:vp.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:Dp[800],default:"#303030"},action:{active:vp.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function th(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Up(e),t=Hp(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 Yp(e)}(e.main,i):"dark"===t&&(e.dark=function(e,t){if(e=Up(e),t=Hp(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 Yp(e)}(e.main,o)))}function nh(e){var t=e.primary,n=void 0===t?{light:Cp,main:Op,dark:Ap}:t,r=e.secondary,i=void 0===r?{light:Sp,main:Ep,dark:Mp}:r,o=e.error,a=void 0===o?{light:yp,main:bp,dark:xp}:o,s=e.warning,l=void 0===s?{light:Ip,main:Pp,dark:qp}:s,u=e.info,c=void 0===u?{light:Tp,main:Np,dark:wp}:u,d=e.success,m=void 0===d?{light:kp,main:Rp,dark:Lp}:d,p=e.type,h=void 0===p?"light":p,f=e.contrastThreshold,g=void 0===f?3:f,v=e.tonalOffset,y=void 0===v?.2:v,b=Kp(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(e){var t=function(e,t){var n=Wp(e),r=Wp(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,eh.text.primary)>=g?eh.text.primary:Qp.text.primary;return t}var S=function(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;if(!(e=zp({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Vp(4,t));if("string"!=typeof e.main)throw new Error(Vp(5,JSON.stringify(e.main)));return th(e,"light",n,y),th(e,"dark",r,y),e.contrastText||(e.contrastText=x(e.main)),e},E={dark:eh,light:Qp};return jp(zp({common:vp,type:h,primary:S(n),secondary:S(i,"A400","A200","A700"),error:S(a),warning:S(l),info:S(c),success:S(m),grey:Dp,contrastThreshold:g,getContrastText:x,augmentColor:S,tonalOffset:y},E[h]),b)}function rh(e){return Math.round(1e5*e)/1e5}function ih(e){return rh(e)}var oh={textTransform:"uppercase"},ah='"Roboto", "Helvetica", "Arial", sans-serif';function sh(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?ah:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,m=void 0===d?500:d,p=n.fontWeightBold,h=void 0===p?700:p,f=n.htmlFontSize,g=void 0===f?16:f,v=n.allVariants,y=n.pxToRem,b=Kp(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,S=y||function(e){return"".concat(e/g*x,"rem")},E=function(e,t,n,r,o){return zp({fontFamily:i,fontWeight:e,fontSize:S(t),lineHeight:n},i===ah?{letterSpacing:"".concat(rh(r/t),"em")}:{},o,v)},M={h1:E(l,96,1.167,-1.5),h2:E(l,60,1.2,-.5),h3:E(c,48,1.167,0),h4:E(c,34,1.235,.25),h5:E(c,24,1.334,0),h6:E(m,20,1.6,.15),subtitle1:E(c,16,1.75,.15),subtitle2:E(m,14,1.57,.1),body1:E(c,16,1.5,.15),body2:E(c,14,1.43,.15),button:E(m,14,1.75,.4,oh),caption:E(c,12,1.66,.4),overline:E(c,12,2.66,1,oh)};return jp(zp({htmlFontSize:g,pxToRem:S,round:ih,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:m,fontWeightBold:h},M),b,{clone:!1})}function lh(){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 uh=["none",lh(0,2,1,-1,0,1,1,0,0,1,3,0),lh(0,3,1,-2,0,2,2,0,0,1,5,0),lh(0,3,3,-2,0,3,4,0,0,1,8,0),lh(0,2,4,-1,0,4,5,0,0,1,10,0),lh(0,3,5,-1,0,5,8,0,0,1,14,0),lh(0,3,5,-1,0,6,10,0,0,1,18,0),lh(0,4,5,-2,0,7,10,1,0,2,16,1),lh(0,5,5,-3,0,8,10,1,0,3,14,2),lh(0,5,6,-3,0,9,12,1,0,3,16,2),lh(0,6,6,-3,0,10,14,1,0,4,18,3),lh(0,6,7,-4,0,11,15,1,0,4,20,3),lh(0,7,8,-4,0,12,17,2,0,5,22,4),lh(0,7,8,-4,0,13,19,2,0,5,24,4),lh(0,7,9,-4,0,14,21,2,0,5,26,4),lh(0,8,9,-5,0,15,22,2,0,6,28,5),lh(0,8,10,-5,0,16,24,2,0,6,30,5),lh(0,8,11,-5,0,17,26,2,0,6,32,5),lh(0,9,11,-5,0,18,28,2,0,7,34,6),lh(0,9,12,-6,0,19,29,2,0,7,36,6),lh(0,10,13,-6,0,20,31,3,0,8,38,7),lh(0,10,13,-6,0,21,33,3,0,8,40,7),lh(0,10,14,-6,0,22,35,3,0,8,42,7),lh(0,11,14,-7,0,23,36,3,0,9,44,8),lh(0,11,15,-7,0,24,38,3,0,9,46,8)],ch={borderRadius:4};function dh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mh(e,t){if(e){if("string"==typeof e)return dh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dh(e,t):void 0}}function ph(e){return function(e){if(Array.isArray(e))return dh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mh(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 hh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||mh(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 fh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var gh={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)"},vh={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function yh(e){return"".concat(Math.round(e),"ms")}var bh={easing:gh,duration:vh,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?vh.standard:n,i=t.easing,o=void 0===i?gh.easeInOut:i,a=t.delay,s=void 0===a?0:a;return Kp(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:yh(r)," ").concat(o," ").concat("string"==typeof s?s:yh(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))}},xh={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Sh(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.spacing,l=e.typography,u=void 0===l?{}:l,c=Kp(e,["breakpoints","mixins","palette","spacing","typography"]),d=nh(a),m=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=Kp(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function u(e,t){var r=Jp.indexOf(t);return r===Jp.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[Jp[r+1]]?n[Jp[r+1]]:t)-a/100).concat(i,")")}return zp({keys:Jp,values:n,up:l,down:function(e){var t=Jp.indexOf(e)+1,r=n[Jp[t]];return t===Jp.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}(n),p=fh(s),h=jp({breakpoints:m,direction:"ltr",mixins:Zp(m,p,i),overrides:{},palette:d,props:{},shadows:uh,typography:sh(d,u),spacing:p,shape:ch,transitions:bh,zIndex:xh},c),f=arguments.length,g=new Array(f>1?f-1:0),v=1;v<f;v++)g[v-1]=arguments[v];return h=g.reduce((function(e,t){return jp(e,t)}),h)}var Eh="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Mh=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Ch(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,u=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Mh.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Eh]&&""===a?"".concat(o,"-").concat(u()):o}return"".concat(s).concat(i).concat(u())}}function Oh(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var Ah="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},Th="object"===("undefined"==typeof window?"undefined":Ah(window))&&"object"===("undefined"==typeof document?"undefined":Ah(document))&&9===document.nodeType;function Nh(e,t,n){return t&&function(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,Bp(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wh(e,t){return wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wh(e,t)}function kh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wh(e,t)}function Rh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Lh={}.constructor;function Ih(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Ih);if(e.constructor!==Lh)return e;var t={};for(var n in e)t[n]=Ih(e[n]);return t}function Ph(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Ih(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var qh=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},Dh=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=qh(e[n]," ");else t=qh(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function zh(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function $h(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function Fh(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=zh(n),l=s.linebreak,u=s.space;if(e&&o++,a)if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];for(var m in d){var p=d[m];null!=p&&(r&&(r+=l),r+=$h(m+":"+u+Dh(p)+";",o))}}else for(var h in a){var f=a[h];null!=f&&(r&&(r+=l),r+=$h(h+":"+u+Dh(f)+";",o))}for(var g in t){var v=t[g];null!=v&&"fallbacks"!==g&&(r&&(r+=l),r+=$h(g+":"+u+Dh(v)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),$h(""+e+u+"{"+r,--o)+$h("}",o)):r}var jh=/([[\].#*$><+~=|^:(),"'`\s])/g,Bh="undefined"!=typeof CSS&&CSS.escape,_h=function(e){return Bh?Bh(e):e.replace(jh,"\\$1")},Vh=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),Hh=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(Rh(Rh(i)),s),i.selectorText="."+_h(i.id)),i}kh(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=Dh(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?zp({},e,{allowEmpty:!0}):e;return Fh(this.selectorText,this.style,n)},Nh(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Vh),Uh={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new Hh(e,t,n)}},Yh={indent:1,children:!0},Wh=/@([\w-]+)/,Xh=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(Wh);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new bf(zp({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=Yh);var t=zh(e).linebreak;if(null==e.indent&&(e.indent=Yh.indent),null==e.children&&(e.children=Yh.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),Gh=/@container|@media|@supports\s+/,Kh={onCreateRule:function(e,t,n){return Gh.test(e)?new Xh(e,t,n):null}},Jh={indent:1,children:!0},Zh=/@keyframes\s+([\w-]+)/,Qh=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(Zh);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:_h(a(this,o)),this.rules=new bf(zp({},n,{parent:this})),t)this.rules.add(s,t[s],zp({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=Jh);var t=zh(e).linebreak;if(null==e.indent&&(e.indent=Jh.indent),null==e.children&&(e.children=Jh.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),ef=/@keyframes\s+/,tf=/\$([\w-]+)/g,nf=function(e,t){return"string"==typeof e?e.replace(tf,(function(e,n){return n in t?t[n]:e})):e},rf=function(e,t,n){var r=e[t],i=nf(r,n);i!==r&&(e[t]=i)},of={onCreateRule:function(e,t,n){return"string"==typeof e&&ef.test(e)?new Qh(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&rf(e,"animation-name",n.keyframes),"animation"in e&&rf(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return nf(e,r.keyframes);default:return e}}},af=function(e){function t(){return e.apply(this,arguments)||this}return kh(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?zp({},e,{allowEmpty:!0}):e;return Fh(this.key,this.style,n)},t}(Vh),sf={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new af(e,t,n):null}},lf=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=zh(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=Fh(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return Fh(this.at,this.style,e)},e}(),uf=/@font-face/,cf={onCreateRule:function(e,t,n){return uf.test(e)?new lf(e,t,n):null}},df=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return Fh(this.key,this.style,e)},e}(),mf={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new df(e,t,n):null}},pf=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),hf={"@charset":!0,"@import":!0,"@namespace":!0},ff={onCreateRule:function(e,t,n){return e in hf?new pf(e,t,n):null}},gf=[Uh,Kh,of,sf,cf,mf,ff],vf={process:!0},yf={force:!0,process:!0},bf=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,u=r.scoped,c=zp({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(c.selector="."+_h(this.classes[d]));var m=Ph(d,t,c);if(!m)return null;this.register(m);var p=void 0===c.index?this.index.length:c.index;return this.index.splice(p,0,m),m},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=zp({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof Hh?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof Qh&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof Hh?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof Qh&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=vf);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var u=t.style[l];u!==s[l]&&t.prop(l,u,yf)}for(var c in s){var d=t.style[c],m=s[c];null==d&&d!==m&&t.prop(c,null,yf)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=zh(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),xf=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=zp({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new bf(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Sf=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Ef=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Gp(t,["attached"]),i=zh(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},Nh(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Mf=new Ef,Cf="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Of="2f1acc6c3a606b082e5eef5e54414ffb";null==Cf[Of]&&(Cf[Of]=0);var Af=Cf[Of]++,Tf=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+Af+i+t:o+n.key+"-"+Af+(i?"-"+i:"")+"-"+t}},Nf=function(e){var t;return function(){return t||(t=e()),t}},wf=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},kf=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=Dh(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},Rf=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},Lf=function(e,t){return e.selectorText=t,e.selectorText===t},If=Nf((function(){return document.querySelector("head")}));function Pf(e){var t=Mf.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=If(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var qf=Nf((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Df=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},zf=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},$f=function(){function e(e){this.getPropertyValue=wf,this.setProperty=kf,this.removeProperty=Rf,this.setSelector=Lf,this.hasInsertedRules=!1,this.cssRules=[],e&&Mf.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=qf();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Pf(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else If().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=zf(n,t);if(!1===(i=Df(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=zf(n,t),l=Df(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof xf&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Ff=0,jf=function(){function e(e){this.id=Ff++,this.version="10.10.0",this.plugins=new Sf,this.options={id:{minify:!1},createGenerateId:Tf,Renderer:Th?$f:null,plugins:[]},this.generateId=Tf({minify:!1});for(var t=0;t<gf.length;t++)this.plugins.use(gf[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=zp({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Mf.index?0:Mf.index+1);var r=new xf(e,zp({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Mf.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=zp({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=Ph(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),Bf=function(e){return new jf(e)},_f="object"==typeof CSS&&null!=CSS&&"number"in CSS;function Vf(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=Vf(r);o&&(t||(t={}),t[n]=o)}}return t}
8
8
  /**
9
9
  * A better abstraction over CSS.
10
10
  *
11
11
  * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
12
12
  * @website https://github.com/cssinjs/jss
13
13
  * @license MIT
14
- */yf();var xf=Date.now(),Sf="fnValues"+xf,Ef="fnStyle"+ ++xf,Mf="@global",Cf="@global ",Tf=function(){function e(e,t,n){for(var r in this.type="global",this.at=Mf,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Xh(pp({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Of=function(){function e(e,t,n){this.type="global",this.at=Mf,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,pp({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Af=/\s*,\s*/g;function wf(e,t){for(var n=e.split(Af),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function Nf(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Mf)return new Tf(e,t,n);if("@"===e[0]&&e.substr(0,8)===Cf)return new Of(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[Mf]:null;if(i){for(var o in i)t.addRule(o,i[o],pp({},n,{selector:wf(o,e.selector)}));delete r[Mf]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,7)===Mf){var o=wf(i.substr(7),e.selector);t.addRule(o,r[i],pp({},n,{selector:o})),delete r[i]}}(e,t))}}}var Rf=/\s*,\s*/g,kf=/&/g,Lf=/\$([\w-]+)/g;function If(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(Rf),r=e.split(Rf),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(kf,a):a+" "+l}return i}function n(e,t,n){if(n)return pp({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=pp({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,c=l.options.parent;for(var u in r){var d=-1!==u.indexOf("&"),m="@"===u[0];if(d||m){if(a=n(l,c,a),d){var p=t(u,l.selector);s||(s=e(c,o)),p=p.replace(Lf,s);var h=l.key+"-"+u;"replaceRule"in c?c.replaceRule(h,r[u],pp({},a,{selector:p})):c.addRule(h,r[u],pp({},a,{selector:p}))}else m&&c.addRule(u,{},a).addRule(l.key,r[u],{selector:l.selector});delete r[u]}}return r}}}var Pf=/[A-Z]/g,qf=/^ms-/,Df={};function zf(e){return"-"+e.toLowerCase()}function $f(e){if(Df.hasOwnProperty(e))return Df[e];var t=e.replace(Pf,zf);return Df[e]=qf.test(t)?"-"+t:t}function Ff(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:$f(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ff):t.fallbacks=Ff(e.fallbacks)),t}var Bf=vf&&CSS?CSS.px:"px",jf=vf&&CSS?CSS.ms:"ms",_f=vf&&CSS?CSS.percent:"%";function Hf(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var Uf=Hf({"animation-delay":jf,"animation-duration":jf,"background-position":Bf,"background-position-x":Bf,"background-position-y":Bf,"background-size":Bf,border:Bf,"border-bottom":Bf,"border-bottom-left-radius":Bf,"border-bottom-right-radius":Bf,"border-bottom-width":Bf,"border-left":Bf,"border-left-width":Bf,"border-radius":Bf,"border-right":Bf,"border-right-width":Bf,"border-top":Bf,"border-top-left-radius":Bf,"border-top-right-radius":Bf,"border-top-width":Bf,"border-width":Bf,"border-block":Bf,"border-block-end":Bf,"border-block-end-width":Bf,"border-block-start":Bf,"border-block-start-width":Bf,"border-block-width":Bf,"border-inline":Bf,"border-inline-end":Bf,"border-inline-end-width":Bf,"border-inline-start":Bf,"border-inline-start-width":Bf,"border-inline-width":Bf,"border-start-start-radius":Bf,"border-start-end-radius":Bf,"border-end-start-radius":Bf,"border-end-end-radius":Bf,margin:Bf,"margin-bottom":Bf,"margin-left":Bf,"margin-right":Bf,"margin-top":Bf,"margin-block":Bf,"margin-block-end":Bf,"margin-block-start":Bf,"margin-inline":Bf,"margin-inline-end":Bf,"margin-inline-start":Bf,padding:Bf,"padding-bottom":Bf,"padding-left":Bf,"padding-right":Bf,"padding-top":Bf,"padding-block":Bf,"padding-block-end":Bf,"padding-block-start":Bf,"padding-inline":Bf,"padding-inline-end":Bf,"padding-inline-start":Bf,"mask-position-x":Bf,"mask-position-y":Bf,"mask-size":Bf,height:Bf,width:Bf,"min-height":Bf,"max-height":Bf,"min-width":Bf,"max-width":Bf,bottom:Bf,left:Bf,top:Bf,right:Bf,inset:Bf,"inset-block":Bf,"inset-block-end":Bf,"inset-block-start":Bf,"inset-inline":Bf,"inset-inline-end":Bf,"inset-inline-start":Bf,"box-shadow":Bf,"text-shadow":Bf,"column-gap":Bf,"column-rule":Bf,"column-rule-width":Bf,"column-width":Bf,"font-size":Bf,"font-size-delta":Bf,"letter-spacing":Bf,"text-decoration-thickness":Bf,"text-indent":Bf,"text-stroke":Bf,"text-stroke-width":Bf,"word-spacing":Bf,motion:Bf,"motion-offset":Bf,outline:Bf,"outline-offset":Bf,"outline-width":Bf,perspective:Bf,"perspective-origin-x":_f,"perspective-origin-y":_f,"transform-origin":_f,"transform-origin-x":_f,"transform-origin-y":_f,"transform-origin-z":_f,"transition-delay":jf,"transition-duration":jf,"vertical-align":Bf,"flex-basis":Bf,"shape-margin":Bf,size:Bf,gap:Bf,grid:Bf,"grid-gap":Bf,"row-gap":Bf,"grid-row-gap":Bf,"grid-column-gap":Bf,"grid-template-rows":Bf,"grid-template-columns":Bf,"grid-auto-rows":Bf,"grid-auto-columns":Bf,"box-shadow-x":Bf,"box-shadow-y":Bf,"box-shadow-blur":Bf,"box-shadow-spread":Bf,"font-line-height":Bf,"text-shadow-x":Bf,"text-shadow-y":Bf,"text-shadow-blur":Bf});function Vf(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Vf(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=Vf(i,t[i],n);else for(var o in t)t[o]=Vf(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Uf[e];return!a||0===t&&a===Bf?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Yf(e){void 0===e&&(e={});var t=Hf(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Vf(r,e[r],t);return e},onChangeValue:function(e,n){return Vf(n,e,t)}}}var Wf="",Xf="",Gf="",Kf="",Jf=rh&&"ontouchstart"in document.documentElement;if(rh){var Zf={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Qf=document.createElement("p").style;for(var eg in Zf)if(eg+"Transform"in Qf){Wf=eg,Xf=Zf[eg];break}"Webkit"===Wf&&"msHyphens"in Qf&&(Wf="ms",Xf=Zf.ms,Kf="edge"),"Webkit"===Wf&&"-apple-trailing-word"in Qf&&(Gf="apple")}var tg=Wf,ng=Xf,rg=Gf,ig=Kf,og=Jf;var ag={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===tg?"-webkit-"+e:ng+e)}},sg={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===tg?ng+"print-"+e:e)}},lg=/[-\s]+(.)?/g;function cg(e,t){return t?t.toUpperCase():""}function ug(e){return e.replace(lg,cg)}function dg(e){return ug("-"+e)}var mg,pg={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===tg){var n="mask-image";if(ug(n)in t)return e;if(tg+dg(n)in t)return ng+e}return e}},hg={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==rg||og?e:ng+e)}},fg={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:ng+e)}},gg={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:ng+e)}},yg={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===tg||"ms"===tg&&"edge"!==ig?ng+e:e)}},vg={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===tg||"ms"===tg||"apple"===rg?ng+e:e)}},bg={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===tg?"WebkitColumn"+dg(e)in t&&ng+"column-"+e:"Moz"===tg&&("page"+dg(e)in t&&"page-"+e))}},xg={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===tg)return e;var n=e.replace("-inline","");return tg+dg(n)in t&&ng+n}},Sg={supportedProperty:function(e,t){return ug(e)in t&&e}},Eg={supportedProperty:function(e,t){var n=dg(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:tg+n in t?ng+e:"Webkit"!==tg&&"Webkit"+n in t&&"-webkit-"+e}},Mg={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===tg?""+ng+e:e)}},Cg={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===tg?ng+"scroll-chaining":e)}},Tg={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Og={supportedProperty:function(e,t){var n=Tg[e];return!!n&&(tg+dg(n)in t&&ng+n)}},Ag={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},wg=Object.keys(Ag),Ng=function(e){return ng+e},Rg={supportedProperty:function(e,t,n){var r=n.multiple;if(wg.indexOf(e)>-1){var i=Ag[e];if(!Array.isArray(i))return tg+dg(i)in t&&ng+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(tg+dg(i[0])in t))return!1;return i.map(Ng)}return!1}},kg=[ag,sg,pg,hg,fg,gg,yg,vg,bg,xg,Sg,Eg,Mg,Cg,Og,Rg],Lg=kg.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Ig=kg.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Hp(t.noPrefill)),e}),[]),Pg={};if(rh){mg=document.createElement("p");var qg=window.getComputedStyle(document.documentElement,"");for(var Dg in qg)isNaN(Dg)||(Pg[qg[Dg]]=qg[Dg]);Ig.forEach((function(e){return delete Pg[e]}))}function zg(e,t){if(void 0===t&&(t={}),!mg)return e;if(null!=Pg[e])return Pg[e];"transition"!==e&&"transform"!==e||(t[e]=e in mg.style);for(var n=0;n<Lg.length&&(Pg[e]=Lg[n](e,mg.style,t),!Pg[e]);n++);try{mg.style[e]=""}catch(e){return!1}return Pg[e]}var $g,Fg={},Bg={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},jg=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function _g(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?zg(t):", "+zg(n);return r||(t||n)}function Hg(e,t){var n=t;if(!$g||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Fg[r])return Fg[r];try{$g.style[e]=n}catch(e){return Fg[r]=!1,!1}if(Bg[e])n=n.replace(jg,_g);else if(""===$g.style[e]&&("-ms-flex"===(n=ng+n)&&($g.style[e]="-ms-flexbox"),$g.style[e]=n,""===$g.style[e]))return Fg[r]=!1,!1;return $g.style[e]="",Fg[r]=n,Fg[r]}function Ug(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=zg(n);o&&o!==n&&(i=!0);var a=!1,s=Hg(o,mh(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===tg?e:"@"+ng+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Hg(t,mh(e))||e}}}function Vg(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}}function Yg(){return{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=uh(e,{},n);return r[Ef]=t,r},onProcessStyle:function(e,t){if(Sf in t||Ef in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Sf]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Ef];o&&(i.style=o(e)||{});var a=i[Sf];if(a)for(var s in a)i.prop(s,a[s](e),r)}},Nf(),If(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ff(e[t]);return e}return Ff(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=$f(t);return t===r?e:(n.prop(r,e),null)}},Yf(),"undefined"==typeof window?null:Ug(),Vg()]}}function Wg(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=pp({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}rh&&($g=document.createElement("p"));var Xg=function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},Gg=function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},Kg=function(e,t,n){e.get(t).delete(n)},Jg=j.createContext(null);function Zg(){return j.useContext(Jg)}var Qg,ey=yf(Yg()),ty={disableGeneration:!1,generateClassName:eh(),jss:ey,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},ny=j.createContext(ty);function ry(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=Op(e,["children","injectFirst","disableGeneration"]),s=pp({},j.useContext(ny),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!Qg){var l=document.head;Qg=document.createComment("mui-inject-first"),l.insertBefore(Qg,l.firstChild)}s.jss=yf({plugins:Yg().plugins,insertionPoint:Qg})}return j.createElement(ny.Provider,{value:s},t)}var iy=-1e9;var oy={};function ay(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=Gg(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Xg(i.sheetsManager,o,r,s));var l=pp({},o.options,i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=i.sheetsRegistry;if(0===s.refs){var u;i.sheetsCache&&(u=Gg(i.sheetsCache,o,r));var d=o.create(r,a);u||((u=i.jss.createStyleSheet(d,pp({link:!1},l))).attach(),i.sheetsCache&&Xg(i.sheetsCache,o,r,u)),c&&c.add(u),s.staticSheet=u,s.dynamicStyles=bf(d)}if(s.dynamicStyles){var m=i.jss.createStyleSheet(s.dynamicStyles,pp({link:!0},l));m.update(t),m.attach(),n.dynamicSheet=m,n.classes=Wg({baseClasses:s.staticSheet.classes,newClasses:m.classes}),c&&c.add(m)}else n.classes=s.staticSheet.classes;s.refs+=1}}function sy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,a=void 0===o?oy:o,s=Op(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=pp({},i);return Object.keys(o).forEach((function(e){a[e]=gp(a[e],o[e])})),a},options:{}}}(e),c=n||r||"makeStyles";l.options={index:iy+=1,name:n,meta:c,classNamePrefix:c};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Zg()||a,r=pp({},j.useContext(ny),s),o=j.useRef(),c=j.useRef();!function(e,t){var n,r=j.useRef([]),i=j.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),j.useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return ay(i,e),c.current=!1,o.current=i,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=Gg(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(Kg(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(i)}}),[t,l]),j.useEffect((function(){c.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(o.current,e),c.current=!0}));var u=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Wg({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return u}}function ly(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ly(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function cy(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ly(e))&&(r&&(r+=" "),r+=t);return r}var uy={exports:{}},dy={},my="function"==typeof Symbol&&Symbol.for,py=my?Symbol.for("react.element"):60103,hy=my?Symbol.for("react.portal"):60106,fy=my?Symbol.for("react.fragment"):60107,gy=my?Symbol.for("react.strict_mode"):60108,yy=my?Symbol.for("react.profiler"):60114,vy=my?Symbol.for("react.provider"):60109,by=my?Symbol.for("react.context"):60110,xy=my?Symbol.for("react.async_mode"):60111,Sy=my?Symbol.for("react.concurrent_mode"):60111,Ey=my?Symbol.for("react.forward_ref"):60112,My=my?Symbol.for("react.suspense"):60113,Cy=my?Symbol.for("react.suspense_list"):60120,Ty=my?Symbol.for("react.memo"):60115,Oy=my?Symbol.for("react.lazy"):60116,Ay=my?Symbol.for("react.block"):60121,wy=my?Symbol.for("react.fundamental"):60117,Ny=my?Symbol.for("react.responder"):60118,Ry=my?Symbol.for("react.scope"):60119;function ky(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case py:switch(e=e.type){case xy:case Sy:case fy:case yy:case gy:case My:return e;default:switch(e=e&&e.$$typeof){case by:case Ey:case Oy:case Ty:case vy:return e;default:return t}}case hy:return t}}}function Ly(e){return ky(e)===Sy}dy.AsyncMode=xy,dy.ConcurrentMode=Sy,dy.ContextConsumer=by,dy.ContextProvider=vy,dy.Element=py,dy.ForwardRef=Ey,dy.Fragment=fy,dy.Lazy=Oy,dy.Memo=Ty,dy.Portal=hy,dy.Profiler=yy,dy.StrictMode=gy,dy.Suspense=My,dy.isAsyncMode=function(e){return Ly(e)||ky(e)===xy},dy.isConcurrentMode=Ly,dy.isContextConsumer=function(e){return ky(e)===by},dy.isContextProvider=function(e){return ky(e)===vy},dy.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===py},dy.isForwardRef=function(e){return ky(e)===Ey},dy.isFragment=function(e){return ky(e)===fy},dy.isLazy=function(e){return ky(e)===Oy},dy.isMemo=function(e){return ky(e)===Ty},dy.isPortal=function(e){return ky(e)===hy},dy.isProfiler=function(e){return ky(e)===yy},dy.isStrictMode=function(e){return ky(e)===gy},dy.isSuspense=function(e){return ky(e)===My},dy.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===fy||e===Sy||e===yy||e===gy||e===My||e===Cy||"object"==typeof e&&null!==e&&(e.$$typeof===Oy||e.$$typeof===Ty||e.$$typeof===vy||e.$$typeof===by||e.$$typeof===Ey||e.$$typeof===wy||e.$$typeof===Ny||e.$$typeof===Ry||e.$$typeof===Ay)},dy.typeOf=ky,uy.exports=dy;var Iy=uy.exports,Py={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},qy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Dy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zy={};function $y(e){return Iy.isMemo(e)?Dy:zy[e.$$typeof]||Py}zy[Iy.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},zy[Iy.Memo]=Dy;var Fy=Object.defineProperty,By=Object.getOwnPropertyNames,jy=Object.getOwnPropertySymbols,_y=Object.getOwnPropertyDescriptor,Hy=Object.getPrototypeOf,Uy=Object.prototype;var Vy=function e(t,n,r){if("string"!=typeof n){if(Uy){var i=Hy(n);i&&i!==Uy&&e(t,i,r)}var o=By(n);jy&&(o=o.concat(jy(n)));for(var a=$y(t),s=$y(n),l=0;l<o.length;++l){var c=o[l];if(!(qy[c]||r&&r[c]||s&&s[c]||a&&a[c])){var u=_y(n,c);try{Fy(t,c,u)}catch(e){}}}}return t},Yy=Q(Vy);function Wy(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=Op(r,["name"]),a=i,s="function"==typeof t?function(e){return{root:function(n){return t(pp({theme:e},n))}}}:{root:t},l=sy(s,pp({Component:e,name:i||e.displayName,classNamePrefix:a},o));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var c=j.forwardRef((function(t,r){var i,o,a,s=t.children,c=t.className,u=t.clone,d=t.component,m=Op(t,["children","className","clone","component"]),p=cy(l(t).root,c),h=m;if(n&&(i=h,o=n,a={},Object.keys(i).forEach((function(e){-1===o.indexOf(e)&&(a[e]=i[e])})),h=a),u)return j.cloneElement(s,pp({className:cy(s.props.className,p)},h));if("function"==typeof s)return s(pp({className:p},h));var f=d||e;return j.createElement(f,pp({ref:r,className:p},h),s)}));return Yy(c,e),c}}function Xy(e){var t=e.children,n=e.theme,r=Zg(),i=j.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):pp({},e,t)}(r,n);return null!=e&&(e[Zp]=null!==r),e}),[n,r]);return j.createElement(Jg.Provider,{value:i},t)}var Gy=Jp(),Ky=function(e){var t=Wy(e);return function(e,n){return t(e,pp({defaultTheme:Gy},n))}};function Jy(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,a=t.name,s=Op(t,["defaultTheme","withTheme","name"]),l=a,c=sy(e,pp({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),u=j.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,l=Op(e,["classes","innerRef"]),u=c(pp({},n.defaultProps,e)),d=l;return("string"==typeof a||o)&&(i=Zg()||r,a&&(d=th({theme:i,name:a,props:l})),o&&!d.theme&&(d.theme=i)),j.createElement(n,pp({ref:s||t,classes:u},d))}));return Yy(u,n),u}}(e,pp({defaultTheme:Gy},t))}function Zy(e){if("string"!=typeof e)throw new Error(bp(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Qy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function ev(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ev(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tv(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ev(e))&&(r&&(r+=" "),r+=t);return r}function nv(e){return e&&e.ownerDocument||document}function rv(e){return nv(e).defaultView||window}function iv(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var ov="undefined"!=typeof window?_.useLayoutEffect:_.useEffect;function av(e){var t=_.useRef(e);return ov((function(){t.current=e})),_.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function sv(e,t){return _.useMemo((function(){return null==e&&null==t?null:function(n){iv(e,n),iv(t,n)}}),[e,t])}var lv=!0,cv=!1,uv=null,dv={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function mv(e){e.metaKey||e.altKey||e.ctrlKey||(lv=!0)}function pv(){lv=!1}function hv(){"hidden"===this.visibilityState&&cv&&(lv=!0)}function fv(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return lv||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!dv[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function gv(){cv=!0,window.clearTimeout(uv),uv=window.setTimeout((function(){cv=!1}),100)}function yv(){return{isFocusVisible:fv,onBlurVisible:gv,ref:_.useCallback((function(e){var t,n=Y.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",mv,!0),t.addEventListener("mousedown",pv,!0),t.addEventListener("pointerdown",pv,!0),t.addEventListener("touchstart",pv,!0),t.addEventListener("visibilitychange",hv,!0))}),[])}}var vv=!1,bv=j.createContext(null),xv="unmounted",Sv="exited",Ev="entering",Mv="entered",Cv="exiting",Tv=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Sv,r.appearStatus=Ev):i=Mv:i=t.unmountOnExit||t.mountOnEnter?xv:Sv,r.state={status:i},r.nextCallback=null,r}ah(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===xv?{status:Sv}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Ev&&n!==Mv&&(t=Ev):n!==Ev&&n!==Mv||(t=Cv)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ev){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:W.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Sv&&this.setState({status:xv})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[W.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||vv?this.safeSetState({status:Mv},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Ev},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Mv},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:W.findDOMNode(this);t&&!vv?(this.props.onExit(r),this.safeSetState({status:Cv},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Sv},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Sv},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:W.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===xv)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Tp(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return j.createElement(bv.Provider,{value:null},"function"==typeof n?n(e,r):j.cloneElement(j.Children.only(n),r))},t}(j.Component);function Ov(){}function Av(e,t){var n=Object.create(null);return e&&V.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&H(e)?t(e):e}(e)})),n}function wv(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Nv(e,t,n){var r=Av(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(H(a)){var s=o in t,l=o in r,c=t[o],u=H(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&H(c)&&(i[o]=U(a,{onExited:n.bind(null,a),in:c.props.in,exit:wv(a,"exit",e),enter:wv(a,"enter",e)})):i[o]=U(a,{in:!1}):i[o]=U(a,{onExited:n.bind(null,a),in:!0,exit:wv(a,"exit",e),enter:wv(a,"enter",e)})}})),i}Tv.contextType=bv,Tv.propTypes={},Tv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ov,onEntering:Ov,onEntered:Ov,onExit:Ov,onExiting:Ov,onExited:Ov},Tv.UNMOUNTED=xv,Tv.EXITED=Sv,Tv.ENTERING=Ev,Tv.ENTERED=Mv,Tv.EXITING=Cv;var Rv=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},kv=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(sh(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}ah(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Av(n.children,(function(e){return U(e,{onExited:r.bind(null,e),in:!0,appear:wv(e,"appear",n),enter:wv(e,"enter",n),exit:wv(e,"exit",n)})}))):Nv(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Av(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=pp({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Tp(e,["component","childFactory"]),i=this.state.contextValue,o=Rv(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?j.createElement(bv.Provider,{value:i},o):j.createElement(bv.Provider,{value:i},j.createElement(t,r,o))},t}(j.Component);kv.propTypes={},kv.defaultProps={component:"div",childFactory:function(e){return e}};function Lv(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var Iv=_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,l=e.elevation,c=void 0===l?1:l,u=e.variant,d=void 0===u?"elevation":u,m=Op(e,["classes","className","component","square","elevation","variant"]);return _.createElement(o,pp({className:tv(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(c)],!s&&n.rounded),ref:t},m))})),Pv=Jy((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),pp({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Iv),qv="undefined"==typeof window?_.useEffect:_.useLayoutEffect;function Dv(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,c=void 0===l?function(){}:l,u=e.timeout,d=_.useState(!1),m=d[0],p=d[1],h=tv(t.ripple,t.rippleVisible,r&&t.ripplePulsate),f={width:a,height:a,top:-a/2+o,left:-a/2+i},g=tv(t.child,m&&t.childLeaving,r&&t.childPulsate),y=av(c);return qv((function(){if(!s){p(!0);var e=setTimeout(y,u);return function(){clearTimeout(e)}}}),[y,s,u]),_.createElement("span",{className:h,style:f},_.createElement("span",{className:g}))}var zv=_.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=Op(e,["center","classes","className"]),s=_.useState([]),l=s[0],c=s[1],u=_.useRef(0),d=_.useRef(null);_.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var m=_.useRef(!1),p=_.useRef(null),h=_.useRef(null),f=_.useRef(null);_.useEffect((function(){return function(){clearTimeout(p.current)}}),[]);var g=_.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;c((function(e){return[].concat(Hp(e),[_.createElement(Dv,{key:u.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),u.current+=1,d.current=a}),[i]),y=_.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var u,d,y,v=c?null:f.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,E=x.clientY;u=Math.round(S-b.left),d=Math.round(E-b.top)}if(s)(y=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(y+=1);else{var M=2*Math.max(Math.abs((v?v.clientWidth:0)-u),u)+2,C=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;y=Math.sqrt(Math.pow(M,2)+Math.pow(C,2))}e.touches?null===h.current&&(h.current=function(){g({pulsate:o,rippleX:u,rippleY:d,rippleSize:y,cb:n})},p.current=setTimeout((function(){h.current&&(h.current(),h.current=null)}),80)):g({pulsate:o,rippleX:u,rippleY:d,rippleSize:y,cb:n})}}),[r,g]),v=_.useCallback((function(){y({},{pulsate:!0})}),[y]),b=_.useCallback((function(e,t){if(clearTimeout(p.current),"touchend"===e.type&&h.current)return e.persist(),h.current(),h.current=null,void(p.current=setTimeout((function(){b(e,t)})));h.current=null,c((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return _.useImperativeHandle(t,(function(){return{pulsate:v,start:y,stop:b}}),[v,y,b]),_.createElement("span",pp({className:tv(i.root,o),ref:f},a),_.createElement(kv,{component:null,exit:!0},l))})),$v=Jy((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(_.memo(zv)),Fv=_.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"button":c,d=e.disabled,m=void 0!==d&&d,p=e.disableRipple,h=void 0!==p&&p,f=e.disableTouchRipple,g=void 0!==f&&f,y=e.focusRipple,v=void 0!==y&&y,b=e.focusVisibleClassName,x=e.onBlur,S=e.onClick,E=e.onFocus,M=e.onFocusVisible,C=e.onKeyDown,T=e.onKeyUp,O=e.onMouseDown,A=e.onMouseLeave,w=e.onMouseUp,N=e.onTouchEnd,R=e.onTouchMove,k=e.onTouchStart,L=e.onDragLeave,I=e.tabIndex,P=void 0===I?0:I,q=e.TouchRippleProps,D=e.type,z=void 0===D?"button":D,$=Op(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),F=_.useRef(null);var B=_.useRef(null),j=_.useState(!1),H=j[0],U=j[1];m&&H&&U(!1);var V=yv(),W=V.isFocusVisible,X=V.onBlurVisible,G=V.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return av((function(r){return t&&t(r),!n&&B.current&&B.current[e](r),!0}))}_.useImperativeHandle(n,(function(){return{focusVisible:function(){U(!0),F.current.focus()}}}),[]),_.useEffect((function(){H&&v&&!h&&B.current.pulsate()}),[h,v,H]);var J=K("start",O),Z=K("stop",L),Q=K("stop",w),ee=K("stop",(function(e){H&&e.preventDefault(),A&&A(e)})),te=K("start",k),ne=K("stop",N),re=K("stop",R),ie=K("stop",(function(e){H&&(X(e),U(!1)),x&&x(e)}),!1),oe=av((function(e){F.current||(F.current=e.currentTarget),W(e)&&(U(!0),M&&M(e)),E&&E(e)})),ae=function(){var e=Y.findDOMNode(F.current);return u&&"button"!==u&&!("A"===e.tagName&&e.href)},se=_.useRef(!1),le=av((function(e){v&&!se.current&&H&&B.current&&" "===e.key&&(se.current=!0,e.persist(),B.current.stop(e,(function(){B.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!m&&(e.preventDefault(),S&&S(e))})),ce=av((function(e){v&&" "===e.key&&B.current&&H&&!e.defaultPrevented&&(se.current=!1,e.persist(),B.current.stop(e,(function(){B.current.pulsate(e)}))),T&&T(e),S&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&S(e)})),ue=u;"button"===ue&&$.href&&(ue="a");var de={};"button"===ue?(de.type=z,de.disabled=m):("a"===ue&&$.href||(de.role="button"),de["aria-disabled"]=m);var me=sv(r,t),pe=sv(G,F),he=sv(me,pe),fe=_.useState(!1),ge=fe[0],ye=fe[1];_.useEffect((function(){ye(!0)}),[]);var ve=ge&&!h&&!m;return _.createElement(ue,pp({className:tv(s.root,l,H&&[s.focusVisible,b],m&&s.disabled),onBlur:ie,onClick:S,onFocus:oe,onKeyDown:le,onKeyUp:ce,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:he,tabIndex:m?-1:P},de,$),a,ve?_.createElement($v,pp({ref:B,center:o},q)):null)})),Bv=Jy({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Fv),jv={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},_v=_.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,c=e.display,u=void 0===c?"initial":c,d=e.gutterBottom,m=void 0!==d&&d,p=e.noWrap,h=void 0!==p&&p,f=e.paragraph,g=void 0!==f&&f,y=e.variant,v=void 0===y?"body1":y,b=e.variantMapping,x=void 0===b?jv:b,S=Op(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),E=l||(g?"p":x[v]||jv[v])||"span";return _.createElement(E,pp({className:tv(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(Zy(s))],h&&i.noWrap,m&&i.gutterBottom,g&&i.paragraph,"inherit"!==r&&i["align".concat(Zy(r))],"initial"!==u&&i["display".concat(Zy(u))]),ref:t},S))})),Hv=Jy((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(_v),Uv=_.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableElevation,m=void 0!==d&&d,p=e.disableFocusRipple,h=void 0!==p&&p,f=e.endIcon,g=e.focusVisibleClassName,y=e.fullWidth,v=void 0!==y&&y,b=e.size,x=void 0===b?"medium":b,S=e.startIcon,E=e.type,M=void 0===E?"button":E,C=e.variant,T=void 0===C?"text":C,O=Op(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),A=S&&_.createElement("span",{className:tv(r.startIcon,r["iconSize".concat(Zy(x))])},S),w=f&&_.createElement("span",{className:tv(r.endIcon,r["iconSize".concat(Zy(x))])},f);return _.createElement(Bv,pp({className:tv(r.root,r[T],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(T).concat(Zy(a))],"medium"!==x&&[r["".concat(T,"Size").concat(Zy(x))],r["size".concat(Zy(x))]],m&&r.disableElevation,u&&r.disabled,v&&r.fullWidth),component:l,disabled:u,focusRipple:!h,focusVisibleClassName:tv(r.focusVisible,g),ref:t,type:M},O),_.createElement("span",{className:r.label},A,n,w))})),Vv=Jy((function(e){return{root:pp({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Cp(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Cp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Cp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Cp(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Cp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Cp(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Cp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(Uv);var Yv="undefined"!=typeof window?_.useLayoutEffect:_.useEffect,Wv=_.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=_.useState(null),l=s[0],c=s[1],u=sv(_.isValidElement(n)?n.ref:null,t);return Yv((function(){o||c(function(e){return e="function"==typeof e?e():e,Y.findDOMNode(e)}(r)||document.body)}),[r,o]),Yv((function(){if(l&&!o)return iv(t,l),function(){iv(t,null)}}),[t,l,o]),Yv((function(){a&&(l||o)&&a()}),[a,l,o]),o?_.isValidElement(n)?_.cloneElement(n,{ref:u}):n:l?Y.createPortal(n,l):l}));function Xv(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Gv(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Kv(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Hp(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&Xv(e,r)}))}function Jv(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Zv(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=nv(e);return t.body===e?rv(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Gv(o)+a,"px"),n=nv(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Gv(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Qv=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return ih(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&Xv(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Kv(t,e.mountNode,e.modalRef,r,!0);var i=Jv(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Jv(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Zv(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Jv(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&Xv(e.modalRef,!0),Kv(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&Xv(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function eb(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,c=e.isEnabled,u=e.open,d=_.useRef(),m=_.useRef(null),p=_.useRef(null),h=_.useRef(),f=_.useRef(null),g=_.useCallback((function(e){f.current=Y.findDOMNode(e)}),[]),y=sv(t.ref,g),v=_.useRef();return _.useEffect((function(){v.current=u}),[u]),!v.current&&u&&"undefined"!=typeof window&&(h.current=l().activeElement),_.useEffect((function(){if(u){var e=nv(f.current);r||!f.current||f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex",-1),f.current.focus());var t=function(){null!==f.current&&(e.hasFocus()&&!o&&c()&&!d.current?f.current&&!f.current.contains(e.activeElement)&&f.current.focus():d.current=!1)},n=function(t){!o&&c()&&9===t.keyCode&&e.activeElement===f.current&&(d.current=!0,t.shiftKey?p.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(h.current&&h.current.focus&&h.current.focus(),h.current=null)}}}),[r,o,s,c,u]),_.createElement(_.Fragment,null,_.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),_.cloneElement(t,{ref:y}),_.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelEnd"}))}var tb={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},nb=_.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=Op(e,["invisible","open"]);return i?_.createElement("div",pp({"aria-hidden":!0,ref:t},o,{style:pp({},tb.root,r?tb.invisible:{},o.style)})):null}));var rb=new Qv,ib=_.forwardRef((function(e,t){var n=Zg(),r=th({name:"MuiModal",props:pp({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?nb:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,c=void 0!==l&&l,u=r.container,d=r.disableAutoFocus,m=void 0!==d&&d,p=r.disableBackdropClick,h=void 0!==p&&p,f=r.disableEnforceFocus,g=void 0!==f&&f,y=r.disableEscapeKeyDown,v=void 0!==y&&y,b=r.disablePortal,x=void 0!==b&&b,S=r.disableRestoreFocus,E=void 0!==S&&S,M=r.disableScrollLock,C=void 0!==M&&M,T=r.hideBackdrop,O=void 0!==T&&T,A=r.keepMounted,w=void 0!==A&&A,N=r.manager,R=void 0===N?rb:N,k=r.onBackdropClick,L=r.onClose,I=r.onEscapeKeyDown,P=r.onRendered,q=r.open,D=Op(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),z=_.useState(!0),$=z[0],F=z[1],B=_.useRef({}),j=_.useRef(null),H=_.useRef(null),U=sv(H,t),V=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return nv(j.current)},X=function(){return B.current.modalRef=H.current,B.current.mountNode=j.current,B.current},G=function(){R.mount(X(),{disableScrollLock:C}),H.current.scrollTop=0},K=av((function(){var e=function(e){return e="function"==typeof e?e():e,Y.findDOMNode(e)}(u)||W().body;R.add(X(),e),H.current&&G()})),J=_.useCallback((function(){return R.isTopModal(X())}),[R]),Z=av((function(e){j.current=e,e&&(P&&P(),q&&J()?G():Xv(H.current,!0))})),Q=_.useCallback((function(){R.remove(X())}),[R]);if(_.useEffect((function(){return function(){Q()}}),[Q]),_.useEffect((function(){q?K():V&&c||Q()}),[q,Q,V,c,K]),!w&&!q&&(!V||$))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Kp}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),V&&(te.onEnter=Qy((function(){F(!1)}),s.props.onEnter),te.onExited=Qy((function(){F(!0),c&&Q()}),s.props.onExited)),_.createElement(Wv,{ref:Z,container:u,disablePortal:x},_.createElement("div",pp({ref:U,onKeyDown:function(e){"Escape"===e.key&&J()&&(I&&I(e),v||(e.stopPropagation(),L&&L(e,"escapeKeyDown")))},role:"presentation"},D,{style:pp({},ee.root,!q&&$?ee.hidden:{},D.style)}),O?null:_.createElement(o,pp({open:q,onClick:function(e){e.target===e.currentTarget&&(k&&k(e),!h&&L&&L(e,"backdropClick"))}},a)),_.createElement(eb,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:E,getDoc:W,isEnabled:J,open:q},_.cloneElement(s,te))))})),ob=_.forwardRef((function(e,t){var n=e.absolute,r=void 0!==n&&n,i=e.classes,o=e.className,a=e.component,s=void 0===a?"hr":a,l=e.flexItem,c=void 0!==l&&l,u=e.light,d=void 0!==u&&u,m=e.orientation,p=void 0===m?"horizontal":m,h=e.role,f=void 0===h?"hr"!==s?"separator":void 0:h,g=e.variant,y=void 0===g?"fullWidth":g,v=Op(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return _.createElement(s,pp({className:tv(i.root,o,"fullWidth"!==y&&i[y],r&&i.absolute,c&&i.flexItem,d&&i.light,"vertical"===p&&i.vertical),role:f,ref:t},v))})),ab=Jy((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:Cp(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(ob);function sb(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var lb={entering:{opacity:1,transform:sb(1)},entered:{opacity:1,transform:"none"}},cb=_.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,c=e.onExit,u=e.onExited,d=e.onExiting,m=e.style,p=e.timeout,h=void 0===p?"auto":p,f=e.TransitionComponent,g=void 0===f?Tv:f,y=Op(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=_.useRef(),b=_.useRef(),x=Zg()||Gy,S=x.unstable_strictMode&&!i,E=_.useRef(null),M=sv(n.ref,t),C=sv(S?E:void 0,M),T=function(e){return function(t,n){if(e){var r=Up(S?[E.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},O=T(l),A=T((function(e,t){!function(e){e.scrollTop}(e);var n,r=Lv({style:m,timeout:h},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===h?(n=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=n):n=i,e.style.transition=[x.transitions.create("opacity",{duration:n,delay:o}),x.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),w=T(s),N=T(d),R=T((function(e){var t,n=Lv({style:m,timeout:h},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===h?(t=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=r,e.style.transition=[x.transitions.create("opacity",{duration:t,delay:i}),x.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=sb(.75),c&&c(e)})),k=T(u);return _.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),_.createElement(g,pp({appear:!0,in:o,nodeRef:S?E:void 0,onEnter:A,onEntered:w,onEntering:O,onExit:R,onExited:k,onExiting:N,addEndListener:function(e,t){var n=S?e:t;"auto"===h&&(v.current=setTimeout(n,b.current||0))},timeout:"auto"===h?null:h},y),(function(e,t){return _.cloneElement(n,pp({style:pp({opacity:0,transform:sb(.75),visibility:"exited"!==e||o?void 0:"hidden"},lb[e],m,n.props.style),ref:C},t))}))}));cb.muiSupportAuto=!0;var ub=_.createContext({}),db=_.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,c=e.disablePadding,u=void 0!==c&&c,d=e.subheader,m=Op(e,["children","classes","className","component","dense","disablePadding","subheader"]),p=_.useMemo((function(){return{dense:l}}),[l]);return _.createElement(ub.Provider,{value:p},_.createElement(a,pp({className:tv(r.root,i,l&&r.dense,!u&&r.padding,d&&r.subheader),ref:t},m),d,n))})),mb=Jy({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(db),pb="undefined"==typeof window?_.useEffect:_.useLayoutEffect,hb=_.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,c=e.classes,u=e.className,d=e.component,m=e.ContainerComponent,p=void 0===m?"li":m,h=e.ContainerProps,f=(h=void 0===h?{}:h).className,g=Op(h,["className"]),y=e.dense,v=void 0!==y&&y,b=e.disabled,x=void 0!==b&&b,S=e.disableGutters,E=void 0!==S&&S,M=e.divider,C=void 0!==M&&M,T=e.focusVisibleClassName,O=e.selected,A=void 0!==O&&O,w=Op(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),N=_.useContext(ub),R={dense:v||N.dense||!1,alignItems:r},k=_.useRef(null);pb((function(){o&&k.current&&k.current.focus()}),[o]);var L,I,P=_.Children.toArray(l),q=P.length&&(L=P[P.length-1],I=["ListItemSecondaryAction"],_.isValidElement(L)&&-1!==I.indexOf(L.type.muiName)),D=sv(_.useCallback((function(e){k.current=Y.findDOMNode(e)}),[]),t),z=pp({className:tv(c.root,u,R.dense&&c.dense,!E&&c.gutters,C&&c.divider,x&&c.disabled,s&&c.button,"center"!==r&&c.alignItemsFlexStart,q&&c.secondaryAction,A&&c.selected),disabled:x},w),$=d||"li";return s&&(z.component=d||"div",z.focusVisibleClassName=tv(c.focusVisible,T),$=Bv),q?($=z.component||d?$:"div","li"===p&&("li"===$?$="div":"li"===z.component&&(z.component="div")),_.createElement(ub.Provider,{value:R},_.createElement(p,pp({className:tv(c.container,f),ref:D},g),_.createElement($,z,P),P.pop()))):_.createElement(ub.Provider,{value:R},_.createElement($,pp({ref:D},z),P))})),fb=Jy((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(hb),gb=_.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Op(e,["classes","className"]),o=_.useContext(ub);return _.createElement("div",pp({className:tv(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),yb=Jy((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(gb),vb=_.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,c=e.primary,u=e.primaryTypographyProps,d=e.secondary,m=e.secondaryTypographyProps,p=Op(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),h=_.useContext(ub).dense,f=null!=c?c:n;null==f||f.type===Hv||a||(f=_.createElement(Hv,pp({variant:h?"body2":"body1",className:r.primary,component:"span",display:"block"},u),f));var g=d;return null==g||g.type===Hv||a||(g=_.createElement(Hv,pp({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},m),g)),_.createElement("div",pp({className:tv(r.root,i,h&&r.dense,l&&r.inset,f&&g&&r.multiline),ref:t},p),f,g)})),bb=Jy({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(vb);function xb(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Sb(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Eb(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Mb(e){return"function"==typeof e?e():e}var Cb=_.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,c=e.children,u=e.classes,d=e.className,m=e.container,p=e.elevation,h=void 0===p?8:p,f=e.getContentAnchorEl,g=e.marginThreshold,y=void 0===g?16:g,v=e.onEnter,b=e.onEntered,x=e.onEntering,S=e.onExit,E=e.onExited,M=e.onExiting,C=e.open,T=e.PaperProps,O=void 0===T?{}:T,A=e.transformOrigin,w=void 0===A?{vertical:"top",horizontal:"left"}:A,N=e.TransitionComponent,R=void 0===N?cb:N,k=e.transitionDuration,L=void 0===k?"auto":k,I=e.TransitionProps,P=void 0===I?{}:I,q=Op(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),D=_.useRef(),z=_.useCallback((function(e){if("anchorPosition"===l)return a;var t=Mb(r),n=(t&&1===t.nodeType?t:nv(D.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+xb(n,i),left:n.left+Sb(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),$=_.useCallback((function(e){var t=0;if(f&&"anchorEl"===l){var n=f(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,f]),F=_.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:xb(e,w.vertical)+t,horizontal:Sb(e,w.horizontal)}}),[w.horizontal,w.vertical]),B=_.useCallback((function(e){var t=$(e),n={width:e.offsetWidth,height:e.offsetHeight},i=F(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Eb(i)};var o=z(t),a=o.top-i.vertical,s=o.left-i.horizontal,c=a+n.height,u=s+n.width,d=rv(Mb(r)),m=d.innerHeight-y,p=d.innerWidth-y;if(a<y){var h=a-y;a-=h,i.vertical+=h}else if(c>m){var f=c-m;a-=f,i.vertical+=f}if(s<y){var g=s-y;s-=g,i.horizontal+=g}else if(u>p){var v=u-p;s-=v,i.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Eb(i)}}),[r,l,z,$,F,y]),j=_.useCallback((function(){var e=D.current;if(e){var t=B(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[B]),H=_.useCallback((function(e){D.current=Y.findDOMNode(e)}),[]);_.useEffect((function(){C&&j()})),_.useImperativeHandle(n,(function(){return C?{updatePosition:function(){j()}}:null}),[C,j]),_.useEffect((function(){if(C){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){j()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[C,j]);var U=L;"auto"!==L||R.muiSupportAuto||(U=void 0);var V=m||(r?nv(Mb(r)).body:void 0);return _.createElement(ib,pp({container:V,open:C,ref:t,BackdropProps:{invisible:!0},className:tv(u.root,d)},q),_.createElement(R,pp({appear:!0,in:C,onEnter:v,onEntered:b,onExit:S,onExited:E,onExiting:M,timeout:U},P,{onEntering:Qy((function(e,t){x&&x(e,t),j()}),P.onEntering)}),_.createElement(Pv,pp({elevation:h,ref:H},O,{className:tv(u.paper,O.className)}),c)))})),Tb=Jy({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Cb);function Ob(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Ab({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:Ob(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return j.createElement("i",{style:i},j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},j.createElement("path",{d:e})))}const wb="alternative-menu-item",Nb=e=>{const{nested:t,className:n,...r}=e,i=(({nested:e,dir:t})=>sy((n=>({root:{textAlign:"ltr"===t?"start":"end","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"},...e&&"ltr"===t&&{paddingLeft:n.spacing(4)},...e&&"rtl"===t&&{paddingRight:n.spacing(4)}}}))))(e)();return j.createElement(fb,_m({className:`${i.root} ${n}`},r))},Rb=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${wb}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function kb({title:e,selected:t,onClick:n,nested:r,icon:i,bold:o,dir:a}){const s=Le.detectTextDirection(e);return j.createElement(Nb,{nested:r,role:"menuitem",button:!0,onClick:n,className:wb,onKeyDown:Rb,dir:a,autoFocus:t},j.createElement(bb,{primary:e,primaryTypographyProps:{dir:s,...o&&{style:{fontWeight:600}}}}),j.createElement(yb,{style:{minWidth:16}},j.createElement(Ab,{d:t?Tm:""})),i&&j.createElement(yb,{style:{minWidth:16}},j.createElement(Ab,{d:i.d})))}kb.propTypes={title:Ym.string.isRequired,selected:Ym.bool,onClick:Ym.func.isRequired,nested:Ym.bool,icon:Ym.shape({d:Ym.string.isRequired}),bold:Ym.bool,dir:Ym.string.isRequired},kb.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},Nb.propTypes={nested:Ym.bool,className:Ym.string},Nb.defaultProps={nested:!1,className:wb};const Lb={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"}}};function Ib({chartId:e,alignTo:t,currentId:n,dir:r,dock:i,list:o,onClose:a,show:s,instruction:l}){const c=o.map(((t,i)=>{var s;return j.createElement(j.Fragment,{key:t.id},j.createElement(kb,{icon:t.icon,title:t.title,bold:t.groupItem,selected:t.selected,onClick:()=>{t.onSelect&&t.onSelect(n),a(`${e}-${t.id}`)},dir:r}),(null===(s=t.children)||void 0===s?void 0:s.length)>0&&j.createElement(mb,{dense:!0,dir:r,component:"div",disablePadding:!0},t.children.map((e=>j.createElement(kb,{key:e.id,nested:!0,title:e.title,selected:e.selected,onClick:()=>{e.onSelect(),a(t.id)},dir:r})))),i<o.length-1&&j.createElement(ab,{key:`divider-${t.id}`}))}));return j.createElement(Tb,_m({anchorEl:t,open:s,onClose:a},Lb[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),j.createElement(mb,{dense:!0,disablePadding:!0,dir:r,"aria-label":l,component:"nav"},c))}Ib.propTypes={chartId:Ym.string.isRequired,alignTo:Ym.any,currentId:Ym.string.isRequired,dir:Ym.string.isRequired,dock:Ym.string.isRequired,list:Ym.array,onClose:Ym.func.isRequired,show:Ym.bool.isRequired,instruction:Ym.string.isRequired},Ib.defaultProps={list:[],alignTo:null};const Pb="title-button",qb="active-title-button",Db=Ky((({children:e,...t})=>j.createElement(Vv,_m({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),zb=Ky(Vv)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class $b extends j.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasPopoverOptions:!1,disableCyclicButton:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.alignToRef=j.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n,showGroupDimOptions:r}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&(n||r)&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r,showGroupDimOptions:i}=this.props;n&&(r||i)&&n.getPopoverOptions().then((e=>{t.hasPopoverOptions!==(0!==e.length)&&this.setState({hasPopoverOptions:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${Pb}`);t&&(t.focus(),t.classList.add(qb))}this.props.popover.getPopoverOptions().then((e=>{this.setState({open:!0,list:e})}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${Pb}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${qb}`);e&&(e.classList.remove(qb),setTimeout((()=>{e.focus()}),50))}}render(){const{chartId:e,titleData:t,popover:n,translator:r,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:c,showGroupDimOptions:u}=this.props,d={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},m=t.breadcrumbs.length,p=i||Boolean(!t.drillUp)||this.state.inSelection,h=t.breadcrumbs.map(((e,n)=>j.createElement(Db,{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:t.drillUp(m-n),title:e},j.createElement("span",{style:d},e),j.createElement(Ab,_m({},Am,{size:"small",style:{margin:"0 8px"}}))))),f=c||u?this.state.hasPopoverOptions:l,g=n&&!this.state.open?this.openPopover:this.closePopover,y=!n||i||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&y&&"none",...a?{padding:a}:{paddingTop:0,paddingBottom:0},...s&&{minWidth:s}};this.state.open&&(v.background="rgba(0,0,0,0.08)");const b=()=>{this.setState({disableCyclicButton:!0})},x=Le.detectTextDirection(t.text),S=j.createElement(Db,{"aria-label":r.get(`Accessibility.${n&&f?"Alternative":"Normal"}.Instructions`,[t.text]),style:v,onClick:y?void 0:g,title:t.text,tabIndex:y?-1:0,onFocus:y?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:y?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${Pb} ${t.id}`,"data-id":`${e}-${t.id}`},t.locked&&j.createElement(Ab,_m({},Cm,{size:"small",title:r.get("Tooltip.selections.locked")})),j.createElement("span",{style:d,dir:x},t.text),n&&f&&j.createElement(Ab,_m({},Om,{size:"small",style:{margin:"0 8px"}})));return j.createElement(j.Fragment,null,t.icon&&t.icon.onClick&&j.createElement(zb,{variant:"outlined",disabled:this.state.disableCyclicButton||this.state.inSelection,onClick:i?void 0:()=>t.icon.onClick({onError:b})},j.createElement(Ab,_m({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip)}))),t.icon&&!t.icon.onClick&&j.createElement(Ab,_m({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip),style:{margin:"0 4px 0 0"}})),h,j.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},S),n&&f&&j.createElement(Ib,{chartId:e,dock:n.dock,dir:n.dir,currentId:t.id,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.list,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function Fb(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function Bb(e){function t(e){return!e.isDimension&&ve.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:n}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||t(this.settings.settings)?Math.max(28,n):Math.max(20,n)},render(){const{settings:{app:e,disabled:n,explicitItemInfos:r,hyperCube:i,hyperCubeDef:o,isDimension:a,minWidth:s,model:l,onChangeToAlternative:c,padding:u,rtl:d,selections:m,skipAttributeExpressions:p,translator:h,supportConditional:f=!1},layout:{dock:g}}=this.settings,y="top"!==g&&"bottom"!==g||!d?"ltr":"rtl",v=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}(g,this.rect),b=o&&o.qLayoutExclude&&o.qLayoutExclude.qHyperCubeDef,x=b&&b[a?"qDimensions":"qMeasures"]||[],S=r||i[a?"qDimensionInfo":"qMeasureInfo"],E=a?$m:Bm,M=a?Fm:jm,C=Boolean(l&&l.colorSupport&&l.modifiers),T=C&&((O=this.settings.settings).isDimension&&ve.getValue(O,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||t(this.settings.settings));var O;const A=S.map(((t,r)=>{var i;const o="number"==typeof t.explicitColumn?t.explicitColumn:r,y=M(t,o,l,e),v=r===S.length-1,b=Boolean(e)&&a&&"N"!==t.qGrouping,O=C||b?E({column:o,activeInfo:t,altList:x,app:e,dir:d?"rtl":"ltr",dock:Fb(g),model:l,onChange:c,skipAttributeExpressions:p,translator:h,allowChangeOfAlternatives:C}):void 0;return j.createElement(j.Fragment,{key:t.cId},j.createElement($b,{chartId:null!==(i=null==l?void 0:l.id)&&void 0!==i?i:"",showGroupDimOptions:b,popover:O,titleData:y,model:l,translator:h,selections:m,disabled:n(),style:this.style,isDimension:a,padding:u,minWidth:s,hasAlternative:T,supportConditional:f}),!v&&j.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return j.createElement("div",{style:v,dir:y},A)}}}$b.propTypes={chartId:Ym.string.isRequired,disabled:Ym.bool.isRequired,padding:Ym.string,minWidth:Ym.string,titleData:Ym.shape({breadcrumbs:Ym.arrayOf(Ym.string).isRequired,icon:Ym.shape({path:Ym.shape({d:Ym.string.isRequired}),tooltip:Ym.string.isRequired,onClick:Ym.func}),index:Ym.number.isRequired,locked:Ym.bool.isRequired,text:Ym.string.isRequired,popoverText:Ym.string.isRequired,drillUp:Ym.func,id:Ym.string.isRequired}).isRequired,popover:Ym.shape({dir:Ym.string.isRequired,dock:Ym.string.isRequired,getPopoverOptions:Ym.func.isRequired}),translator:Ym.shape({get:Ym.func.isRequired}).isRequired,selections:Ym.shape({isActive:Ym.func,addListener:Ym.func,removeListener:Ym.func}),style:Ym.shape({fontSize:Ym.string,color:Ym.string,fontFamily:Ym.string}).isRequired,isDimension:Ym.bool.isRequired,hasAlternative:Ym.bool.isRequired,supportConditional:Ym.bool.isRequired,showGroupDimOptions:Ym.bool.isRequired},$b.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const jb=Jp({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 _b=eh({productionPrefix:"qdeeb",disableGlobal:!0,seed:""});function Hb(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){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!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={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",W.render(function(e,t){return j.createElement(ry,{generateClassName:t},j.createElement(Xy,{theme:jb},e))}(e,_b),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&W.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(W.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function Ub(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:Ub(i,t,n)},i}function Vb(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),Ub(i,a,l,e.invert)}))}const Yb={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,d=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,d=t<.5?180:0),a(ce({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Wb({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=ce({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const m=o?n:t,p=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),h=(u-p)/2,f=h+d.major+p/2;return{item:d,boxCenter:f,boxWidth:p,boxPadding:h,rendWidth:t,rendHeight:n}}function Xb({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=ce(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ce(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ce(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const m=i.minor||{};let p;const h={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:ce(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})};for(let n=0,r=e.length;n<r;n++)p=e[n],h[p]=s.resolve({data:t,defaults:l[p],settings:i[p],scaled:c});return h}const Gb=["oob"];const Kb={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Xb({keys:Gb,data:i,defaultSettings:{oob:Yb.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Wb}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:m,rendWidth:p,rendHeight:h}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),f=c[u].data,g=[];if(d.oob.show){g.push(Yb.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:p,rendHeight:h,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:Gb,symbol:s,dockValue:n});return d}},Jb={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Zb=["hat"];function Qb(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 ex({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const d=(n+e.major)*l;let m=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const p=ce({},e.hat,{type:"path",d:Qb(m)});m=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[p,ce({},e.hat,{type:"path",d:Qb(m)})]}const tx={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=Xb({keys:Zb,data:r,defaultSettings:Jb,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=Wb}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:m,rendHeight:p}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),h=s[l].data,f=[];c.hat.show&&f.push(...ex({item:c,boxWidth:u,boxPadding:d,rendWidth:m,rendHeight:p,flipXY:n}));const g={type:"container",data:h,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Zb});return c}},nx="point-label-cross-placement";var rx="unclassified",ix="equal-equal",ox="equal-higher",ax="equal-lower",sx="equal-void",lx="higher-equal",cx="higher-higher-acute",ux="higher-higher-obtuse",dx="higher-lower-negative",mx="higher-lower-positive",px="higher-void",hx="lower-equal",fx="lower-higher-negative",gx="lower-higher-positive",yx="lower-lower-acute",vx="lower-lower-obtuse",bx="lower-void",xx="void-equal",Sx="void-higher",Ex="void-lower",Mx="void-void";function Cx(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Tx(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),i=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),o=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function Ox({previous:e,current:t,next:n}){const r=e&&e.value,i=t&&t.value,o=n&&n.value;return e||n?e?n?r===i?i===o?ix:i<o?ox:ax:i===o?r>i?lx:hx:r>i?i<o?Tx(e,t,n)>90?ux:cx:Cx(e,t)>Cx(e,n)?mx:dx:i>o?Tx(e,t,n)>90?vx:yx:Cx(e,t)>Cx(e,n)?gx:fx:r===i?sx:r>i?px:bx:i===o?xx:i<o?Sx:Ex:Mx}var Ax={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"};function wx({bounds:e,size:t}){const{x:n,y:r,width:i,height:o}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+i/2)>=0&&Math.ceil(n+i/2)<=t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height:Math.floor(n+i)>0&&Math.ceil(n)<t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height}function Nx({config:e,crossPlacements:t,node:n,line:r,groupIndex:i,extract:o,style:a,measureText:s,size:l,horizontal:c,rtl:u,meta:d,showLabel:m}){var p,h;const f=o.label(n.data);if("string"!=typeof f&&"number"!=typeof f||""===f)return!1;const g=(()=>{var e,t;const r=s({fontFamily:a.fontFamily,fontSize:a.fontSize,text:f});if(null===(e=n.data)||void 0===e||null===(e=e.value)||void 0===e||!e.maxLabelWidth||r.width<=(null===(t=n.data)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.maxLabelWidth))return r;const i=`${a.fontSize} ${a.fontFamily}`,o=Lo.tokenize(f,i,"…",3,n.data.value.maxLabelWidth);return r.lines=o.map((e=>({text:e,size:s({fontFamily:a.fontFamily,fontSize:a.fontSize,text:e})}))),r.width=Math.max(...r.lines.map((e=>e.size.width))),r.height*=o.length,r})(),{localBounds:y}=n,{"stroke-width":v}=n.attrs,b=o.pointValue(n.data),x=!(null===(p=n.data)||void 0===p||null===(p=p.value)||void 0===p||!p.hasBackground),S=x?{X:3,Y:2}:{X:1,Y:0},E=x?{X:2,Y:2}:{X:0,Y:0},M={x:y.x+y.width/2,y:y.y+y.height/2,width:g.width+2*S.X+2*E.X,height:g.height+2*S.Y+2*E.Y},C=`${M.x}-${M.y}`,T=!c&&!u,O=c?l.height:l.width,A=(c?M.y:M.x)/O,w=(T?1-A:A)<=(O<=200?.25:.1),N=null===(h=n.data)||void 0===h||null===(h=h.value)||void 0===h||null===(h=h.label)||void 0===h?void 0:h.placement,R=Object.keys(Ax).map((e=>Ax[e])),k={key:C,config:e,node:n,line:r,group:i,value:b,labelMeasurements:g,bounds:M,inside:wx({bounds:y,size:l}),border:v?v/2:0,classification:rx,setClassification(e){k.classification=e},preferences:[],setPreferences(e){k.preferences.push(...e)},fixedPlacement:R.includes(N)?N:void 0,placement:void 0,setPlacement(e){k.placement=e,t.setPlacement(e)},duplicate:!1,setDuplicate(){k.duplicate=!0},extreme:d.getExtreme(C),elite:w,show:e.labels&&m(n)};return k}function Rx({configs:e,crossPlacements:t,nodes:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,showLabel:c}){const u=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=n.filter((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:n,right:r,bottom:i,left:o}=t;return[n,r,i,o].some((t=>-1!==t.indexOf(e)))}}}({nodes:n}),d=function({nodes:e,by:t,lineId:n}){const r=e.reduce(((e,r,i)=>{const o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:n(r)}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:n,by:r.majorValue,lineId:r.lineId}).map(((n,d)=>n.map((n=>({line:n.line,item:Nx({config:e.get(n.node.key),crossPlacements:t,node:n.node,line:n.line,groupIndex:d,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,meta:u,showLabel:c})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{})));return d.filter((e=>Object.keys(e).length))}var kx={[ix]:[Ax.TOP,Ax.BOTTOM],[ox]:[Ax.BOTTOM,Ax.BOTTOM_RIGHT],[ax]:[Ax.TOP,Ax.TOP_RIGHT],[sx]:[Ax.TOP,Ax.BOTTOM],[lx]:[Ax.LEFT,Ax.BOTTOM_LEFT,Ax.TOP,Ax.TOP_RIGHT],[cx]:[Ax.BOTTOM,Ax.BOTTOM_LEFT,Ax.LEFT,Ax.TOP_RIGHT],[ux]:[Ax.BOTTOM,Ax.TOP],[dx]:[Ax.TOP,Ax.TOP_RIGHT,Ax.RIGHT],[mx]:[Ax.BOTTOM,Ax.BOTTOM_LEFT,Ax.LEFT],[px]:[Ax.TOP],[hx]:[Ax.TOP],[fx]:[Ax.TOP,Ax.TOP_LEFT],[gx]:[Ax.BOTTOM_RIGHT],[yx]:[Ax.TOP,Ax.TOP_LEFT,Ax.LEFT,Ax.TOP_RIGHT,Ax.RIGHT],[vx]:[Ax.TOP,Ax.BOTTOM],[bx]:[Ax.TOP],[xx]:[Ax.TOP],[Sx]:[Ax.TOP,Ax.BOTTOM],[Ex]:[Ax.TOP,Ax.BOTTOM,Ax.LEFT],[Mx]:[Ax.TOP],[rx]:[Ax.TOP,Ax.BOTTOM,Ax.RIGHT,Ax.LEFT,Ax.TOP_RIGHT,Ax.BOTTOM_RIGHT,Ax.BOTTOM_LEFT,Ax.TOP_LEFT]};function Lx({configs:e,crossPlacements:t,nodes:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,showLabel:c}){const u=Rx({configs:e,crossPlacements:t,nodes:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,showLabel:c}),d=[...u.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[m]=d,p=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e];if(n.config.lines){const{line:e}=n;r[e]||(r[e]=[]),r[e].push(n.bounds)}}}const i=Object.keys(r).map((e=>r[e])),o=[];for(let e=0;e<i.length;e++)for(let n=0;n<i[e].length-1;n++){const r=i[e][n],a=i[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,c=s.y1-s.y2;Math.sqrt(l*l+c*c)>t&&o.push(s)}return o}({groups:u,threshold:null==m?void 0:m.node.localBounds.height}),h={getItems:()=>d,getLines:()=>p};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const i=n[r];if(!i.config.fixed){const n=Ox({previous:e[t-1]&&e[t-1][i.line],current:i,next:e[t+1]&&e[t+1][i.line]});i.setClassification(n)}}}}({groups:u}),h.getItems().forEach((e=>{e.setPreferences(kx[e.classification])})),h}function Ix({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function Px({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,i=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&i>=0&&i<=1}function qx({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},i={x:t.x+t.width,y:t.y+t.height},o={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:i.x,y2:i.y},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:n.x,y2:n.y};return Px({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||Px({line1:e,line2:a})||Px({line1:e,line2:s})||Px({line1:e,line2:l})}({line:t,rect:e})))}const Dx={x:0,width:0,y:0,height:0};const zx=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),$x=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Fx=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Bx=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),jx=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),_x=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Hx=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),Ux=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var Vx=2.5,Yx=4;const Wx=[Ax.TOP,Ax.TOP_LEFT,Ax.TOP_RIGHT],Xx=[Ax.BOTTOM,Ax.BOTTOM_LEFT,Ax.BOTTOM_RIGHT];function Gx({position:e}){const t={x:Vx,width:-5,y:0,height:0},n=Wx.indexOf(e)>-1,r=Xx.indexOf(e)>-1;return n&&(t.y=Yx,t.height=-4),r&&(t.height=-4),t}function Kx({cx:e,cy:t,r:n,degrees:r}){const i=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(i)),y:Math.round(t+n*-Math.cos(i))}}function Jx({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}function Zx({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),i=e.bounds.x,o=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=15){const a=Jx({coordinates:Kx({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=15){const a=Jx({coordinates:Kx({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const Qx=void 0;function eS({item:e,validator:t,force:n=!1}){const r={[Ax.TOP]:zx,[Ax.TOP_RIGHT]:$x,[Ax.RIGHT]:Fx,[Ax.BOTTOM_RIGHT]:Bx,[Ax.BOTTOM]:jx,[Ax.BOTTOM_LEFT]:_x,[Ax.LEFT]:Hx,[Ax.TOP_LEFT]:Ux};if(e.fixedPlacement)return r[e.fixedPlacement]({item:e});const i=[...e.preferences,...Object.keys(Ax).map((e=>Ax[e])).filter((t=>-1===e.preferences.indexOf(t)))],o=[];for(let a=0;a<i.length;a++){const s=i[a],l=r[s]({item:e}),c=Gx({position:s}),u=t({item:e,placement:l,adjustment:c,ignoreLines:n});if(n&&u.inside&&o.push(l),u.valid)return l}const a=()=>Zx({item:e,validator:t,force:n});if(n){const e=a();return e||(o[0]||Qx)}return(e.extreme||e.elite)&&a()||Qx}function tS({configs:e,crossPlacements:t,model:n,size:r,all:i}){const o={},a=n.getItems(),s=[...a.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2}))),...t.getPlacements({configs:e})],l=[],c=n.getLines();a.forEach((e=>{const{data:t}=e.node;if(!e.show||!e.inside||t.null&&t.null.value||t.interpolated&&t.interpolated.value)return;const{key:n}=e;if(o[n]&&!e.config.duplicates)return void e.setDuplicate();o[n]=!0;const a=function({size:e,lines:t,placements:n}){return function({item:r,placement:i,adjustment:o=Dx,ignoreLines:a=!1}){const s={inside:Ix({item:r,placement:i,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=qx({candidate:{x:i.x+o.x,y:i.y+o.y,width:r.bounds.width+o.width,height:r.bounds.height+o.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:r,lines:c,placements:s}),u=eS({item:e,validator:a});u?(u.height=e.bounds.height,u.width=e.bounds.width,s.push(u),e.setPlacement(u)):i&&l.push({item:e,validator:a})})),l.forEach((e=>{const{item:t,validator:n}=e,r=eS({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,s.push(r),t.setPlacement(r))}))}var nS={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},lineId:()=>{},enabled:()=>!0,configs:[],insideStrategy:"edge",labelSpace:{use:()=>!1,size:10},cache:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},created(){this.crossPlacements=function({cache:e,key:t}){var n;const r={isPrimary:!1};var i;return null!=e&&null!==(n=e.has)&&void 0!==n&&n.call(e,nx)||(r.isPrimary=!0,null==e||null===(i=e.set)||void 0===i||i.call(e,nx,{})),{reset:()=>{var n;const i=null==e||null===(n=e.get)||void 0===n?void 0:n.call(e,nx);i&&(r.isPrimary&&Object.keys(i).forEach((e=>delete i[e])),i[t]=[])},setPlacement:n=>{var r;const i=null==e||null===(r=e.get)||void 0===r?void 0:r.call(e,nx);i&&i[t].push(n)},getPlacements:({configs:n})=>{var r;const i=null==e||null===(r=e.get)||void 0===r?void 0:r.call(e,nx);if(!i)return[];const o=[],a=n.getCollection().filter((e=>!e.labels&&!!e.labelKeys.length)).reduce(((e,t)=>(e.push(...t.labelKeys),e)),[]);return Object.keys(i).forEach((e=>{e!==t&&a.some((t=>t===e))&&o.push(...i[e])})),o}}}({cache:this.settings.settings.cache,key:this.settings.key})},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},{orientation:t,rtl:n,labelSpace:r}=this.settings.settings,{use:i,size:o}=r;if(i()){const r="horizontal"===t;e.edgeBleed.top=r?o:0,e.edgeBleed[n?"left":"right"]=r?0:o}return e},render(){this.crossPlacements.reset();const{settings:e}=this.settings,{enabled:t}=e;if(!t())return[];const n=function({configs:e=[]}={}){const t={},n=[];return e.forEach((e=>{const{key:r}=e;t[r]={labels:void 0===e.labels||e.labels,labelKeys:Array.isArray(e.labelKeys)?e.labelKeys:[],lines:void 0===e.lines||e.lines,fixed:void 0!==e.fixed&&e.fixed,duplicates:void 0!==e.duplicates&&e.duplicates},n.push(t[r])})),{meta:{allKeys:e.map((e=>e.key))},getCollection:()=>n,get:e=>t[e],getFirstLabelKey:()=>{var t;return null===(t=e.find((e=>e.labels)))||void 0===t?void 0:t.key}}}({configs:e.configs}),r=n.getFirstLabelKey();if(!r)return[];if(!this.chart.component(r))return[];const i=this.chart.findShapes("circle, path, rect").filter((e=>n.meta.allKeys.includes(e.key)));if(!i.length)return[];const o="horizontal"===e.orientation,a=o?"x":"y";i.sort(((e,t)=>e.localBounds[a]-t.localBounds[a]));const s={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineId:e.lineId},{height:l,width:c,edgeBleed:u}=this.rect,d={height:l,width:c,edgeBleed:u,insideStrategy:e.insideStrategy},{crossPlacements:m,style:p}=this,h=Lx({configs:n,crossPlacements:m,nodes:i,extract:s,style:p,measureText:this.renderer.measureText,size:d,horizontal:o,rtl:e.rtl,showLabel:e.showLabel});!function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:h}),tS({configs:n,crossPlacements:m,model:h,size:d,all:e.all});const f=h.getItems(),g=[];f.filter((e=>e.placement)).forEach((e=>{var t,n,r,i,o;const a=null!==(t=e.node.data.value)&&void 0!==t&&t.hasBackground?2:0,l=null!==(n=e.node.data.value)&&void 0!==n&&n.hasBackground?2:0,c=(null===(r=e.node.data.value)||void 0===r||null===(r=r.style)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.fontSize)||p.fontSize,u=(null===(i=e.node.data.value)||void 0===i||null===(i=i.style)||void 0===i||null===(i=i.label)||void 0===i?void 0:i.fontFamily)||p.fontFamily,d=(null===(o=e.node.data.value)||void 0===o?void 0:o.labelColor)||p.fill;e.labelMeasurements.lines?e.labelMeasurements.lines.forEach(((t,n)=>{g.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+(n+.5)*t.size.height+a+l,fontSize:c,fontFamily:u,fill:d,text:t.text,data:e.node.data.value,baseline:"central",anchor:"middle"})})):g.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2+a+l,fontSize:c,fontFamily:u,fill:d,text:s.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})}));return[...f.filter((e=>{var t;return e.placement&&(null===(t=e.node.data.value)||void 0===t?void 0:t.hasBackground)})).map((e=>{var t;return{type:"rect",x:e.placement.x+2,y:e.placement.y+2,rx:3,ry:3,fill:null===(t=e.node.data.value)||void 0===t?void 0:t.labelBackgroundColor,width:e.placement.width-4,height:e.placement.height-4}})),...g]}},rS={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var iS={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,c=this.settings.settings.primaryExtremum(),u=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==c,m=l.length&&void 0!==u;if(!d&&!m)return[];const p=s.map((e=>e.ref)),h=l.map((e=>e.ref)),f=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?r:i;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const i="max"===e?e=>e>t:e=>e<t,o=n?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return r.filter(o)})({type:e,extremum:a,items:l}))}));const l=(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])});return l}({type:t,primaryExtremum:c,secondaryExtremum:u,primaryItems:e.filter((e=>p.includes(e.end.source.field))),secondaryItems:e.filter((e=>h.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!f.length)return[];const g="horizontal"===n,y=this.rect[g?"width":"height"],v=this.resolver.resolve({data:{items:f},settings:{major:a},scaled:{major:y}}),b=("max"===t?90:-90)-(g?0:90)-(!g&&r?180:0),x=o/2*i,{fill:S}=this.settings.style,E=v.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:S,startAngle:b,x:g?y*e.major:x,y:g?x:y*e.major,data:e.data})));return E}};function oS({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function aS({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))],i=e.findShapes("path").filter((e=>r.some((t=>t===e.key))));return i.reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function sS({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function lS({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(Ha.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function cS({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:c,legendTap:u}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let m=[c?e=>e.color.value:r[d]].filter(Boolean);if(i&&l&&m.push((e=>e.color.value)),!i&&u&&(m=[e=>e.color.value]),!m.length)return[];const p=function({brush:e,chart:t}){return("value"===e.type?sS:lS)({brush:e,chart:t})}({brush:s,chart:o});return p?n.reduce(((e,t,n)=>(m.some((e=>p({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function uS({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Ha.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/u))}))),m=d.map((e=>e.offset)),p=m.lastIndexOf(0),h=m.indexOf(1),f=d.slice(-1===p?0:p,-1===h?d.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function dS({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(Ha.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,c=0===l?1:l,u=o.domain(),d=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=o(t)||i;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const r=u[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/c))})}const m=d.map((e=>e.offset)),p=m.lastIndexOf(0),h=m.indexOf(1),f=d.slice(-1===p?0:p,-1===h?d.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function mS({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:d}){const m=r[e];if("gradient"!==m.type)return m;const{type:p,nil:h}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:c}){const u=e.scale(Ha.SCALE.MAJOR),d=e.scale(Ha.SCALE.COLOR),m=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),p=t.filter((e=>-1!==n.indexOf(e.index))),h=("vertical"===o&&c?p.reverse():p).map((e=>e.item)),f=h.map((e=>m(e.major.value))),g=Math.min(...f),y=Math.max(...f)-g,v=0===y?1:y,b=f.map(((e,t)=>0===t?0:t===f.length-1?1:(e-g)/v)),x=[];for(let e=0;e<h.length;e++){const t=h[e],n=a?t.color.value:d(t.color.value)||i,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===h.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:m,fallback:h,orientation:u,isColorCode:"color"===p,groupedByMeasure:l,itemsPerGroup:c,rtl:d});return("continuous"===p?uS:dS)({chart:t,selected:a,connection:n,gradient:m,fallback:h})}function pS({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:d,rtl:m,count:p}){const h=t.getLine(l,c),{attrs:f}=h,g=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:f.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:d,count:m}){return{path:l.map(((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:u,stroke:mS({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:f,rtl:m,count:p})))}function hS({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:m,rtl:p}){const h=function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:n}),f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const i=n.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:h,seriesInfo:n}),{lines:g}=f.reduce(((n,o)=>{const h=cS({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(h.length<2)return n;const f=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:h});return f.length?(n.lines.push(...pS({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:m,lineKey:o.lineKey,primary:o.primary,selected:h,connections:f,rtl:p,count:o.items.length})),n):n}),{lines:[]}),y=[];return g.forEach((e=>y.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),y}var fS={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:aS({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=hS({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=aS({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return hS({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const gS=()=>{const e=F();return e.use(B),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",xm(e))};e.interaction("hammer",xm(Hammer))}($)),e.use(Vb),e.use((function(e){e.renderer("react",Hb()),e.component("data-title",Bb(e.renderer("svg")()))})),e.renderer("react-qcm",X),e.component("axis-title",G),e.component("disclaimer",K),e.component("scrollbar",Zs),e.component("point-label",nS),e.component("label-space",rS),e.component("time-axis",Wd.picassoComponents.timeAxis),e.component("axis-overlay",Wd.picassoComponents.axisOverlay),e.component("reference-line-labels",wa),e.component("box-sliced-hat",tx),e.component("box-out-of-bounds",Kb),e.component("data-out-of-bounds-marker",iS),e.component("scroll-hint",wo),e.component("brush-highlighter",fS),e.scale("time",Wd.picassoScales.time),e.symbol("line-point",oS),e},yS=e=>"[object Object]"===Object.prototype.toString.call(e),vS=e=>Array.isArray(e);function bS(e,t){if(e===t)return!0;if(vS(e)){if(!vS(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!bS(e[n],t[n]))return!1;return!0}if(yS(e)){if(!yS(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!bS(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function xS({enable:e=!0}={}){const t=a(),i=()=>Date.now().toString()+Math.random(),[o,s]=n(i()),l={properties:void 0};return r((()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then((e=>{const t=ce(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){var n,r,i,o;const a={properties:!1,exclude:!1};if(e===t)return a;const s=ce(!0,{},e),l=ce(!0,{},t);return a.exclude=!bS(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(r=l.qHyperCubeDef)||void 0===r?void 0:r.qLayoutExclude),null===(i=s.qHyperCubeDef)||void 0===i||delete i.qLayoutExclude,null===(o=l.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,a.properties=!bS(s,l),a}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(i())}))};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}}),[e]),o}const SS={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},ES=e=>void 0===e.marker?SS.circle:SS[e.marker],MS=e=>void 0===e.markerFill||e.markerFill;function CS({series:e,layoutService:t}){switch(ou(e)){case Ua.TYPE.MARKER:return(e=>({marker:ES(e),fill:MS(e)}))(e);case Ua.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case Ua.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function TS(e=Ua.NOPE_SERIES,t=!0){return t?e.axis===Ua.AXIS.PRIMARY:e.axis===Ua.AXIS.PRIMARY||ou(e)===Ua.TYPE.BAR}var OS={exports:{}};var AS={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const wS="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var NS=wS;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=AS,o=NS,a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const m="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",i],[m,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=d++;o(e,i,t),u[e]=i,l[i]=t,c[i]=r,a[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),h("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${m}+`),h("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),h("FULL",`^${l[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),h("LOOSE",`^${l[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),h("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(OS,OS.exports);var RS=OS.exports;const kS=Object.freeze({loose:!0}),LS=Object.freeze({});var IS=e=>e?"object"!=typeof e?kS:e:LS;const PS=/^[0-9]+$/,qS=(e,t)=>{const n=PS.test(e),r=PS.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var DS={compareIdentifiers:qS,rcompareIdentifiers:(e,t)=>qS(t,e)};const zS=NS,{MAX_LENGTH:$S,MAX_SAFE_INTEGER:FS}=AS,{safeRe:BS,t:jS}=RS,_S=IS,{compareIdentifiers:HS}=DS;var US=class e{constructor(t,n){if(n=_S(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>$S)throw new TypeError(`version is longer than ${$S} characters`);zS("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?BS[jS.LOOSE]:BS[jS.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>FS||this.major<0)throw new TypeError("Invalid major version");if(this.minor>FS||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>FS||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<FS)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(zS("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),HS(this.major,t.major)||HS(this.minor,t.minor)||HS(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const e=this.prerelease[n],r=t.prerelease[n];if(zS("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return HS(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],r=t.build[n];if(zS("build compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return HS(e,r)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?BS[jS.PRERELEASELOOSE]:BS[jS.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===HS(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const VS=US;var YS=(e,t,n=!1)=>{if(e instanceof VS)return e;try{return new VS(e,t)}catch(e){if(!n)return null;throw e}};const WS=YS;var XS=(e,t)=>{const n=WS(e,t);return n?n.version:null};const GS=YS;var KS=(e,t)=>{const n=GS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const JS=US;var ZS=(e,t,n,r,i)=>{"string"==typeof n&&(i=r,r=n,n=void 0);try{return new JS(e instanceof JS?e.version:e,n).inc(t,r,i).version}catch(e){return null}};const QS=YS;var eE=(e,t)=>{const n=QS(e,null,!0),r=QS(t,null,!0),i=n.compare(r);if(0===i)return null;const o=i>0,a=o?n:r,s=o?r:n,l=!!a.prerelease.length;if(!!s.prerelease.length&&!l){if(!s.patch&&!s.minor)return"major";if(0===s.compareMain(a))return s.minor&&!s.patch?"minor":"patch"}const c=l?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};const tE=US;var nE=(e,t)=>new tE(e,t).major;const rE=US;var iE=(e,t)=>new rE(e,t).minor;const oE=US;var aE=(e,t)=>new oE(e,t).patch;const sE=YS;var lE=(e,t)=>{const n=sE(e,t);return n&&n.prerelease.length?n.prerelease:null};const cE=US;var uE=(e,t,n)=>new cE(e,n).compare(new cE(t,n));const dE=uE;var mE=(e,t,n)=>dE(t,e,n);const pE=uE;var hE=(e,t)=>pE(e,t,!0);const fE=US;var gE=(e,t,n)=>{const r=new fE(e,n),i=new fE(t,n);return r.compare(i)||r.compareBuild(i)};const yE=gE;var vE=(e,t)=>e.sort(((e,n)=>yE(e,n,t)));const bE=gE;var xE=(e,t)=>e.sort(((e,n)=>bE(n,e,t)));const SE=uE;var EE=(e,t,n)=>SE(e,t,n)>0;const ME=uE;var CE=(e,t,n)=>ME(e,t,n)<0;const TE=uE;var OE=(e,t,n)=>0===TE(e,t,n);const AE=uE;var wE=(e,t,n)=>0!==AE(e,t,n);const NE=uE;var RE=(e,t,n)=>NE(e,t,n)>=0;const kE=uE;var LE=(e,t,n)=>kE(e,t,n)<=0;const IE=OE,PE=wE,qE=EE,DE=RE,zE=CE,$E=LE;var FE=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return IE(e,n,r);case"!=":return PE(e,n,r);case">":return qE(e,n,r);case">=":return DE(e,n,r);case"<":return zE(e,n,r);case"<=":return $E(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const BE=US,jE=YS,{safeRe:_E,t:HE}=RS;var UE=(e,t)=>{if(e instanceof BE)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?_E[HE.COERCERTLFULL]:_E[HE.COERCERTL];let i;for(;(i=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),r.lastIndex=i.index+i[1].length+i[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?_E[HE.COERCEFULL]:_E[HE.COERCE]);if(null===n)return null;const r=n[2],i=n[3]||"0",o=n[4]||"0",a=t.includePrerelease&&n[5]?`-${n[5]}`:"",s=t.includePrerelease&&n[6]?`+${n[6]}`:"";return jE(`${r}.${i}.${o}${a}${s}`,t)};var VE,YE,WE,XE,GE=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}};function KE(){if(YE)return VE;YE=1;const e=/\s+/g;class t{constructor(n,o){if(o=r(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!h(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&f(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&m)|(this.options.loose&&p))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,f=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(f,A(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],c),o("comparator trim",e),e=e.replace(s[l.TILDETRIM],u),o("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),o("caret trim",e);let g=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>O(e,this.options)));a&&(g=g.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(s[l.COMPARATORLOOSE]))))),o("range list",g);const v=new Map,b=g.map((e=>new i(e,this.options)));for(const e of b){if(h(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const x=[...v.values()];return n.set(t,x),x}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>g(t,n)&&e.set.some((e=>g(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(w(this.set[t],e,this.options))return!0;return!1}}VE=t;const n=new GE,r=IS,i=JE(),o=NS,a=US,{safeRe:s,t:l,comparatorTrimReplace:c,tildeTrimReplace:u,caretTrimReplace:d}=RS,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:p}=AS,h=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(o("comp",e,t),e=S(e,t),o("caret",e),e=b(e,t),o("tildes",e),e=M(e,t),o("xrange",e),e=T(e,t),o("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),v(n)?s="":v(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:v(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),v(n)?l="":v(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:v(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},M=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>C(e,t))).join(" ")),C=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const c=v(i),u=c||v(a),d=u||v(s),m=d;return"="===r&&m&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&m?(u&&(a=0),s=0,">"===r?(r=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):u?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},T=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),O=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),A=e=>(t,n,r,i,o,a,s,l,c,u,d,m)=>`${n=v(r)?"":v(i)?`>=${r}.0.0${e?"-0":""}`:v(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(d)?`<${c}.${+u+1}.0-0`:m?`<=${c}.${u}.${d}-${m}`:e?`<${c}.${u}.${+d+1}-0`:`<=${l}`}`.trim(),w=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return VE}function JE(){if(XE)return WE;XE=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}WE=t;const n=IS,{safeRe:r,t:i}=RS,o=FE,a=NS,s=US,l=KE();return WE}const ZE=KE();var QE=(e,t,n)=>{try{t=new ZE(t,n)}catch(e){return!1}return t.test(e)};const eM=KE();var tM=(e,t)=>new eM(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const nM=US,rM=KE();var iM=(e,t,n)=>{let r=null,i=null,o=null;try{o=new rM(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new nM(r,n)))})),r};const oM=US,aM=KE();var sM=(e,t,n)=>{let r=null,i=null,o=null;try{o=new aM(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new oM(r,n)))})),r};const lM=US,cM=KE(),uM=EE;var dM=(e,t)=>{e=new cM(e,t);let n=new lM("0.0.0");if(e.test(n))return n;if(n=new lM("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new lM(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!uM(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!uM(n,i)||(n=i)}return n&&e.test(n)?n:null};const mM=KE();var pM=(e,t)=>{try{return new mM(e,t).range||"*"}catch(e){return null}};const hM=US,fM=JE(),{ANY:gM}=fM,yM=KE(),vM=QE,bM=EE,xM=CE,SM=LE,EM=RE;var MM=(e,t,n,r)=>{let i,o,a,s,l;switch(e=new hM(e,r),t=new yM(t,r),n){case">":i=bM,o=SM,a=xM,s=">",l=">=";break;case"<":i=xM,o=EM,a=bM,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(vM(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const c=t.set[n];let u=null,d=null;if(c.forEach((e=>{e.semver===gM&&(e=new fM(">=0.0.0")),u=u||e,d=d||e,i(e.semver,u.semver,r)?u=e:a(e.semver,d.semver,r)&&(d=e)})),u.operator===s||u.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const CM=MM;var TM=(e,t,n)=>CM(e,t,">",n);const OM=MM;var AM=(e,t,n)=>OM(e,t,"<",n);const wM=KE();var NM=(e,t,n)=>(e=new wM(e,n),t=new wM(t,n),e.intersects(t,n));const RM=QE,kM=uE;const LM=KE(),IM=JE(),{ANY:PM}=IM,qM=QE,DM=uE,zM=[new IM(">=0.0.0-0")],$M=[new IM(">=0.0.0")],FM=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===PM){if(1===t.length&&t[0].semver===PM)return!0;e=n.includePrerelease?zM:$M}if(1===t.length&&t[0].semver===PM){if(n.includePrerelease)return!0;t=$M}const r=new Set;let i,o,a,s,l,c,u;for(const t of e)">"===t.operator||">="===t.operator?i=BM(i,t,n):"<"===t.operator||"<="===t.operator?o=jM(o,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&o){if(a=DM(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of r){if(i&&!qM(e,String(i),n))return null;if(o&&!qM(e,String(o),n))return null;for(const r of t)if(!qM(e,String(r),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(u=u||">"===e.operator||">="===e.operator,c=c||"<"===e.operator||"<="===e.operator,i)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(s=BM(i,e,n),s===e&&s!==i)return!1}else if(">="===i.operator&&!qM(i.semver,String(e),n))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=jM(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!qM(o.semver,String(e),n))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&c&&!o&&0!==a)&&(!(o&&u&&!i&&0!==a)&&(!m&&!d))},BM=(e,t,n)=>{if(!e)return t;const r=DM(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},jM=(e,t,n)=>{if(!e)return t;const r=DM(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var _M=(e,t,n={})=>{if(e===t)return!0;e=new LM(e,n),t=new LM(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=FM(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const HM=RS,UM=AS,VM=US,YM=DS,WM=(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>kM(e,t,n)));for(const e of a){RM(e,t,n)?(o=e,i||(i=e)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push(`<=${t}`):s.push(`${e} - ${t}`):s.push(`>=${e}`):s.push("*");const l=s.join(" || "),c="string"==typeof t.raw?t.raw:String(t);return l.length<c.length?l:t};var XM=Q({parse:YS,valid:XS,clean:KS,inc:ZS,diff:eE,major:nE,minor:iE,patch:aE,prerelease:lE,compare:uE,rcompare:mE,compareLoose:hE,compareBuild:gE,sort:vE,rsort:xE,gt:EE,lt:CE,eq:OE,neq:wE,gte:RE,lte:LE,cmp:FE,coerce:UE,Comparator:JE(),Range:KE(),satisfies:QE,toComparators:tM,maxSatisfying:iM,minSatisfying:sM,minVersion:dM,validRange:pM,outside:MM,gtr:TM,ltr:AM,intersects:NM,simplifyRange:WM,subset:_M,SemVer:VM,re:HM.re,src:HM.src,tokens:HM.t,SEMVER_SPEC_VERSION:UM.SEMVER_SPEC_VERSION,RELEASE_TYPES:UM.RELEASE_TYPES,compareIdentifiers:YM.compareIdentifiers,rcompareIdentifiers:YM.rcompareIdentifiers}),GM={BAR_IN_SECONDARY_AXIS:"0.23.1"};const KM=e=>!e||XM.lt(XM.coerce(e),XM.coerce(GM.BAR_IN_SECONDARY_AXIS)),JM=({layoutService:e})=>{const t=!KM(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[Ua.TYPE.BAR]:0,[Ua.TYPE.LINE]:0,[Ua.TYPE.MARKER]:0};return({series:r=Ua.NOPE_SERIES},i)=>{const o=TS(r,t),a=ou(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?Ha.SCALE.MINOR.PRIMARY:Ha.SCALE.MINOR.SECONDARY,collection:o?Ha.COLLECTION.PRIMARY:Ha.COLLECTION.SECONDARY,options:CS({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>ou(e)===t)).length,i=n.filter((e=>e.isPrimary)),o=n.filter((e=>!e.isPrimary)),a=[!!i.length&&i[0],!!o.length&&o[0]].filter((e=>!!e)),s=r(n,Ua.TYPE.BAR),l=r(i,Ua.TYPE.BAR),c=r(o,Ua.TYPE.BAR),u=e=>n.filter((t=>ou(t)===e)),d=u(Ua.TYPE.LINE).map((e=>wl(Ha.COMPONENT.POINT,e))),m=u(Ua.TYPE.MARKER).map((e=>({key:wl(Ha.COMPONENT.MARKER,e),type:e.options.marker}))),p=m.map((e=>e.key)),h=[];l>0&&h.push(`${Ha.COMPONENT.BAR}-${Ua.AXIS.PRIMARY}`),c>0&&h.push(`${Ha.COMPONENT.BAR}-${Ua.AXIS.SECONDARY}`);const f=[...h,...d,...p],{MINI_CHART:g}=Ha.COMPONENT,y=u(Ua.TYPE.LINE).map((e=>wl(g.LINE,e))),v=u(Ua.TYPE.MARKER).map((e=>wl(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${Ua.AXIS.PRIMARY}`,`${g.BAR}-${Ua.AXIS.SECONDARY}`,...y,...v]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:d,markerComponentKeys:p,barComponentKeys:h,seriesComponentKeys:f,miniComponentKeys:b,markers:m},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:u,isPrimary:TS}}};function ZM({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}function QM({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(Ce).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=o?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,{path:"/qHyperCubeDef",rect:ZM({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function eC({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):QM({genericObjectModel:e,layoutService:t})}const tC=e=>"number"==typeof e&&!Number.isNaN(e);function nC({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),o=i.filter((e=>ou(e.series)===Ua.TYPE.BAR)),a=i.filter((e=>ou(e.series)===Ua.TYPE.LINE)),s=i.filter((e=>ou(e.series)===Ua.TYPE.MARKER));return{min:Math.min(...i.filter((e=>tC(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>tC(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>tC(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>tC(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>tC(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>tC(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>tC(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>tC(e.qMax))).map((e=>e.qMax)))}}}}function rC({isPrimary:e,layoutService:t,seriesModel:n}){const r=nC({isPrimary:e,layoutService:t,seriesModel:n}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(Ua.TYPE.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=n,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?n:Math.max(n,o.max)})),o}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function iC({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,i=n.query.series(Ua.TYPE.BAR).filter((t=>t.isPrimary===e)).length;return!r||i<2?nC({isPrimary:e,layoutService:t,seriesModel:n}):rC({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:c}=a({dataPage:t}),u=i.query.seriesByAxis(e).some((e=>ou(e)===Ua.TYPE.BAR)),d=Number((u?Math.min(n,0):n).toFixed(13)),m=Number((u?Math.max(r,0):r).toFixed(13)),p=Number((u?Math.min(s.min,0):s.min).toFixed(13)),h=Number((u?Math.max(s.max,0):s.max).toFixed(13)),f=Number((u?Math.min(l.min,0):l.min).toFixed(13)),g=Number((u?Math.max(l.max,0):l.max).toFixed(13)),y=Number((u?Math.min(c.min,0):c.min).toFixed(13)),v=Number((u?Math.max(c.max,0):c.max).toFixed(13));o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(m)?m:0,o.implicit.bar.min=Number.isFinite(p)?p:0,o.implicit.bar.max=Number.isFinite(h)?h:0,o.implicit.line.min=Number.isFinite(f)?f:0,o.implicit.line.max=Number.isFinite(g)?g:0,o.implicit.marker.min=Number.isFinite(y)?y:0,o.implicit.marker.max=Number.isFinite(v)?v:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}function oC({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function aC({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=hr().domain([e,t]);return r.nice(n),r}(e,t,n),a={start:!0,stop:!0};if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const sC=50,lC=100,cC=200,uC=125;function dC({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return sC;case 1:return lC;case 2:return cC;default:return e*uC}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/r))}function mC({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=dC({config:e,layoutService:n,size:o}),c=aC({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),d={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},m="horizontal"===r.meta.major.orientation?"height":"width",p=e=>i(e)[m],h=t.formatter(e.formatter),f=()=>{const e=d.ticks.map(h),t=e.some(((t,n)=>e.indexOf(t)!==n));return!t&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(p))<=t})(e)};for(let e=l-1;e>0&&!f();e--)c.domain([a,s]),c.nice(e),[d.roundedMin,d.roundedMax]=c.domain(),d.ticks=c.ticks(e);return d}function pC({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function hC({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function fC({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=aC({min:r,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),c=l?pC:hC;o.ticks=s.filter(((e,t,n)=>c({tick:e,index:t,ticks:n})));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const u=t.formatter(e.formatter),d=o.ticks.map(u),m=d.some(((e,t)=>d.indexOf(e)!==t));return m&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function gC({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function yC({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const c=mC({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return oC({extrema:i,ticks:c.ticks})?c:fC({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({ticks:c,count:1}),p=[...gC({ticks:c,extrema:i}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return{min:u,max:d,values:p}}function vC({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return yC({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function bC({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,c=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=F.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){var r;const i=n.component(t.meta.seriesComponentKeys[0]),o=null!==(r=null==i?void 0:i.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),u=r.query.getExtrema();return vC({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function xC({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return Ee.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}function SC({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:Ua.TYPE.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===Ua.TYPE.LINE?2:t!==Ua.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==Ua.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function EC({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function MC({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:c,styleModel:u}){let d;const{theme:m,translator:p}=i,h={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return d=A({picasso:s,model:o,app:n,translator:p,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:m,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:Ha.SCALE.COLOR}},config:{auto:EC,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>h.wrappedScales,legendComponents:()=>h.legendComponents,legendInteractions:()=>h.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:o}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,c={eventName:"legend-c",key:Ha.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",styleOverrides:{title:s.query.legend.title.getStyle(),label:s.query.legend.label.getStyle()},rtl:"rtl"===l.direction,settings:SC({layoutService:n,seriesModel:r,colorService:o})},{components:u,interactions:d}=o.getLegend(c,{actions:a,navigationDisabled:!a.interact.enabled()}),m=o.getScales();return{components:u.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=m[`${Ha.SCALE.COLOR}Range`];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:d,scales:m}}({viewState:c,chart:r,environment:i,colorService:d,seriesModel:l,layoutService:a,actions:e,styleModel:u});h.wrappedScales=o,h.legendComponents=t,h.legendInteractions=n}}}),d}const CC="REJECTED",TC=()=>{},OC=2,AC=20,wC=200,NC=10;var RC={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-NC<=t.qTop,i=n.qLeft+n.qWidth+NC>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+NC>=t.qTop+t.qHeight,a=n.qLeft-NC<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var kC={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-NC<=t.qTop,i=n.qTop+n.qHeight+NC>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var LC={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const IC="pages";const PC="discretePan";function qC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:PC,pointers:1,threshold:10,enable(r,i){return this.started===PC||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{[`${PC}start`](e){e.preventDefault(),this.started=PC;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${PC}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${PC}end`](e){e.preventDefault(),this.started=!1},[`${PC}cancel`](e){e.preventDefault(),this.started=!1}}}}function DC({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function zC({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(wC,n));return{width:e,height:Math.max(AC,Math.min(n*OC,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function $C(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(CC),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(CC),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(CC),n=null)},i}const FC={command:{update:()=>{}}};function BC({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=FC,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(u)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:zC({layoutService:r}),request:c({definitionPath:o}),process:$C(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=O(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==CC)throw e}))}),50);return function(e,{onProcessing:t=TC,onDataPage:n=TC}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var jC={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var _C={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function HC(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function UC(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function VC(e){return UC(e.qMatrix,(e=>e[0].qElemNumber))-1}var YC={inTotal:function({layoutService:e}){const t=HC(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=HC(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=HC(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=VC(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const WC=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function XC(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return WC(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:WC(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return WC(e,n);return UC(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var GC={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=XC(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=XC(t).area(e(),l,a.qArea),d=VC(a),m=a.qArea.qHeight+d,p=c===o?(r.inView-m)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[p,r.inView>=r.inTotal?p+1:p+m/r.inView]}};function KC({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:p}=r[n.meta.chart.mode],h="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:y}=s,v=h?t.width:t.height,b=v/l>=m;switch(f){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/p:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:m}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return m>o;const p=(90-d)*(Math.PI/180);return m>Math.cos(p)*o}({chart:e,isHorizontal:h,axisKey:i,renderer:o,isGrouped:a,itemSize:m,label:y})?v/d:l:v/d}}function JC({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:m}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?jC:n?r?YC:GC:_C}({layoutService:r}),p=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,h=e=>e?p()/e:0,f=(e,t)=>-(e-t)*h(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:KC({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return h(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,f(n,r))),o=r?Math.abs(r*i/p()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return f(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:p(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=m({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:p(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=f(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*h(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(h(r)*n)}}}}function ZC({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:m,rtl:p}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const h=JC({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:p}),f=()=>{const e=h.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=h.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},y=e=>{const t=Date.now(),r=f(),a=g({pixelOffset:e,items:r}),s=h.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((h.validate.offset({pixelOffset:e,items:r})||m.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a.start,items:r})),m.preventSet("viewRange",h.getViewRange({pixelOffset:a.start.pixel,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item})));m.preventSet("viewRange",h.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a.start,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=f();n.set("itemSize",h.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?h.getUpperBound({items:e}):0;if("number"==typeof n)return h.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return h.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=g({pixelOffset:c,items:a});m.preventSet("viewRange",h.getViewRange({pixelOffset:u.start.pixel,items:a}));const d=h.getArea({itemOffset:u.start.item,items:a});return new Promise((e=>{i(d,{onDataPage:()=>{n.set("scaleRange",h.getScaleRange({offsets:u.start,items:a})),m.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;y(t)},scrollToRelative(e){const t=n.get("items"),r=h.convert.relativeToPixelOffset({relativeOffset:e,items:t});y(r)}}}function QC({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:m,renderer:p,areaBuffer:h,processDataPage:f=()=>{}}={}}){const g=C(),y=function({qMode:e}){switch(e){case"K":return kC;case"T":return LC;default:return RC}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(IC,[]),{add:t=>{const n=e.get(IC);n.length=0,n.push(t)},getCurrent:()=>e.get(IC)[0],getAll:()=>e.get(IC),contains:n=>t(e.get(IC)[0],n)}}({state:g,contains:y.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:y});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:h}),x=BC({dataStore:v,composition:y,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:f}),S=ZC({chart:e,componentKey:n,state:g,dataStore:v,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:m,renderer:p,areaBuffer:b,viewState:l,rtl:c}),M=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v}),T=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[qC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:DC({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:S});return{interactions:T,query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var eT={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function tT({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:e,defaultValue:t})=>n&&Object.hasOwnProperty.call(n,e)?n[e]:t}function nT({layoutService:e,dockService:t,themeService:n,flags:r}){const{BAR:i,LINE:o,POINT:a}=Fl,s=n.getStyles(),l=tT({layoutService:e,key:"bar"}),c=tT({layoutService:e,key:"line"}),u=()=>{const e=l({property:"strokeWidth",defaultValue:"none"});return e?i.STROKE.WIDTH[e.toUpperCase()]:0},d=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0;return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>l({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!u(),getStrokeWidth:()=>u(),getStrokeColor:()=>l({property:"strokeColor",defaultValue:{index:-1,color:i.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r,i,o,a,l;return{fill:null!==(e=null===(t=d("bar"))||void 0===t||null===(t=t.bar)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:s.label.value.color,useContrastColor:null===(n=null===(r=d("bar"))||void 0===r||null===(r=r.bar)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.value)||void 0===r?void 0:r.useContrastColor)||void 0===n||n,fontSize:null!==(i=null===(o=d("bar"))||void 0===o||null===(o=o.bar)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontSize)&&void 0!==i?i:12,fontFamily:null!==(a=null===(l=d("bar"))||void 0===l||null===(l=l.bar)||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.value)||void 0===l?void 0:l.fontFamily)&&void 0!==a?a:s.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>c({property:"lineCurve",defaultValue:o.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>c({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?o.WIDTH.FULL.DEFAULT:o.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=c({property:"lineType",defaultValue:o.TYPE.SOLID});return e&&o.TYPE[e.toUpperCase()]}},point:{getSize:()=>c({property:"dataPointSize",defaultValue:a.SIZE.DEFAULT}),label:{getStyle:()=>{var e,t,n,r,i,o;return{fill:null!==(e=null===(t=d("line"))||void 0===t||null===(t=t.line)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(n=null===(r=d("line"))||void 0===r||null===(r=r.line)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.value)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:s.label.value.fontSize,fontFamily:null!==(i=null===(o=d("line"))||void 0===o||null===(o=o.line)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:s.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{var e,t,n,r,i,o;return{fill:null!==(e=null===(t=d("marker"))||void 0===t||null===(t=t.marker)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(n=null===(r=d("marker"))||void 0===r||null===(r=r.marker)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.value)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:s.label.value.fontSize,fontFamily:null!==(i=null===(o=d("marker"))||void 0===o||null===(o=o.marker)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:s.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n,r,i,o;return{fontFamily:null!==(e=null===(t=d("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:s.axis.title.fontFamily,fontSize:null!==(n=null===(r=d("axis"))||void 0===r||null===(r=r.axis)||void 0===r||null===(r=r.title)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:s.axis.title.fontSize,color:null!==(i=null===(o=d("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o||null===(o=o.color)||void 0===o?void 0:o.color)&&void 0!==i?i:s.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o;return{fill:null!==(e=null===(t=d("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:s.axis.label.name.color,fontSize:null!==(n=null===(r=d("axis"))||void 0===r||null===(r=r.axis)||void 0===r||null===(r=r.label)||void 0===r||null===(r=r.name)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:s.axis.label.name.fontSize,fontFamily:null!==(i=null===(o=d("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:s.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,r,i,o;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:s.legend.title.fontFamily,fontSize:null!==(n=null===(r=d("legend"))||void 0===r||null===(r=r.legend)||void 0===r||null===(r=r.title)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:s.legend.title.fontSize,color:null!==(i=null===(o=d("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.title)||void 0===o||null===(o=o.color)||void 0===o?void 0:o.color)&&void 0!==i?i:s.legend.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:s.legend.label.fontFamily,fontSize:null!==(n=null===(r=d("legend"))||void 0===r||null===(r=r.legend)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.fontSize)&&void 0!==n?n:s.legend.label.fontSize,color:null!==(i=null===(o=d("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.color)||void 0===o?void 0:o.color)&&void 0!==i?i:s.legend.label.color}}}}}}}function rT({layoutService:e}){return w({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function iT({dataset:e,data:t,valueData:n}){var r;const{source:i,label:o,value:a}=n,s=e(i.key).field(i.field);return ve.shouldUseFormat(s.raw())?"-"===o||""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a):o}function oT({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,propertiesModel:l,custom:c}){const u=s.getStyles(),d=({data:e})=>e.major.value,m=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:p}=Ha.COMPONENT,{PRIMARY:h,SECONDARY:f}=Ua.AXIS,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=Ha.COMPONENT,{PRIMARY:a,SECONDARY:s}=Ua.AXIS,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:m}=l,p=m===n.MAJOR?d.data.value:d.data.major.value;if(c){const t=e.findShapes("container").find((e=>(e.key===`${o}-max-${a}`||e.key===`${o}-max-${s}`)&&e.data&&e.data.value===p&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const h=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===`${i}-max`)&&e.data.major.value===p));if(c&&h)return{key:h.key,bounds:h.bounds};const f=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===`${i}-min`)&&e.data.major.value===p)),g=e.findShapes("*").filter((e=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===p));if(c&&f&&!g.find((e=>{var t,n;return(null===(t=e.data.end)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=f.data.end)||void 0===n||null===(n=n.source)||void 0===n?void 0:n.field)}))&&!g.find((e=>{var t,n;return(null===(t=e.data.segment)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=f.data.source)||void 0===n?void 0:n.field)})))return{key:f.key,bounds:f.bounds};const y=h||f;return!(c||!y||g.find((e=>{var t,n;return(null===(t=e.data.end)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=y.data.end)||void 0===n||null===(n=n.source)||void 0===n?void 0:n.field)}))||g.find((e=>{var t,n;return(null===(t=e.data.segment)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=y.data.source)||void 0===n?void 0:n.field)})))&&{key:y.key,bounds:y.bounds}},"collectible"]}({dockService:i,seriesModel:o});return N({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:u.fontFamily},main:{key:Ha.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...o.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...o.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...o.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[Ha.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:m},placement:g},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${p}-max-${h}`,`${p}-max-${f}`,`${p}-min-${h}`,`${p}-min-${f}`,`${Ha.COMPONENT.BAR_OOB}-max-${h}`,`${Ha.COMPONENT.BAR_OOB}-max-${f}`,`${Ha.COMPONENT.BAR_OOB}-min-${h}`,`${Ha.COMPONENT.BAR_OOB}-min-${f}`,`${Ha.COMPONENT.DATA_OOB_MARKER}-max`,`${Ha.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:d,filter:m},placement:g},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:m},placement:g}],section:({h:e,nodes:t,dataset:n,create:r,util:i})=>{const[o]=t,{title:a,description:s,measures:l}=c.isEnabled()?c.getAttributes({dataset:n,nodes:[o]}):{},u=[];a&&u.push(r.text({value:a,style:{bold:!0}})),s&&u.push(r.text({value:s}));const d=c.hideBasic();d&&!l.length&&(a||s)||u.push(r.text({value:o.data.label,style:{bold:!0}})),d||(u.push(r.color({nodes:t,property:Ha.SCALE.COLOR})),u.push(...t.map((e=>{const{segment:t,end:o}=e.data,a=t||o,{key:s,field:l}=a.source;return r.measure({label:i.dataset.title(s,l),value:iT({dataset:n,data:e.data,valueData:a})})})))),l&&u.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),c.chart.isEnabled()&&(c.chart.hasLimitation()?(c.chart.destroy(),u.push(r.raw({value:c.chart.createLimitationRow()}))):u.push(r.raw({value:c.chart.createContainer({h:e})})));const{customTooltipImages:m}=o.data;return c.isEnabled()&&m&&u.push(...m.map((t=>r.raw({value:c.createImageRow({value:t,h:e})})))),u},layout:{grouping:!0,single:()=>!(!c.isEnabled()||!c.hasImages())||c.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>c.isEnabled()&&c.hasImages()?c.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{c.chart.isEnabled()&&!c.chart.hasLimitation()&&c.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{c.chart.isEnabled()&&c.chart.hasAlternateState()&&c.chart.hide()}}}},legend:{keys:{tooltip:Ha.COMPONENT.LEGEND_TOOLTIP,component:Ha.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:aT}=Wd,sT=({picasso:e,chart:t,environment:m,flags:p,viewState:h,viewCache:f,actions:g,selectionService:y})=>{var v;const b=s(),{width:x,height:S}=i(),[M,C]=n(),[T,O]=n(),A=a(),w=l(),N=c(),q=u(),D=d(),z=xS({enable:!1===(null==M||null===(v=M.layoutService)||void 0===v||null===(v=v.meta)||void 0===v?void 0:v.isSnapshot)});r((()=>{if(!(b&&null!=t&&t.update&&m&&h&&y))return;const n=R({source:b,metaAdditionsFn:function({layout:e}){var t;const n=E(e,"qHyperCube.qMeasureInfo",[]),r=n.some((({series:e=Ua.NOPE_SERIES})=>ou(e)===Ua.TYPE.LINE)),i=Ee.continuous(e,(()=>r&&fe.isTime(!0,e))),o=!KM(E(e,"version","")),a=n.filter((({series:e=Ua.NOPE_SERIES})=>ou(e)===Ua.TYPE.BAR)),s=a.length,l=a.filter((({series:e=Ua.NOPE_SERIES})=>e.axis!==Ua.AXIS.SECONDARY)).length,c=a.filter((({series:e=Ua.NOPE_SERIES})=>e.axis===Ua.AXIS.SECONDARY)).length,u=o?l>1||c>1:s>1,d=("grouped"!==E(e,"barGrouping.grouping")||i)&&u,m=!d&&s>1,p=o&&d&&(l>0&&c>1||l>1&&c>0),h=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t||null===(t=t[0])||void 0===t||!t.qLocked);return{canBeContinuous:fe.canBeContinuous(e),isDiscrete:!i,isContinuous:i,isTime:fe.isTime(i,e),isSnapshot:Ee.snapshot(e),isBarSeriesStacked:d,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:p,isGrouped:m||p,isGroupedByMeasure:m||p,isDimensionLocked:h,groupSize:p?2:s,hasLineSeries:r}}}),{options:r,translator:i}=m,{direction:o}=r,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=eC({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:A,layoutService:n}),l=k({app:w,translator:i}),c=L({chart:t,layoutService:n,config:{logicalSize:{width:x,height:S},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),u=JM({layoutService:n}),d=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return QC({chart:e,actions:s,componentKey:Xd(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:eT,options:{axisKey:Ha.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:A,layoutService:n,dockService:c,seriesModel:u,viewState:h,rtl:"rtl"===m.options.direction,actions:g,picasso:e}):void 0,v=n.meta.isContinuous?aT({model:A,layoutService:n,viewState:h,viewCache:f}):void 0,M=I({theme:m.theme,config:{id:"comboChart"}}),T=nT({layoutService:n,dockService:c,themeService:M,flags:p}),O=MC({actions:g,appLayoutModel:N,appModel:w,chart:t,environment:m,genericObjectModel:A,layoutService:n,picasso:e,seriesModel:u,viewState:h,styleModel:T}),z=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`,o=n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:o}}({layoutService:n,seriesModel:u}),$=iC({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:v}),F=iC({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:v}),B=rT({layoutService:n}),j=bC({config:{measureAxesRef:"measureAxes.0",formatter:Ha.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:$,dockService:c,seriesModel:u,themeService:M}),_=bC({config:{measureAxesRef:"measureAxes.1",formatter:Ha.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:F,dockService:c,seriesModel:u,themeService:M}),H=xC({genericObjectModel:A,layoutService:n}),U=us({flags:p,layout:b,app:w,model:A,picasso:e,chart:t,translator:i,localeInfo:N.qLocaleInfo,embed:D,options:r}),V=oT({chart:t,actions:g,translator:i,rtl:a,dockService:c,seriesModel:u,colorService:O,themeService:M,propertiesModel:H,custom:U}),Y=ja({layoutService:n,discreteModel:d}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Ha.SCALE.MAJOR,MAJOR_INNER:Ha.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Ha.SCALE.MINOR.PRIMARY,SECONDARY:Ha.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Ha.COMPONENT.BAR}-${Ua.AXIS.PRIMARY}`,BAR_SECONDARY:`${Ha.COMPONENT.BAR}-${Ua.AXIS.SECONDARY}`,AXIS:{MAJOR:Ha.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Ha.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Ha.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Ha.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Ha.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Ha.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Ha.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Ha.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Ha.COLLECTION.MAIN}}}}(n),X=P({picassoInstance:e,plugins:q,pluginArgs:W}),G=function({options:e,viewCache:t,layoutService:n}){const r={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||r.hasSlicedHats||r.isPartialUpdating||r.isSizeChanging||ka.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:r}}({options:r,viewCache:f,layoutService:n});C({alternativeService:l,selectionService:y,genericObjectModel:A,appModel:w,dockService:c,styleModel:T,layoutService:n,fieldModel:z,seriesModel:u,reducedModel:s,primaryExtremumModel:$,secondaryExtremumModel:F,primaryTickModel:j,secondaryTickModel:_,propertiesModel:H,colorService:O,themeService:M,appLayoutModel:N,tooltipService:V,disclaimerService:B,flags:p,...d&&{discreteModel:d},...v&&{continuousModel:v},refLineModel:Y,pluginService:X,animationsModel:G})}),[b,A,w,N,m,null==t?void 0:t.update,h,y]);const[,$]=o((()=>{if(!M)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:r,primaryExtremumModel:i,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:c,disclaimerService:u}=M,d=s?()=>{var e;s.update(t.getLayout());const n=s.initialFetch(),r=!t.meta.isSnapshot&&(null==m||null===(e=m.options)||void 0===e||null===(e=e.viewState)||void 0===e?void 0:e.zoom);return r&&h.preventSet("zoom",r),n}:()=>Promise.resolve(),p=n.initialize().then((()=>{const e=n.getSettings().field;y&&y.setBrushAliases({colorField:e}),n.custom.updateLegend()}));return Promise.all([c.initialize(),r.command.initialize(),A?a.command.initialize():Promise.resolve(),p,d(),g.scroll.attachDiscreteModel(l)]).then((()=>Promise.all([i.command.initialize(),o.command.initialize()]).then((async()=>{await e.initialize({properties:a.query.getProperties()||{}}),u.initialize(),O({...M})}))))}),[M,z]);if($)throw $;return T};const lT={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"}}]};const cT={query:{getCanScroll:()=>!0}};function uT({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function dT({setSelectionInfo:e,event:t,components:n,clear:r}){const i=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===Ha.COMPONENT.LEGEND_CATEGORICAL}),r()}function mT({chart:e,actions:t}){const i=b(),o=s(),[a,l]=n();return r((()=>{if(null==e||!e.update||!e.scale)return null;const n=e.scale(Ha.SCALE.MAJOR),r=D({chart:e,actions:t,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:uT},selectionEvents:{start:dT}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}}),[i,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=a&&a.setLayout&&o&&a.setLayout(o)}),[o]),a}const pT={version:"1.32.6",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var hT=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let i;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)i=ou(n[e].qDef.series),i===Ua.TYPE.BAR?r[0]=1:i===Ua.TYPE.LINE?r[1]=1:r[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(o)},fT=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===Ua.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===Ua.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function gT(e){var t,n;const r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&ou(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===Ua.TYPE.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function yT(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:hT(t),added(e,t){is.addCallbackCustomTooltip(t)},moved(e,t){is.moveCallbackCustomTooltip(t,e)},removed(e,t){is.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){is.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:fT(t),added({qDef:e},t){var n;gT(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:Ua.TYPE.LINE,axis:Ua.AXIS.SECONDARY}:e.series={type:Ua.TYPE.BAR,axis:Ua.AXIS.PRIMARY})},moved(e,t){gT(t)}}}}function vT(e){const t=yT(e);return{properties:pT,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=J.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&ce(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>J.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const bT=({models:e,chart:t,viewState:n})=>{x((r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:d}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:u,h:d}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:Me(t,Ha.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),c.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:Me(t,Ha.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])};const xT=e=>{const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=Ua.NOPE_SERIES})=>ou(e)===Ua.TYPE.LINE));return Ee.continuous(e,(()=>t&&fe.isTime(!0,e)))},ST=(e,t,n)=>{let r;const i=n||0;var o,a;"function"==typeof(null==e?void 0:e.getMeasureLayouts)?r=e.getMeasureLayouts():r=null!==(o=null===(a=t.layout)||void 0===a||null===(a=a.qHyperCube)||void 0===a?void 0:a.qMeasureInfo)&&void 0!==o?o:[];return r.filter((e=>{const{series:t}=e||{};return 0===i?TS(t,!0):!TS(t,!0)}))},ET=(e,t)=>{const n=ST(e,t,0).filter((e=>e.series.type===Ua.TYPE.BAR)),r=ST(e,t,1).filter((e=>e.series.type===Ua.TYPE.BAR)),i="stacked"===E(t.layout,"barGrouping.grouping");return!Ee.continuous(t.layout)&&i&&(n.length>1||r.length>1)},MT=(e,t,n,r,i=void 0)=>{const o=`${t}.fontFamily`,a=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(a),defaultValue:()=>null!=i?i:n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function CT(e,t,n){const r=z({theme:t,translator:n,flags:e,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}});return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",show:(e,t)=>!xT(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...MT("bar.label.value","label.value",r,t,"12px"),contrastColor:{component:"checkbox",type:"boolean",ref:"bar.label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:MT("line.label.value","label.value",r,t)}}}:void 0}},markerSection:{translation:"Visualizations.Descriptions.Markers",component:"accordion",items:{labelValueSection:{translation:"properties.dataPoints.markerlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"marker",items:MT("marker.label.value","label.value",r,t)}}}}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:MT("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:MT("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:MT("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:MT("legend.label","legend.label",r,t)}}}:void 0}}}const TT={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",show:(e,t)=>!xT(t.layout),items:{barWidth:{component:"items",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function OT(e){var t;return!(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t||!t.on)}function AT(e){var t,n;return OT(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(n=n.color)||void 0===n?void 0:n.mode)&&void 0!==t?t:"primary")}function wT(e){var t;return OT(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.mode)}function NT(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function RT(e){return wT(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function kT(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...NT(n),...RT(e)]:RT(e)}(t,n,e)))}function LT(e){var t;const n={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||xT(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},r={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return ou(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ua.TYPE.MARKER}},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return ou(null===(t=e.qDef)||void 0===t?void 0:t.series)===Ua.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)}},o={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>OT(...e)},a=null===(t=e.anything)||void 0===t||null===(t=t.sense)||void 0===t?void 0:t.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:n,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:r,seriesMarkerFill:i}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:o,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=a.getDataColorSpecials(),n=null===(e=a.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:AT},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:wT}}}}}}}}}}}}const IT=10,PT=!0;function qT(e){return e.qHyperCube.qMeasureInfo.filter((e=>ou(e.series)===Ua.TYPE.LINE)).length>0}function DT(e,t){const n=e.qHyperCube.qMeasureInfo.filter((e=>ou(e.series)===Ua.TYPE.BAR));return n.filter((e=>e.series.axis!==Ua.AXIS.SECONDARY)).length>t||n.filter((e=>e.series.axis===Ua.AXIS.SECONDARY)).length>t}function zT(e){return e.qHyperCube.qMeasureInfo.filter((e=>ou(e.series)===Ua.TYPE.MARKER)).length>0}const $T=(e,t,n,r)=>{const i="vertical"===e.layout.orientation||xT(e.layout)?"y":"x",o=ST(e,t,r).map((e=>e.qFallbackTitle));let a;return a=o.length?n.get(`properties.${i}AxisWithInfo`,[o.join(",")]):n.get(`properties.${i}Axis`),a};function FT(e){var t,n,r;const{translator:i,flags:o,anything:a}=e,s=null==e||null===(t=e.anything)||void 0===t||null===(t=t.sense)||void 0===t?void 0:t.theme,l=null==e||null===(n=e.anything)||void 0===n||null===(n=n.sense)||void 0===n||null===(r=n.isUnsupportedFeature)||void 0===r?void 0:r.call(n,"continuousData"),c={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>kT(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>OT(e)))}}},u=e=>e.qHyperCubeDef.qMeasures.some((e=>OT(e))),d=(e,t)=>0!==e.filter((e=>e.series.axis===t)).length,m={items:{disclaimer:{show:(e,t)=>u(e),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!u(e)}}},p={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&DT(n.layout,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&qT(n.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,i){i.dataPoint.showLineLabels=e,i.dataPoint.show=e}},reset(e){M(e,"dataPoint.show",!1),M(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",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)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t,n)=>i.get(ST(t,n,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&ST(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,i){i.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&ST(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,i){i.measureAxes[1].show=e?"labels":"all"}}}}}}},h={uses:"settings",items:{simpleStyling:TT,simpleLabels:p,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:CT(o,s,i),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>DT(n.layout,1)&&!xT(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>xT(n.layout),convertFunctions:(f="vertical",{get:(e,t,n)=>xT(n.layout)?f:e(t.type),set(e,t,n,r){t(n.type,xT(r.layout)?f:e,f)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!xT(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t,n)=>qT(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>qT(e)},show:(e,t,n)=>qT(n.layout),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},barLabels:{type:"items",snapshot:{tid:"property-barLabels",show:e=>DT(e,0)},show:(e,t,n)=>DT(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>DT(n.layout,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showBarSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&ET(t,n)},showTotalLabels:{ref:"dataPoint.showBarTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&ET(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>zT(e)},show:(e,t,n)=>zT(n.layout),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridLineAxis:{ref:"gridLine.axis",type:"integer",component:"dropdown",defaultValue:0,options(e,t,n){const r=[],i=n.layout.qHyperCube.qMeasureInfo,o=d(i,0),a=d(i,1);return o&&r.push({translation:"properties.axis.primary",value:0}),a&&r.push({translation:"properties.axis.secondary",value:1}),r},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,r){var i;const o=null!==(i=r.gridLine.axis)&&void 0!==i?i:0,a=n.layout.qHyperCube.qMeasureInfo,s=d(a,0),l=d(a,1);return 0===o&&!s&&l?(M(r,"gridLine.axis",1),1):1===o&&s&&!l?(M(r,"gridLine.axis",0),0):o}}},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:c,simpleColors:m,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||xT(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let o;return o=r?i.get(`properties.${n}AxisWithInfo`,[r]):i.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||xT(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!xT(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:IT,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=IT:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!l}},measureAxis:{uses:"axis.measureAxis",label:(e,t,n)=>$T(t,n,i,0),show:(e,t,n)=>ST(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>$T(t,n,i,0),show:(e,t,n)=>ST(t,n,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&TS(null==e?void 0:e.series,PT)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&ST(t,n,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||xT(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&ST(t,n,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t,n)=>ST(t,n,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.0.autoMinMax",!1),M(i,"measureAxes.0.minMax","min"),M(i,"measureAxes.0.min",0)):M(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t,n)=>$T(t,n,i,1),show:(e,t,n)=>ST(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>$T(t,n,i,1),show:(e,t,n)=>ST(t,n,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!TS(null==e?void 0:e.series,PT)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&ST(t,n,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||xT(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&ST(t,n,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t,n)=>ST(t,n,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.1.autoMinMax",!1),M(i,"measureAxes.1.minMax","min"),M(i,"measureAxes.1.min",0)):M(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var f;o.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(h.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});const g={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,i;if(null!=a&&null!==(r=a.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"includeZeroValues"))return!1;return!xT(n.layout)}}}},measures:LT(e)}},y={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>TS(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,PT)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!TS(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,PT)},dimRefLines:{uses:"dimReflines"}}};return{type:"items",component:"accordion",items:{data:g,sorting:{uses:"sortingWithDisclaimer"},addons:y,settings:h}}}function BT(e){return e.qHyperCubeDef.qMeasures.filter((e=>ou(e.qDef.series)===Ua.TYPE.LINE)).length>0}function jT(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>BT(e)||!xT(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>ou(e.qDef.series)===Ua.TYPE.BAR));return t?n.filter((e=>e.qDef.series.axis===Ua.AXIS.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===Ua.AXIS.SECONDARY)).length>1:n.length>1}(e,!KM(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!xT(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!xT(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>BT(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>BT(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>OT(e)))}}}}}}const _T={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function HT(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=_T[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function UT(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});HT(r,o,t,n,"bar"),HT(r,o,t,n,"line"),HT(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function VT(e){const t={},{tooltip:n}=e;if(n){var r;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(r=r.object)||void 0===r?void 0:r.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const YT=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function WT(e){return{definition:FT(e),softDefinition:jT(),support:{snapshot:YT,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:UT,extendMetrics:VT,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=J.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:yT(e),defaultPropertyValues:a,hypercubePath:i,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&ce(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),kT(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return J.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:(function(e){var t;e.qHyperCubeDef.qDimensions.forEach(It),null!==(t=e.qHyperCubeDef.qLayoutExclude)&&void 0!==t&&null!==(t=t.qHyperCubeDef)&&void 0!==t&&t.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(It)}(e),function(e){return KM(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=Ua.NOPE_SERIES),void 0===t.series.type&&(t.series.type=Ua.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===Ua.TYPE.BAR?Ua.AXIS.PRIMARY:Ua.AXIS.SECONDARY),t.series.type===Ua.TYPE.BAR&&t.series.axis===Ua.AXIS.SECONDARY&&(t.series.axis=Ua.AXIS.PRIMARY)})),e.version=GM.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}}));
14
+ */Bf();var Hf=Date.now(),Uf="fnValues"+Hf,Yf="fnStyle"+ ++Hf,Wf="@global",Xf="@global ",Gf=function(){function e(e,t,n){for(var r in this.type="global",this.at=Wf,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new bf(zp({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Kf=function(){function e(e,t,n){this.type="global",this.at=Wf,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(8);this.rule=n.jss.createRule(r,t,zp({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),Jf=/\s*,\s*/g;function Zf(e,t){for(var n=e.split(Jf),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function Qf(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===Wf)return new Gf(e,t,n);if("@"===e[0]&&e.substr(0,8)===Xf)return new Kf(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[Wf]:null;if(i){for(var o in i)t.addRule(o,i[o],zp({},n,{selector:Zf(o,e.selector)}));delete r[Wf]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,7)===Wf){var o=Zf(i.substr(7),e.selector);t.addRule(o,r[i],zp({},n,{selector:o})),delete r[i]}}(e,t))}}}var eg=/\s*,\s*/g,tg=/&/g,ng=/\$([\w-]+)/g;function rg(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(eg),r=e.split(eg),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(tg,a):a+" "+l}return i}function n(e,t,n){if(n)return zp({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=zp({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,u=l.options.parent;for(var c in r){var d=-1!==c.indexOf("&"),m="@"===c[0];if(d||m){if(a=n(l,u,a),d){var p=t(c,l.selector);s||(s=e(u,o)),p=p.replace(ng,s);var h=l.key+"-"+c;"replaceRule"in u?u.replaceRule(h,r[c],zp({},a,{selector:p})):u.addRule(h,r[c],zp({},a,{selector:p}))}else m&&u.addRule(c,{},a).addRule(l.key,r[c],{selector:l.selector});delete r[c]}}return r}}}var ig=/[A-Z]/g,og=/^ms-/,ag={};function sg(e){return"-"+e.toLowerCase()}function lg(e){if(ag.hasOwnProperty(e))return ag[e];var t=e.replace(ig,sg);return ag[e]=og.test(t)?"-"+t:t}function ug(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:lg(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(ug):t.fallbacks=ug(e.fallbacks)),t}var cg=_f&&CSS?CSS.px:"px",dg=_f&&CSS?CSS.ms:"ms",mg=_f&&CSS?CSS.percent:"%";function pg(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var hg=pg({"animation-delay":dg,"animation-duration":dg,"background-position":cg,"background-position-x":cg,"background-position-y":cg,"background-size":cg,border:cg,"border-bottom":cg,"border-bottom-left-radius":cg,"border-bottom-right-radius":cg,"border-bottom-width":cg,"border-left":cg,"border-left-width":cg,"border-radius":cg,"border-right":cg,"border-right-width":cg,"border-top":cg,"border-top-left-radius":cg,"border-top-right-radius":cg,"border-top-width":cg,"border-width":cg,"border-block":cg,"border-block-end":cg,"border-block-end-width":cg,"border-block-start":cg,"border-block-start-width":cg,"border-block-width":cg,"border-inline":cg,"border-inline-end":cg,"border-inline-end-width":cg,"border-inline-start":cg,"border-inline-start-width":cg,"border-inline-width":cg,"border-start-start-radius":cg,"border-start-end-radius":cg,"border-end-start-radius":cg,"border-end-end-radius":cg,margin:cg,"margin-bottom":cg,"margin-left":cg,"margin-right":cg,"margin-top":cg,"margin-block":cg,"margin-block-end":cg,"margin-block-start":cg,"margin-inline":cg,"margin-inline-end":cg,"margin-inline-start":cg,padding:cg,"padding-bottom":cg,"padding-left":cg,"padding-right":cg,"padding-top":cg,"padding-block":cg,"padding-block-end":cg,"padding-block-start":cg,"padding-inline":cg,"padding-inline-end":cg,"padding-inline-start":cg,"mask-position-x":cg,"mask-position-y":cg,"mask-size":cg,height:cg,width:cg,"min-height":cg,"max-height":cg,"min-width":cg,"max-width":cg,bottom:cg,left:cg,top:cg,right:cg,inset:cg,"inset-block":cg,"inset-block-end":cg,"inset-block-start":cg,"inset-inline":cg,"inset-inline-end":cg,"inset-inline-start":cg,"box-shadow":cg,"text-shadow":cg,"column-gap":cg,"column-rule":cg,"column-rule-width":cg,"column-width":cg,"font-size":cg,"font-size-delta":cg,"letter-spacing":cg,"text-decoration-thickness":cg,"text-indent":cg,"text-stroke":cg,"text-stroke-width":cg,"word-spacing":cg,motion:cg,"motion-offset":cg,outline:cg,"outline-offset":cg,"outline-width":cg,perspective:cg,"perspective-origin-x":mg,"perspective-origin-y":mg,"transform-origin":mg,"transform-origin-x":mg,"transform-origin-y":mg,"transform-origin-z":mg,"transition-delay":dg,"transition-duration":dg,"vertical-align":cg,"flex-basis":cg,"shape-margin":cg,size:cg,gap:cg,grid:cg,"grid-gap":cg,"row-gap":cg,"grid-row-gap":cg,"grid-column-gap":cg,"grid-template-rows":cg,"grid-template-columns":cg,"grid-auto-rows":cg,"grid-auto-columns":cg,"box-shadow-x":cg,"box-shadow-y":cg,"box-shadow-blur":cg,"box-shadow-spread":cg,"font-line-height":cg,"text-shadow-x":cg,"text-shadow-y":cg,"text-shadow-blur":cg});function fg(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=fg(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=fg(i,t[i],n);else for(var o in t)t[o]=fg(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||hg[e];return!a||0===t&&a===cg?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function gg(e){void 0===e&&(e={});var t=pg(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=fg(r,e[r],t);return e},onChangeValue:function(e,n){return fg(n,e,t)}}}var vg="",yg="",bg="",xg="",Sg=Th&&"ontouchstart"in document.documentElement;if(Th){var Eg={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Mg=document.createElement("p").style;for(var Cg in Eg)if(Cg+"Transform"in Mg){vg=Cg,yg=Eg[Cg];break}"Webkit"===vg&&"msHyphens"in Mg&&(vg="ms",yg=Eg.ms,xg="edge"),"Webkit"===vg&&"-apple-trailing-word"in Mg&&(bg="apple")}var Og=vg,Ag=yg,Tg=bg,Ng=xg,wg=Sg;var kg={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Og?"-webkit-"+e:Ag+e)}},Rg={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Og?Ag+"print-"+e:e)}},Lg=/[-\s]+(.)?/g;function Ig(e,t){return t?t.toUpperCase():""}function Pg(e){return e.replace(Lg,Ig)}function qg(e){return Pg("-"+e)}var Dg,zg={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Og){var n="mask-image";if(Pg(n)in t)return e;if(Og+qg(n)in t)return Ag+e}return e}},$g={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Tg||wg?e:Ag+e)}},Fg={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Ag+e)}},jg={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Ag+e)}},Bg={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Og||"ms"===Og&&"edge"!==Ng?Ag+e:e)}},_g={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Og||"ms"===Og||"apple"===Tg?Ag+e:e)}},Vg={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Og?"WebkitColumn"+qg(e)in t&&Ag+"column-"+e:"Moz"===Og&&("page"+qg(e)in t&&"page-"+e))}},Hg={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Og)return e;var n=e.replace("-inline","");return Og+qg(n)in t&&Ag+n}},Ug={supportedProperty:function(e,t){return Pg(e)in t&&e}},Yg={supportedProperty:function(e,t){var n=qg(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Og+n in t?Ag+e:"Webkit"!==Og&&"Webkit"+n in t&&"-webkit-"+e}},Wg={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Og?""+Ag+e:e)}},Xg={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Og?Ag+"scroll-chaining":e)}},Gg={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},Kg={supportedProperty:function(e,t){var n=Gg[e];return!!n&&(Og+qg(n)in t&&Ag+n)}},Jg={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Zg=Object.keys(Jg),Qg=function(e){return Ag+e},ev={supportedProperty:function(e,t,n){var r=n.multiple;if(Zg.indexOf(e)>-1){var i=Jg[e];if(!Array.isArray(i))return Og+qg(i)in t&&Ag+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Og+qg(i[0])in t))return!1;return i.map(Qg)}return!1}},tv=[kg,Rg,zg,$g,Fg,jg,Bg,_g,Vg,Hg,Ug,Yg,Wg,Xg,Kg,ev],nv=tv.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),rv=tv.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,ph(t.noPrefill)),e}),[]),iv={};if(Th){Dg=document.createElement("p");var ov=window.getComputedStyle(document.documentElement,"");for(var av in ov)isNaN(av)||(iv[ov[av]]=ov[av]);rv.forEach((function(e){return delete iv[e]}))}function sv(e,t){if(void 0===t&&(t={}),!Dg)return e;if(null!=iv[e])return iv[e];"transition"!==e&&"transform"!==e||(t[e]=e in Dg.style);for(var n=0;n<nv.length&&(iv[e]=nv[n](e,Dg.style,t),!iv[e]);n++);try{Dg.style[e]=""}catch(e){return!1}return iv[e]}var lv,uv={},cv={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},dv=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function mv(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?sv(t):", "+sv(n);return r||(t||n)}function pv(e,t){var n=t;if(!lv||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=uv[r])return uv[r];try{lv.style[e]=n}catch(e){return uv[r]=!1,!1}if(cv[e])n=n.replace(dv,mv);else if(""===lv.style[e]&&("-ms-flex"===(n=Ag+n)&&(lv.style[e]="-ms-flexbox"),lv.style[e]=n,""===lv.style[e]))return uv[r]=!1,!1;return lv.style[e]="",uv[r]=n,uv[r]}function hv(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=sv(n);o&&o!==n&&(i=!0);var a=!1,s=pv(o,Dh(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Og?e:"@"+Ag+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return pv(t,Dh(e))||e}}}function fv(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}}}function gv(){return{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Ph(e,{},n);return r[Yf]=t,r},onProcessStyle:function(e,t){if(Uf in t||Yf in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[Uf]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Yf];o&&(i.style=o(e)||{});var a=i[Uf];if(a)for(var s in a)i.prop(s,a[s](e),r)}},Qf(),rg(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=ug(e[t]);return e}return ug(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=lg(t);return t===r?e:(n.prop(r,e),null)}},gg(),"undefined"==typeof window?null:hv(),fv()]}}function vv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=zp({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}Th&&(lv=document.createElement("p"));var yv=function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},bv=function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},xv=function(e,t,n){e.get(t).delete(n)},Sv=V.createContext(null);function Ev(){return V.useContext(Sv)}var Mv,Cv=Bf(gv()),Ov={disableGeneration:!1,generateClassName:Ch(),jss:Cv,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Av=V.createContext(Ov);function Tv(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=Kp(e,["children","injectFirst","disableGeneration"]),s=zp({},V.useContext(Av),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!Mv){var l=document.head;Mv=document.createComment("mui-inject-first"),l.insertBefore(Mv,l.firstChild)}s.jss=Bf({plugins:gv().plugins,insertionPoint:Mv})}return V.createElement(Av.Provider,{value:s},t)}var Nv=-1e9;var wv={};function kv(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=bv(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},yv(i.sheetsManager,o,r,s));var l=zp({},o.options,i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(0===s.refs){var c;i.sheetsCache&&(c=bv(i.sheetsCache,o,r));var d=o.create(r,a);c||((c=i.jss.createStyleSheet(d,zp({link:!1},l))).attach(),i.sheetsCache&&yv(i.sheetsCache,o,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=Vf(d)}if(s.dynamicStyles){var m=i.jss.createStyleSheet(s.dynamicStyles,zp({link:!0},l));m.update(t),m.attach(),n.dynamicSheet=m,n.classes=vv({baseClasses:s.staticSheet.classes,newClasses:m.classes}),u&&u.add(m)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Rv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,a=void 0===o?wv:o,s=Kp(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=zp({},i);return Object.keys(o).forEach((function(e){a[e]=jp(a[e],o[e])})),a},options:{}}}(e),u=n||r||"makeStyles";l.options={index:Nv+=1,name:n,meta:u,classNamePrefix:u};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Ev()||a,r=zp({},V.useContext(Av),s),o=V.useRef(),u=V.useRef();!function(e,t){var n,r=V.useRef([]),i=V.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),V.useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return kv(i,e),u.current=!1,o.current=i,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=bv(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(xv(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(i)}}),[t,l]),V.useEffect((function(){u.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(o.current,e),u.current=!0}));var c=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=vv({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return c}}function Lv(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Lv(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Iv(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Lv(e))&&(r&&(r+=" "),r+=t);return r}var Pv={exports:{}},qv={},Dv="function"==typeof Symbol&&Symbol.for,zv=Dv?Symbol.for("react.element"):60103,$v=Dv?Symbol.for("react.portal"):60106,Fv=Dv?Symbol.for("react.fragment"):60107,jv=Dv?Symbol.for("react.strict_mode"):60108,Bv=Dv?Symbol.for("react.profiler"):60114,_v=Dv?Symbol.for("react.provider"):60109,Vv=Dv?Symbol.for("react.context"):60110,Hv=Dv?Symbol.for("react.async_mode"):60111,Uv=Dv?Symbol.for("react.concurrent_mode"):60111,Yv=Dv?Symbol.for("react.forward_ref"):60112,Wv=Dv?Symbol.for("react.suspense"):60113,Xv=Dv?Symbol.for("react.suspense_list"):60120,Gv=Dv?Symbol.for("react.memo"):60115,Kv=Dv?Symbol.for("react.lazy"):60116,Jv=Dv?Symbol.for("react.block"):60121,Zv=Dv?Symbol.for("react.fundamental"):60117,Qv=Dv?Symbol.for("react.responder"):60118,ey=Dv?Symbol.for("react.scope"):60119;function ty(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case zv:switch(e=e.type){case Hv:case Uv:case Fv:case Bv:case jv:case Wv:return e;default:switch(e=e&&e.$$typeof){case Vv:case Yv:case Kv:case Gv:case _v:return e;default:return t}}case $v:return t}}}function ny(e){return ty(e)===Uv}qv.AsyncMode=Hv,qv.ConcurrentMode=Uv,qv.ContextConsumer=Vv,qv.ContextProvider=_v,qv.Element=zv,qv.ForwardRef=Yv,qv.Fragment=Fv,qv.Lazy=Kv,qv.Memo=Gv,qv.Portal=$v,qv.Profiler=Bv,qv.StrictMode=jv,qv.Suspense=Wv,qv.isAsyncMode=function(e){return ny(e)||ty(e)===Hv},qv.isConcurrentMode=ny,qv.isContextConsumer=function(e){return ty(e)===Vv},qv.isContextProvider=function(e){return ty(e)===_v},qv.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===zv},qv.isForwardRef=function(e){return ty(e)===Yv},qv.isFragment=function(e){return ty(e)===Fv},qv.isLazy=function(e){return ty(e)===Kv},qv.isMemo=function(e){return ty(e)===Gv},qv.isPortal=function(e){return ty(e)===$v},qv.isProfiler=function(e){return ty(e)===Bv},qv.isStrictMode=function(e){return ty(e)===jv},qv.isSuspense=function(e){return ty(e)===Wv},qv.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Fv||e===Uv||e===Bv||e===jv||e===Wv||e===Xv||"object"==typeof e&&null!==e&&(e.$$typeof===Kv||e.$$typeof===Gv||e.$$typeof===_v||e.$$typeof===Vv||e.$$typeof===Yv||e.$$typeof===Zv||e.$$typeof===Qv||e.$$typeof===ey||e.$$typeof===Jv)},qv.typeOf=ty,Pv.exports=qv;var ry=Pv.exports,iy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},oy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ay={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sy={};function ly(e){return ry.isMemo(e)?ay:sy[e.$$typeof]||iy}sy[ry.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sy[ry.Memo]=ay;var uy=Object.defineProperty,cy=Object.getOwnPropertyNames,dy=Object.getOwnPropertySymbols,my=Object.getOwnPropertyDescriptor,py=Object.getPrototypeOf,hy=Object.prototype;var fy=function e(t,n,r){if("string"!=typeof n){if(hy){var i=py(n);i&&i!==hy&&e(t,i,r)}var o=cy(n);dy&&(o=o.concat(dy(n)));for(var a=ly(t),s=ly(n),l=0;l<o.length;++l){var u=o[l];if(!(oy[u]||r&&r[u]||s&&s[u]||a&&a[u])){var c=my(n,u);try{uy(t,u,c)}catch(e){}}}}return t},gy=te(fy);function vy(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=Kp(r,["name"]),a=i,s="function"==typeof t?function(e){return{root:function(n){return t(zp({theme:e},n))}}}:{root:t},l=Rv(s,zp({Component:e,name:i||e.displayName,classNamePrefix:a},o));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=V.forwardRef((function(t,r){var i,o,a,s=t.children,u=t.className,c=t.clone,d=t.component,m=Kp(t,["children","className","clone","component"]),p=Iv(l(t).root,u),h=m;if(n&&(i=h,o=n,a={},Object.keys(i).forEach((function(e){-1===o.indexOf(e)&&(a[e]=i[e])})),h=a),c)return V.cloneElement(s,zp({className:Iv(s.props.className,p)},h));if("function"==typeof s)return s(zp({className:p},h));var f=d||e;return V.createElement(f,zp({ref:r,className:p},h),s)}));return gy(u,e),u}}function yy(e){var t=e.children,n=e.theme,r=Ev(),i=V.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):zp({},e,t)}(r,n);return null!=e&&(e[Eh]=null!==r),e}),[n,r]);return V.createElement(Sv.Provider,{value:i},t)}var by=Sh(),xy=function(e){var t=vy(e);return function(e,n){return t(e,zp({defaultTheme:by},n))}};function Sy(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,a=t.name,s=Kp(t,["defaultTheme","withTheme","name"]),l=a,u=Rv(e,zp({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=V.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,l=Kp(e,["classes","innerRef"]),c=u(zp({},n.defaultProps,e)),d=l;return("string"==typeof a||o)&&(i=Ev()||r,a&&(d=Oh({theme:i,name:a,props:l})),o&&!d.theme&&(d.theme=i)),V.createElement(n,zp({ref:s||t,classes:c},d))}));return gy(c,n),c}}(e,zp({defaultTheme:by},t))}function Ey(e){if("string"!=typeof e)throw new Error(Vp(7));return e.charAt(0).toUpperCase()+e.slice(1)}function My(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function Cy(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Cy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Oy(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Cy(e))&&(r&&(r+=" "),r+=t);return r}function Ay(e){return e&&e.ownerDocument||document}function Ty(e){return Ay(e).defaultView||window}function Ny(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var wy="undefined"!=typeof window?H.useLayoutEffect:H.useEffect;function ky(e){var t=H.useRef(e);return wy((function(){t.current=e})),H.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Ry(e,t){return H.useMemo((function(){return null==e&&null==t?null:function(n){Ny(e,n),Ny(t,n)}}),[e,t])}var Ly=!0,Iy=!1,Py=null,qy={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Dy(e){e.metaKey||e.altKey||e.ctrlKey||(Ly=!0)}function zy(){Ly=!1}function $y(){"hidden"===this.visibilityState&&Iy&&(Ly=!0)}function Fy(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return Ly||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!qy[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function jy(){Iy=!0,window.clearTimeout(Py),Py=window.setTimeout((function(){Iy=!1}),100)}function By(){return{isFocusVisible:Fy,onBlurVisible:jy,ref:H.useCallback((function(e){var t,n=X.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",Dy,!0),t.addEventListener("mousedown",zy,!0),t.addEventListener("pointerdown",zy,!0),t.addEventListener("touchstart",zy,!0),t.addEventListener("visibilitychange",$y,!0))}),[])}}var _y=!1,Vy=V.createContext(null),Hy="unmounted",Uy="exited",Yy="entering",Wy="entered",Xy="exiting",Gy=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=Uy,r.appearStatus=Yy):i=Wy:i=t.unmountOnExit||t.mountOnEnter?Hy:Uy,r.state={status:i},r.nextCallback=null,r}kh(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Hy?{status:Uy}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Yy&&n!==Wy&&(t=Yy):n!==Yy&&n!==Wy||(t=Xy)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Yy){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:G.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Uy&&this.setState({status:Hy})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[G.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||_y?this.safeSetState({status:Wy},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Yy},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Wy},(function(){t.props.onEntered(o,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:G.findDOMNode(this);t&&!_y?(this.props.onExit(r),this.safeSetState({status:Xy},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Uy},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Uy},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:G.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Hy)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Gp(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return V.createElement(Vy.Provider,{value:null},"function"==typeof n?n(e,r):V.cloneElement(V.Children.only(n),r))},t}(V.Component);function Ky(){}function Jy(e,t){var n=Object.create(null);return e&&W.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&U(e)?t(e):e}(e)})),n}function Zy(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Qy(e,t,n){var r=Jy(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var u=i[l][r];s[i[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var a=i[o];if(U(a)){var s=o in t,l=o in r,u=t[o],c=U(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&U(u)&&(i[o]=Y(a,{onExited:n.bind(null,a),in:u.props.in,exit:Zy(a,"exit",e),enter:Zy(a,"enter",e)})):i[o]=Y(a,{in:!1}):i[o]=Y(a,{onExited:n.bind(null,a),in:!0,exit:Zy(a,"exit",e),enter:Zy(a,"enter",e)})}})),i}Gy.contextType=Vy,Gy.propTypes={},Gy.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ky,onEntering:Ky,onEntered:Ky,onExit:Ky,onExiting:Ky,onExited:Ky},Gy.UNMOUNTED=Hy,Gy.EXITED=Uy,Gy.ENTERING=Yy,Gy.ENTERED=Wy,Gy.EXITING=Xy;var eb=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},tb=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Rh(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}kh(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Jy(n.children,(function(e){return Y(e,{onExited:r.bind(null,e),in:!0,appear:Zy(e,"appear",n),enter:Zy(e,"enter",n),exit:Zy(e,"exit",n)})}))):Qy(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Jy(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=zp({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Gp(e,["component","childFactory"]),i=this.state.contextValue,o=eb(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?V.createElement(Vy.Provider,{value:i},o):V.createElement(Vy.Provider,{value:i},V.createElement(t,r,o))},t}(V.Component);tb.propTypes={},tb.defaultProps={component:"div",childFactory:function(e){return e}};function nb(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var rb=H.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,l=e.elevation,u=void 0===l?1:l,c=e.variant,d=void 0===c?"elevation":c,m=Kp(e,["classes","className","component","square","elevation","variant"]);return H.createElement(o,zp({className:Oy(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},m))})),ib=Sy((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),zp({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(rb),ob="undefined"==typeof window?H.useEffect:H.useLayoutEffect;function ab(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=H.useState(!1),m=d[0],p=d[1],h=Oy(t.ripple,t.rippleVisible,r&&t.ripplePulsate),f={width:a,height:a,top:-a/2+o,left:-a/2+i},g=Oy(t.child,m&&t.childLeaving,r&&t.childPulsate),v=ky(u);return ob((function(){if(!s){p(!0);var e=setTimeout(v,c);return function(){clearTimeout(e)}}}),[v,s,c]),H.createElement("span",{className:h,style:f},H.createElement("span",{className:g}))}var sb=H.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=Kp(e,["center","classes","className"]),s=H.useState([]),l=s[0],u=s[1],c=H.useRef(0),d=H.useRef(null);H.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var m=H.useRef(!1),p=H.useRef(null),h=H.useRef(null),f=H.useRef(null);H.useEffect((function(){return function(){clearTimeout(p.current)}}),[]);var g=H.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(ph(e),[H.createElement(ab,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),v=H.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var c,d,v,y=u?null:f.current,b=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,S=x.clientX,E=x.clientY;c=Math.round(S-b.left),d=Math.round(E-b.top)}if(s)(v=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(v+=1);else{var M=2*Math.max(Math.abs((y?y.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((y?y.clientHeight:0)-d),d)+2;v=Math.sqrt(Math.pow(M,2)+Math.pow(C,2))}e.touches?null===h.current&&(h.current=function(){g({pulsate:o,rippleX:c,rippleY:d,rippleSize:v,cb:n})},p.current=setTimeout((function(){h.current&&(h.current(),h.current=null)}),80)):g({pulsate:o,rippleX:c,rippleY:d,rippleSize:v,cb:n})}}),[r,g]),y=H.useCallback((function(){v({},{pulsate:!0})}),[v]),b=H.useCallback((function(e,t){if(clearTimeout(p.current),"touchend"===e.type&&h.current)return e.persist(),h.current(),h.current=null,void(p.current=setTimeout((function(){b(e,t)})));h.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return H.useImperativeHandle(t,(function(){return{pulsate:y,start:v,stop:b}}),[y,v,b]),H.createElement("span",zp({className:Oy(i.root,o),ref:f},a),H.createElement(tb,{component:null,exit:!0},l))})),lb=Sy((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(H.memo(sb)),ub=H.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,m=void 0!==d&&d,p=e.disableRipple,h=void 0!==p&&p,f=e.disableTouchRipple,g=void 0!==f&&f,v=e.focusRipple,y=void 0!==v&&v,b=e.focusVisibleClassName,x=e.onBlur,S=e.onClick,E=e.onFocus,M=e.onFocusVisible,C=e.onKeyDown,O=e.onKeyUp,A=e.onMouseDown,T=e.onMouseLeave,N=e.onMouseUp,w=e.onTouchEnd,k=e.onTouchMove,R=e.onTouchStart,L=e.onDragLeave,I=e.tabIndex,P=void 0===I?0:I,q=e.TouchRippleProps,D=e.type,z=void 0===D?"button":D,$=Kp(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),F=H.useRef(null);var j=H.useRef(null),B=H.useState(!1),_=B[0],V=B[1];m&&_&&V(!1);var U=By(),Y=U.isFocusVisible,W=U.onBlurVisible,G=U.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return ky((function(r){return t&&t(r),!n&&j.current&&j.current[e](r),!0}))}H.useImperativeHandle(n,(function(){return{focusVisible:function(){V(!0),F.current.focus()}}}),[]),H.useEffect((function(){_&&y&&!h&&j.current.pulsate()}),[h,y,_]);var J=K("start",A),Z=K("stop",L),Q=K("stop",N),ee=K("stop",(function(e){_&&e.preventDefault(),T&&T(e)})),te=K("start",R),ne=K("stop",w),re=K("stop",k),ie=K("stop",(function(e){_&&(W(e),V(!1)),x&&x(e)}),!1),oe=ky((function(e){F.current||(F.current=e.currentTarget),Y(e)&&(V(!0),M&&M(e)),E&&E(e)})),ae=function(){var e=X.findDOMNode(F.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},se=H.useRef(!1),le=ky((function(e){y&&!se.current&&_&&j.current&&" "===e.key&&(se.current=!0,e.persist(),j.current.stop(e,(function(){j.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!m&&(e.preventDefault(),S&&S(e))})),ue=ky((function(e){y&&" "===e.key&&j.current&&_&&!e.defaultPrevented&&(se.current=!1,e.persist(),j.current.stop(e,(function(){j.current.pulsate(e)}))),O&&O(e),S&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&S(e)})),ce=c;"button"===ce&&$.href&&(ce="a");var de={};"button"===ce?(de.type=z,de.disabled=m):("a"===ce&&$.href||(de.role="button"),de["aria-disabled"]=m);var me=Ry(r,t),pe=Ry(G,F),he=Ry(me,pe),fe=H.useState(!1),ge=fe[0],ve=fe[1];H.useEffect((function(){ve(!0)}),[]);var ye=ge&&!h&&!m;return H.createElement(ce,zp({className:Oy(s.root,l,_&&[s.focusVisible,b],m&&s.disabled),onBlur:ie,onClick:S,onFocus:oe,onKeyDown:le,onKeyUp:ue,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:he,tabIndex:m?-1:P},de,$),a,ye?H.createElement(lb,zp({ref:j,center:o},q)):null)})),cb=Sy({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(ub),db={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},mb=H.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,m=void 0!==d&&d,p=e.noWrap,h=void 0!==p&&p,f=e.paragraph,g=void 0!==f&&f,v=e.variant,y=void 0===v?"body1":v,b=e.variantMapping,x=void 0===b?db:b,S=Kp(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),E=l||(g?"p":x[y]||db[y])||"span";return H.createElement(E,zp({className:Oy(i.root,o,"inherit"!==y&&i[y],"initial"!==s&&i["color".concat(Ey(s))],h&&i.noWrap,m&&i.gutterBottom,g&&i.paragraph,"inherit"!==r&&i["align".concat(Ey(r))],"initial"!==c&&i["display".concat(Ey(c))]),ref:t},S))})),pb=Sy((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(mb),hb=H.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableElevation,m=void 0!==d&&d,p=e.disableFocusRipple,h=void 0!==p&&p,f=e.endIcon,g=e.focusVisibleClassName,v=e.fullWidth,y=void 0!==v&&v,b=e.size,x=void 0===b?"medium":b,S=e.startIcon,E=e.type,M=void 0===E?"button":E,C=e.variant,O=void 0===C?"text":C,A=Kp(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),T=S&&H.createElement("span",{className:Oy(r.startIcon,r["iconSize".concat(Ey(x))])},S),N=f&&H.createElement("span",{className:Oy(r.endIcon,r["iconSize".concat(Ey(x))])},f);return H.createElement(cb,zp({className:Oy(r.root,r[O],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(O).concat(Ey(a))],"medium"!==x&&[r["".concat(O,"Size").concat(Ey(x))],r["size".concat(Ey(x))]],m&&r.disableElevation,c&&r.disabled,y&&r.fullWidth),component:l,disabled:c,focusRipple:!h,focusVisibleClassName:Oy(r.focusVisible,g),ref:t,type:M},A),H.createElement("span",{className:r.label},T,n,N))})),fb=Sy((function(e){return{root:zp({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Xp(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Xp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Xp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Xp(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Xp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Xp(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Xp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(hb);var gb="undefined"!=typeof window?H.useLayoutEffect:H.useEffect,vb=H.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=H.useState(null),l=s[0],u=s[1],c=Ry(H.isValidElement(n)?n.ref:null,t);return gb((function(){o||u(function(e){return e="function"==typeof e?e():e,X.findDOMNode(e)}(r)||document.body)}),[r,o]),gb((function(){if(l&&!o)return Ny(t,l),function(){Ny(t,null)}}),[t,l,o]),gb((function(){a&&(l||o)&&a()}),[a,l,o]),o?H.isValidElement(n)?H.cloneElement(n,{ref:c}):n:l?X.createPortal(n,l):l}));function yb(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function bb(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function xb(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(ph(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&yb(e,r)}))}function Sb(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Eb(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Ay(e);return t.body===e?Ty(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(bb(o)+a,"px"),n=Ay(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(bb(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Mb=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return Nh(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&yb(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);xb(t,e.mountNode,e.modalRef,r,!0);var i=Sb(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Sb(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Eb(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Sb(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&yb(e.modalRef,!0),xb(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&yb(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function Cb(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=H.useRef(),m=H.useRef(null),p=H.useRef(null),h=H.useRef(),f=H.useRef(null),g=H.useCallback((function(e){f.current=X.findDOMNode(e)}),[]),v=Ry(t.ref,g),y=H.useRef();return H.useEffect((function(){y.current=c}),[c]),!y.current&&c&&"undefined"!=typeof window&&(h.current=l().activeElement),H.useEffect((function(){if(c){var e=Ay(f.current);r||!f.current||f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex",-1),f.current.focus());var t=function(){null!==f.current&&(e.hasFocus()&&!o&&u()&&!d.current?f.current&&!f.current.contains(e.activeElement)&&f.current.focus():d.current=!1)},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===f.current&&(d.current=!0,t.shiftKey?p.current.focus():m.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(h.current&&h.current.focus&&h.current.focus(),h.current=null)}}}),[r,o,s,u,c]),H.createElement(H.Fragment,null,H.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),H.cloneElement(t,{ref:v}),H.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelEnd"}))}var Ob={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Ab=H.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=Kp(e,["invisible","open"]);return i?H.createElement("div",zp({"aria-hidden":!0,ref:t},o,{style:zp({},Ob.root,r?Ob.invisible:{},o.style)})):null}));var Tb=new Mb,Nb=H.forwardRef((function(e,t){var n=Ev(),r=Oh({name:"MuiModal",props:zp({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?Ab:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,m=void 0!==d&&d,p=r.disableBackdropClick,h=void 0!==p&&p,f=r.disableEnforceFocus,g=void 0!==f&&f,v=r.disableEscapeKeyDown,y=void 0!==v&&v,b=r.disablePortal,x=void 0!==b&&b,S=r.disableRestoreFocus,E=void 0!==S&&S,M=r.disableScrollLock,C=void 0!==M&&M,O=r.hideBackdrop,A=void 0!==O&&O,T=r.keepMounted,N=void 0!==T&&T,w=r.manager,k=void 0===w?Tb:w,R=r.onBackdropClick,L=r.onClose,I=r.onEscapeKeyDown,P=r.onRendered,q=r.open,D=Kp(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),z=H.useState(!0),$=z[0],F=z[1],j=H.useRef({}),B=H.useRef(null),_=H.useRef(null),V=Ry(_,t),U=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),Y=function(){return Ay(B.current)},W=function(){return j.current.modalRef=_.current,j.current.mountNode=B.current,j.current},G=function(){k.mount(W(),{disableScrollLock:C}),_.current.scrollTop=0},K=ky((function(){var e=function(e){return e="function"==typeof e?e():e,X.findDOMNode(e)}(c)||Y().body;k.add(W(),e),_.current&&G()})),J=H.useCallback((function(){return k.isTopModal(W())}),[k]),Z=ky((function(e){B.current=e,e&&(P&&P(),q&&J()?G():yb(_.current,!0))})),Q=H.useCallback((function(){k.remove(W())}),[k]);if(H.useEffect((function(){return function(){Q()}}),[Q]),H.useEffect((function(){q?K():U&&u||Q()}),[q,Q,U,u,K]),!N&&!q&&(!U||$))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:xh}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),U&&(te.onEnter=My((function(){F(!1)}),s.props.onEnter),te.onExited=My((function(){F(!0),u&&Q()}),s.props.onExited)),H.createElement(vb,{ref:Z,container:c,disablePortal:x},H.createElement("div",zp({ref:V,onKeyDown:function(e){"Escape"===e.key&&J()&&(I&&I(e),y||(e.stopPropagation(),L&&L(e,"escapeKeyDown")))},role:"presentation"},D,{style:zp({},ee.root,!q&&$?ee.hidden:{},D.style)}),A?null:H.createElement(o,zp({open:q,onClick:function(e){e.target===e.currentTarget&&(R&&R(e),!h&&L&&L(e,"backdropClick"))}},a)),H.createElement(Cb,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:E,getDoc:Y,isEnabled:J,open:q},H.cloneElement(s,te))))})),wb=H.forwardRef((function(e,t){var n=e.absolute,r=void 0!==n&&n,i=e.classes,o=e.className,a=e.component,s=void 0===a?"hr":a,l=e.flexItem,u=void 0!==l&&l,c=e.light,d=void 0!==c&&c,m=e.orientation,p=void 0===m?"horizontal":m,h=e.role,f=void 0===h?"hr"!==s?"separator":void 0:h,g=e.variant,v=void 0===g?"fullWidth":g,y=Kp(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return H.createElement(s,zp({className:Oy(i.root,o,"fullWidth"!==v&&i[v],r&&i.absolute,u&&i.flexItem,d&&i.light,"vertical"===p&&i.vertical),role:f,ref:t},y))})),kb=Sy((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:Xp(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}}),{name:"MuiDivider"})(wb);function Rb(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Lb={entering:{opacity:1,transform:Rb(1)},entered:{opacity:1,transform:"none"}},Ib=H.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,u=e.onExit,c=e.onExited,d=e.onExiting,m=e.style,p=e.timeout,h=void 0===p?"auto":p,f=e.TransitionComponent,g=void 0===f?Gy:f,v=Kp(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),y=H.useRef(),b=H.useRef(),x=Ev()||by,S=x.unstable_strictMode&&!i,E=H.useRef(null),M=Ry(n.ref,t),C=Ry(S?E:void 0,M),O=function(e){return function(t,n){if(e){var r=hh(S?[E.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},A=O(l),T=O((function(e,t){!function(e){e.scrollTop}(e);var n,r=nb({style:m,timeout:h},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===h?(n=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=n):n=i,e.style.transition=[x.transitions.create("opacity",{duration:n,delay:o}),x.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),N=O(s),w=O(d),k=O((function(e){var t,n=nb({style:m,timeout:h},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===h?(t=x.transitions.getAutoHeightDuration(e.clientHeight),b.current=t):t=r,e.style.transition=[x.transitions.create("opacity",{duration:t,delay:i}),x.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=Rb(.75),u&&u(e)})),R=O(c);return H.useEffect((function(){return function(){clearTimeout(y.current)}}),[]),H.createElement(g,zp({appear:!0,in:o,nodeRef:S?E:void 0,onEnter:T,onEntered:N,onEntering:A,onExit:k,onExited:R,onExiting:w,addEndListener:function(e,t){var n=S?e:t;"auto"===h&&(y.current=setTimeout(n,b.current||0))},timeout:"auto"===h?null:h},v),(function(e,t){return H.cloneElement(n,zp({style:zp({opacity:0,transform:Rb(.75),visibility:"exited"!==e||o?void 0:"hidden"},Lb[e],m,n.props.style),ref:C},t))}))}));Ib.muiSupportAuto=!0;var Pb=H.createContext({}),qb=H.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,m=Kp(e,["children","classes","className","component","dense","disablePadding","subheader"]),p=H.useMemo((function(){return{dense:l}}),[l]);return H.createElement(Pb.Provider,{value:p},H.createElement(a,zp({className:Oy(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},m),d,n))})),Db=Sy({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(qb),zb="undefined"==typeof window?H.useEffect:H.useLayoutEffect,$b=H.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,m=e.ContainerComponent,p=void 0===m?"li":m,h=e.ContainerProps,f=(h=void 0===h?{}:h).className,g=Kp(h,["className"]),v=e.dense,y=void 0!==v&&v,b=e.disabled,x=void 0!==b&&b,S=e.disableGutters,E=void 0!==S&&S,M=e.divider,C=void 0!==M&&M,O=e.focusVisibleClassName,A=e.selected,T=void 0!==A&&A,N=Kp(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),w=H.useContext(Pb),k={dense:y||w.dense||!1,alignItems:r},R=H.useRef(null);zb((function(){o&&R.current&&R.current.focus()}),[o]);var L,I,P=H.Children.toArray(l),q=P.length&&(L=P[P.length-1],I=["ListItemSecondaryAction"],H.isValidElement(L)&&-1!==I.indexOf(L.type.muiName)),D=Ry(H.useCallback((function(e){R.current=X.findDOMNode(e)}),[]),t),z=zp({className:Oy(u.root,c,k.dense&&u.dense,!E&&u.gutters,C&&u.divider,x&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,q&&u.secondaryAction,T&&u.selected),disabled:x},N),$=d||"li";return s&&(z.component=d||"div",z.focusVisibleClassName=Oy(u.focusVisible,O),$=cb),q?($=z.component||d?$:"div","li"===p&&("li"===$?$="div":"li"===z.component&&(z.component="div")),H.createElement(Pb.Provider,{value:k},H.createElement(p,zp({className:Oy(u.container,f),ref:D},g),H.createElement($,z,P),P.pop()))):H.createElement(Pb.Provider,{value:k},H.createElement($,zp({ref:D},z),P))})),Fb=Sy((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})($b),jb=H.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Kp(e,["classes","className"]),o=H.useContext(Pb);return H.createElement("div",zp({className:Oy(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),Bb=Sy((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(jb),_b=H.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,m=e.secondaryTypographyProps,p=Kp(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),h=H.useContext(Pb).dense,f=null!=u?u:n;null==f||f.type===pb||a||(f=H.createElement(pb,zp({variant:h?"body2":"body1",className:r.primary,component:"span",display:"block"},c),f));var g=d;return null==g||g.type===pb||a||(g=H.createElement(pb,zp({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},m),g)),H.createElement("div",zp({className:Oy(r.root,i,h&&r.dense,l&&r.inset,f&&g&&r.multiline),ref:t},p),f,g)})),Vb=Sy({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(_b);function Hb(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Ub(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Yb(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Wb(e){return"function"==typeof e?e():e}var Xb=H.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,m=e.container,p=e.elevation,h=void 0===p?8:p,f=e.getContentAnchorEl,g=e.marginThreshold,v=void 0===g?16:g,y=e.onEnter,b=e.onEntered,x=e.onEntering,S=e.onExit,E=e.onExited,M=e.onExiting,C=e.open,O=e.PaperProps,A=void 0===O?{}:O,T=e.transformOrigin,N=void 0===T?{vertical:"top",horizontal:"left"}:T,w=e.TransitionComponent,k=void 0===w?Ib:w,R=e.transitionDuration,L=void 0===R?"auto":R,I=e.TransitionProps,P=void 0===I?{}:I,q=Kp(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),D=H.useRef(),z=H.useCallback((function(e){if("anchorPosition"===l)return a;var t=Wb(r),n=(t&&1===t.nodeType?t:Ay(D.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+Hb(n,i),left:n.left+Ub(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),$=H.useCallback((function(e){var t=0;if(f&&"anchorEl"===l){var n=f(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,f]),F=H.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Hb(e,N.vertical)+t,horizontal:Ub(e,N.horizontal)}}),[N.horizontal,N.vertical]),j=H.useCallback((function(e){var t=$(e),n={width:e.offsetWidth,height:e.offsetHeight},i=F(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Yb(i)};var o=z(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=Ty(Wb(r)),m=d.innerHeight-v,p=d.innerWidth-v;if(a<v){var h=a-v;a-=h,i.vertical+=h}else if(u>m){var f=u-m;a-=f,i.vertical+=f}if(s<v){var g=s-v;s-=g,i.horizontal+=g}else if(c>p){var y=c-p;s-=y,i.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Yb(i)}}),[r,l,z,$,F,v]),B=H.useCallback((function(){var e=D.current;if(e){var t=j(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[j]),_=H.useCallback((function(e){D.current=X.findDOMNode(e)}),[]);H.useEffect((function(){C&&B()})),H.useImperativeHandle(n,(function(){return C?{updatePosition:function(){B()}}:null}),[C,B]),H.useEffect((function(){if(C){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){B()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[C,B]);var V=L;"auto"!==L||k.muiSupportAuto||(V=void 0);var U=m||(r?Ay(Wb(r)).body:void 0);return H.createElement(Nb,zp({container:U,open:C,ref:t,BackdropProps:{invisible:!0},className:Oy(c.root,d)},q),H.createElement(k,zp({appear:!0,in:C,onEnter:y,onEntered:b,onExit:S,onExited:E,onExiting:M,timeout:V},P,{onEntering:My((function(e,t){x&&x(e,t),B()}),P.onEntering)}),H.createElement(ib,zp({elevation:h,ref:_},A,{className:Oy(c.paper,A.className)}),u)))})),Gb=Sy({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Xb);function Kb(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Jb({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:Kb(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return V.createElement("i",{style:i},V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},V.createElement("path",{d:e})))}const Zb="alternative-menu-item",Qb=e=>{const{nested:t,className:n,...r}=e,i=(({nested:e,dir:t})=>Rv((n=>({root:{textAlign:"ltr"===t?"start":"end","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"},...e&&"ltr"===t&&{paddingLeft:n.spacing(4)},...e&&"rtl"===t&&{paddingRight:n.spacing(4)}}}))))(e)();return V.createElement(Fb,mp({className:`${i.root} ${n}`},r))},ex=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${Zb}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function tx({title:e,selected:t,onClick:n,nested:r,icon:i,bold:o,dir:a}){const s=Pe.detectTextDirection(e);return V.createElement(Qb,{nested:r,role:"menuitem",button:!0,onClick:n,className:Zb,onKeyDown:ex,dir:a,autoFocus:t},V.createElement(Vb,{primary:e,primaryTypographyProps:{dir:s,...o&&{style:{fontWeight:600}}}}),V.createElement(Bb,{style:{minWidth:16}},V.createElement(Jb,{d:t?Gm:""})),i&&V.createElement(Bb,{style:{minWidth:16}},V.createElement(Jb,{d:i.d})))}tx.propTypes={title:gp.string.isRequired,selected:gp.bool,onClick:gp.func.isRequired,nested:gp.bool,icon:gp.shape({d:gp.string.isRequired}),bold:gp.bool,dir:gp.string.isRequired},tx.defaultProps={selected:!1,nested:!1,icon:void 0,bold:!1},Qb.propTypes={nested:gp.bool,className:gp.string},Qb.defaultProps={nested:!1,className:Zb};const nx={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"}}};function rx({chartId:e,alignTo:t,currentId:n,dir:r,dock:i,list:o,onClose:a,show:s,instruction:l}){const u=o.map(((t,i)=>{var s;return V.createElement(V.Fragment,{key:t.id},V.createElement(tx,{icon:t.icon,title:t.title,bold:t.groupItem,selected:t.selected,onClick:()=>{t.onSelect&&t.onSelect(n),a(`${e}-${t.id}`)},dir:r}),(null===(s=t.children)||void 0===s?void 0:s.length)>0&&V.createElement(Db,{dense:!0,dir:r,component:"div",disablePadding:!0},t.children.map((e=>V.createElement(tx,{key:e.id,nested:!0,title:e.title,selected:e.selected,onClick:()=>{e.onSelect(),a(t.id)},dir:r})))),i<o.length-1&&V.createElement(kb,{key:`divider-${t.id}`}))}));return V.createElement(Gb,mp({anchorEl:t,open:s,onClose:a},nx[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),V.createElement(Db,{dense:!0,disablePadding:!0,dir:r,"aria-label":l,component:"nav"},u))}rx.propTypes={chartId:gp.string.isRequired,alignTo:gp.any,currentId:gp.string.isRequired,dir:gp.string.isRequired,dock:gp.string.isRequired,list:gp.array,onClose:gp.func.isRequired,show:gp.bool.isRequired,instruction:gp.string.isRequired},rx.defaultProps={list:[],alignTo:null};const ix="title-button",ox="active-title-button",ax=xy((({children:e,...t})=>V.createElement(fb,mp({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),sx=xy(fb)((()=>({borderRadius:"4px",width:"24px",height:"24px",minWidth:"22px",padding:0})));class lx extends V.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasPopoverOptions:!1,disableCyclicButton:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.alignToRef=V.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n,showGroupDimOptions:r}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&(n||r)&&e.getPopoverOptions().then((e=>{this.setState({hasPopoverOptions:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r,showGroupDimOptions:i}=this.props;n&&(r||i)&&n.getPopoverOptions().then((e=>{t.hasPopoverOptions!==(0!==e.length)&&this.setState({hasPopoverOptions:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${ix}`);t&&(t.focus(),t.classList.add(ox))}this.props.popover.getPopoverOptions().then((e=>{this.setState({open:!0,list:e})}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${ix}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${ox}`);e&&(e.classList.remove(ox),setTimeout((()=>{e.focus()}),50))}}render(){const{chartId:e,titleData:t,popover:n,translator:r,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:u,showGroupDimOptions:c}=this.props,d={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},m=t.breadcrumbs.length,p=i||Boolean(!t.drillUp)||this.state.inSelection,h=t.breadcrumbs.map(((e,n)=>V.createElement(ax,{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:t.drillUp(m-n),title:e},V.createElement("span",{style:d},e),V.createElement(Jb,mp({},Jm,{size:"small",style:{margin:"0 8px"}}))))),f=u||c?this.state.hasPopoverOptions:l,g=n&&!this.state.open?this.openPopover:this.closePopover,v=!n||i||this.state.inSelection,y={display:"flex",alignItems:"center",width:"100%",color:v&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&v&&"none",...a?{padding:a}:{paddingTop:0,paddingBottom:0},...s&&{minWidth:s}};this.state.open&&(y.background="rgba(0,0,0,0.08)");const b=()=>{this.setState({disableCyclicButton:!0})},x=Pe.detectTextDirection(t.text),S=V.createElement(ax,{"aria-label":r.get(`Accessibility.${n&&f?"Alternative":"Normal"}.Instructions`,[t.text]),style:y,onClick:v?void 0:g,title:t.text,tabIndex:v?-1:0,onFocus:v?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:v?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${ix} ${t.id}`,"data-id":`${e}-${t.id}`},t.locked&&V.createElement(Jb,mp({},Xm,{size:"small",title:r.get("Tooltip.selections.locked")})),V.createElement("span",{style:d,dir:x},t.text),n&&f&&V.createElement(Jb,mp({},Km,{size:"small",style:{margin:"0 8px"}})));return V.createElement(V.Fragment,null,t.icon&&t.icon.onClick&&V.createElement(sx,{variant:"outlined",disabled:this.state.disableCyclicButton||this.state.inSelection,onClick:i?void 0:()=>t.icon.onClick({onError:b})},V.createElement(Jb,mp({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip)}))),t.icon&&!t.icon.onClick&&V.createElement(Jb,mp({},t.icon.path,{size:"small",title:r.get(t.icon.tooltip),style:{margin:"0 4px 0 0"}})),h,V.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},S),n&&f&&V.createElement(rx,{chartId:e,dock:n.dock,dir:n.dir,currentId:t.id,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.list,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function ux(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function cx(e){function t(e){return!e.isDimension&&xe.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:n}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||t(this.settings.settings)?Math.max(28,n):Math.max(20,n)},render(){const{settings:{app:e,disabled:n,explicitItemInfos:r,hyperCube:i,hyperCubeDef:o,isDimension:a,minWidth:s,model:l,onChangeToAlternative:u,padding:c,rtl:d,selections:m,skipAttributeExpressions:p,translator:h,supportConditional:f=!1},layout:{dock:g}}=this.settings,v="top"!==g&&"bottom"!==g||!d?"ltr":"rtl",y=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}(g,this.rect),b=o&&o.qLayoutExclude&&o.qLayoutExclude.qHyperCubeDef,x=b&&b[a?"qDimensions":"qMeasures"]||[],S=r||i[a?"qDimensionInfo":"qMeasureInfo"],E=a?lp:cp,M=a?up:dp,C=Boolean(l&&l.colorSupport&&l.modifiers),O=C&&((A=this.settings.settings).isDimension&&xe.getValue(A,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||t(this.settings.settings));var A;const T=S.map(((t,r)=>{var i;const o="number"==typeof t.explicitColumn?t.explicitColumn:r,v=M(t,o,l,e),y=r===S.length-1,b=Boolean(e)&&a&&"N"!==t.qGrouping,A=C||b?E({column:o,activeInfo:t,altList:x,app:e,dir:d?"rtl":"ltr",dock:ux(g),model:l,onChange:u,skipAttributeExpressions:p,translator:h,allowChangeOfAlternatives:C}):void 0;return V.createElement(V.Fragment,{key:t.cId},V.createElement(lx,{chartId:null!==(i=null==l?void 0:l.id)&&void 0!==i?i:"",showGroupDimOptions:b,popover:A,titleData:v,model:l,translator:h,selections:m,disabled:n(),style:this.style,isDimension:a,padding:c,minWidth:s,hasAlternative:O,supportConditional:f}),!y&&V.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return V.createElement("div",{style:y,dir:v},T)}}}lx.propTypes={chartId:gp.string.isRequired,disabled:gp.bool.isRequired,padding:gp.string,minWidth:gp.string,titleData:gp.shape({breadcrumbs:gp.arrayOf(gp.string).isRequired,icon:gp.shape({path:gp.shape({d:gp.string.isRequired}),tooltip:gp.string.isRequired,onClick:gp.func}),index:gp.number.isRequired,locked:gp.bool.isRequired,text:gp.string.isRequired,popoverText:gp.string.isRequired,drillUp:gp.func,id:gp.string.isRequired}).isRequired,popover:gp.shape({dir:gp.string.isRequired,dock:gp.string.isRequired,getPopoverOptions:gp.func.isRequired}),translator:gp.shape({get:gp.func.isRequired}).isRequired,selections:gp.shape({isActive:gp.func,addListener:gp.func,removeListener:gp.func}),style:gp.shape({fontSize:gp.string,color:gp.string,fontFamily:gp.string}).isRequired,isDimension:gp.bool.isRequired,hasAlternative:gp.bool.isRequired,supportConditional:gp.bool.isRequired,showGroupDimOptions:gp.bool.isRequired},lx.defaultProps={popover:null,selections:null,padding:"",minWidth:""};const dx=Sh({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 mx=Ch({productionPrefix:"qdf7c",disableGlobal:!0,seed:""});function px(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){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!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={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",G.render(function(e,t){return V.createElement(Tv,{generateClassName:t},V.createElement(yy,{theme:dx},e))}(e,mx),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&G.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(G.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function hx(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:hx(i,t,n)},i}function fx(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),hx(i,a,l,e.invert)}))}const gx={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(de({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function vx({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,u=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=de({},{major:l,majorEnd:u},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const m=o?n:t,p=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),h=(c-p)/2,f=h+d.major+p/2;return{item:d,boxCenter:f,boxWidth:p,boxPadding:h,rendWidth:t,rendHeight:n}}function yx({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=de(!0,{},n||{},r||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let d;d="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:de(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:de(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const m=i.minor||{};let p;const h={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:de(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})};for(let n=0,r=e.length;n<r;n++)p=e[n],h[p]=s.resolve({data:t,defaults:l[p],settings:i[p],scaled:u});return h}const bx=["oob"];const xx={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=yx({keys:bx,data:i,defaultSettings:{oob:gx.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=vx}){const l=[],{items:u}=r.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:p,rendHeight:h}=s({i:c,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),f=u[c].data,g=[];if(d.oob.show){g.push(gx.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:p,rendHeight:h,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:bx,symbol:s,dockValue:n});return d}},Sx={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Ex=["hat"];function Mx(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 Cx({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=r,c=1-c);const d=(n+e.major)*l;let m=[{[a]:d,[s]:0+u},{[a]:d+t*c*l,[s]:8},{[a]:d+t*l,[s]:0+u},{[a]:d+t*l,[s]:0+u+10},{[a]:d,[s]:0+u+10}];const p=de({},e.hat,{type:"path",d:Mx(m)});m=[{[a]:d,[s]:0},{[a]:d+t*(1-c)*l,[s]:0+u-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[p,de({},e.hat,{type:"path",d:Mx(m)})]}const Ox={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=yx({keys:Ex,data:r,defaultSettings:Sx,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,u=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=vx}){const a=[],{items:s}=r.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:p}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),h=s[l].data,f=[];u.hat.show&&f.push(...Cx({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:p,flipXY:n}));const g={type:"container",data:h,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Ex});return u}};var Ax={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var Tx={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,u=this.settings.settings.primaryExtremum(),c=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==u,m=l.length&&void 0!==c;if(!d&&!m)return[];const p=s.map((e=>e.ref)),h=l.map((e=>e.ref)),f=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?r:i;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const i="max"===e?e=>e>t:e=>e<t,o=n?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return r.filter(o)})({type:e,extremum:a,items:l}))}));const l=(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])});return l}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>p.includes(e.end.source.field))),secondaryItems:e.filter((e=>h.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!f.length)return[];const g="horizontal"===n,v=this.rect[g?"width":"height"],y=this.resolver.resolve({data:{items:f},settings:{major:a},scaled:{major:v}}),b=("max"===t?90:-90)-(g?0:90)-(!g&&r?180:0),x=o/2*i,{fill:S}=this.settings.style,E=y.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:S,startAngle:b,x:g?v*e.major:x,y:g?x:v*e.major,data:e.data})));return E}};function Nx({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function wx({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))],i=e.findShapes("path").filter((e=>r.some((t=>t===e.key))));return i.reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function kx({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function Rx({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(ps.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function Lx({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:u,legendTap:c}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let m=[u?e=>e.color.value:r[d]].filter(Boolean);if(i&&l&&m.push((e=>e.color.value)),!i&&c&&(m=[e=>e.color.value]),!m.length)return[];const p=function({brush:e,chart:t}){return("value"===e.type?kx:Rx)({brush:e,chart:t})}({brush:s,chart:o});return p?n.reduce(((e,t,n)=>(m.some((e=>p({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function Ix({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(ps.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/c))}))),m=d.map((e=>e.offset)),p=m.lastIndexOf(0),h=m.indexOf(1),f=d.slice(-1===p?0:p,-1===h?d.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function Px({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(ps.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,u=0===l?1:l,c=o.domain(),d=[];for(let e=0;e<c.length-1;e++){const t=c[e],n=o(t)||i;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const r=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/u))})}const m=d.map((e=>e.offset)),p=m.lastIndexOf(0),h=m.indexOf(1),f=d.slice(-1===p?0:p,-1===h?d.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function qx({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const m=r[e];if("gradient"!==m.type)return m;const{type:p,nil:h}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(ps.SCALE.MAJOR),d=e.scale(ps.SCALE.COLOR),m=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),p=t.filter((e=>-1!==n.indexOf(e.index))),h=("vertical"===o&&u?p.reverse():p).map((e=>e.item)),f=h.map((e=>m(e.major.value))),g=Math.min(...f),v=Math.max(...f)-g,y=0===v?1:v,b=f.map(((e,t)=>0===t?0:t===f.length-1?1:(e-g)/y)),x=[];for(let e=0;e<h.length;e++){const t=h[e],n=a?t.color.value:d(t.color.value)||i,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===h.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:m,fallback:h,orientation:c,isColorCode:"color"===p,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===p?Ix:Px)({chart:t,selected:a,connection:n,gradient:m,fallback:h})}function Dx({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:m,count:p}){const h=t.getLine(l,u),{attrs:f}=h,g=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:f.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:u,attrs:c,rtl:d,count:m}){return{path:l.map(((e,t)=>{const n=u[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:c,stroke:qx({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:g,attrs:f,rtl:m,count:p})))}function zx({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,rtl:p}){const h=function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:n}),f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const i=n.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:h,seriesInfo:n}),{lines:g}=f.reduce(((n,o)=>{const h=Lx({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(h.length<2)return n;const f=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:h});return f.length?(n.lines.push(...Dx({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,lineKey:o.lineKey,primary:o.primary,selected:h,connections:f,rtl:p,count:o.items.length})),n):n}),{lines:[]}),v=[];return g.forEach((e=>v.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),v}var $x={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:wx({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=zx({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=wx({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return zx({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const Fx=()=>{const e=B();return e.use(_),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Hm(e))};e.interaction("hammer",Hm(Hammer))}(j)),e.use(fx),e.use((function(e){e.renderer("react",px()),e.component("data-title",cx(e.renderer("svg")()))})),e.renderer("react-qcm",K),e.component("axis-title",J),e.component("disclaimer",Z),e.component("scrollbar",El),e.component("point-label",N),e.component("label-space",Ax),e.component("time-axis",gm.picassoComponents.timeAxis),e.component("axis-overlay",gm.picassoComponents.axisOverlay),e.component("reference-line-labels",Ia),e.component("box-sliced-hat",Ox),e.component("box-out-of-bounds",xx),e.component("data-out-of-bounds-marker",Tx),e.component("scroll-hint",ko),e.component("brush-highlighter",$x),e.scale("time",gm.picassoScales.time),e.symbol("line-point",Nx),e},jx=e=>"[object Object]"===Object.prototype.toString.call(e),Bx=e=>Array.isArray(e);function _x(e,t){if(e===t)return!0;if(Bx(e)){if(!Bx(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!_x(e[n],t[n]))return!1;return!0}if(jx(e)){if(!jx(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!_x(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function Vx({enable:e=!0}={}){const t=a(),i=()=>Date.now().toString()+Math.random(),[o,s]=n(i()),l={properties:void 0};return r((()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then((e=>{const t=de(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){var n,r,i,o;const a={properties:!1,exclude:!1};if(e===t)return a;const s=de(!0,{},e),l=de(!0,{},t);return a.exclude=!_x(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(r=l.qHyperCubeDef)||void 0===r?void 0:r.qLayoutExclude),null===(i=s.qHyperCubeDef)||void 0===i||delete i.qLayoutExclude,null===(o=l.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,a.properties=!_x(s,l),a}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(i())}))};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}}),[e]),o}const Hx={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},Ux=e=>void 0===e.marker?Hx.circle:Hx[e.marker],Yx=e=>void 0===e.markerFill||e.markerFill;function Wx({series:e,layoutService:t}){switch(Nc(e)){case hs.TYPE.MARKER:return(e=>({marker:Ux(e),fill:Yx(e)}))(e);case hs.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case hs.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function Xx(e=hs.NOPE_SERIES,t=!0){return t?e.axis===hs.AXIS.PRIMARY:e.axis===hs.AXIS.PRIMARY||Nc(e)===hs.TYPE.BAR}var Gx={exports:{}};var Kx={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Jx="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Zx=Jx;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Kx,o=Zx,a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],u=t.safeSrc=[],c=t.t={};let d=0;const m="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",i],[m,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=d++;o(e,i,t),c[e]=i,l[i]=t,u[i]=r,a[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),h("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${m}+`),h("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),h("FULL",`^${l[c.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),h("LOOSE",`^${l[c.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),h("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?`+`(?:${l[c.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[c.COERCE],!0),h("COERCERTLFULL",l[c.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Gx,Gx.exports);var Qx=Gx.exports;const eS=Object.freeze({loose:!0}),tS=Object.freeze({});var nS=e=>e?"object"!=typeof e?eS:e:tS;const rS=/^[0-9]+$/,iS=(e,t)=>{const n=rS.test(e),r=rS.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var oS={compareIdentifiers:iS,rcompareIdentifiers:(e,t)=>iS(t,e)};const aS=Zx,{MAX_LENGTH:sS,MAX_SAFE_INTEGER:lS}=Kx,{safeRe:uS,t:cS}=Qx,dS=nS,{compareIdentifiers:mS}=oS;var pS=class e{constructor(t,n){if(n=dS(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>sS)throw new TypeError(`version is longer than ${sS} characters`);aS("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?uS[cS.LOOSE]:uS[cS.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>lS||this.major<0)throw new TypeError("Invalid major version");if(this.minor>lS||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>lS||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<lS)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(aS("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),mS(this.major,t.major)||mS(this.minor,t.minor)||mS(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const e=this.prerelease[n],r=t.prerelease[n];if(aS("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return mS(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],r=t.build[n];if(aS("build compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return mS(e,r)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?uS[cS.PRERELEASELOOSE]:uS[cS.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===mS(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const hS=pS;var fS=(e,t,n=!1)=>{if(e instanceof hS)return e;try{return new hS(e,t)}catch(e){if(!n)return null;throw e}};const gS=fS;var vS=(e,t)=>{const n=gS(e,t);return n?n.version:null};const yS=fS;var bS=(e,t)=>{const n=yS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const xS=pS;var SS=(e,t,n,r,i)=>{"string"==typeof n&&(i=r,r=n,n=void 0);try{return new xS(e instanceof xS?e.version:e,n).inc(t,r,i).version}catch(e){return null}};const ES=fS;var MS=(e,t)=>{const n=ES(e,null,!0),r=ES(t,null,!0),i=n.compare(r);if(0===i)return null;const o=i>0,a=o?n:r,s=o?r:n,l=!!a.prerelease.length;if(!!s.prerelease.length&&!l){if(!s.patch&&!s.minor)return"major";if(0===s.compareMain(a))return s.minor&&!s.patch?"minor":"patch"}const u=l?"pre":"";return n.major!==r.major?u+"major":n.minor!==r.minor?u+"minor":n.patch!==r.patch?u+"patch":"prerelease"};const CS=pS;var OS=(e,t)=>new CS(e,t).major;const AS=pS;var TS=(e,t)=>new AS(e,t).minor;const NS=pS;var wS=(e,t)=>new NS(e,t).patch;const kS=fS;var RS=(e,t)=>{const n=kS(e,t);return n&&n.prerelease.length?n.prerelease:null};const LS=pS;var IS=(e,t,n)=>new LS(e,n).compare(new LS(t,n));const PS=IS;var qS=(e,t,n)=>PS(t,e,n);const DS=IS;var zS=(e,t)=>DS(e,t,!0);const $S=pS;var FS=(e,t,n)=>{const r=new $S(e,n),i=new $S(t,n);return r.compare(i)||r.compareBuild(i)};const jS=FS;var BS=(e,t)=>e.sort(((e,n)=>jS(e,n,t)));const _S=FS;var VS=(e,t)=>e.sort(((e,n)=>_S(n,e,t)));const HS=IS;var US=(e,t,n)=>HS(e,t,n)>0;const YS=IS;var WS=(e,t,n)=>YS(e,t,n)<0;const XS=IS;var GS=(e,t,n)=>0===XS(e,t,n);const KS=IS;var JS=(e,t,n)=>0!==KS(e,t,n);const ZS=IS;var QS=(e,t,n)=>ZS(e,t,n)>=0;const eE=IS;var tE=(e,t,n)=>eE(e,t,n)<=0;const nE=GS,rE=JS,iE=US,oE=QS,aE=WS,sE=tE;var lE=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return nE(e,n,r);case"!=":return rE(e,n,r);case">":return iE(e,n,r);case">=":return oE(e,n,r);case"<":return aE(e,n,r);case"<=":return sE(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const uE=pS,cE=fS,{safeRe:dE,t:mE}=Qx;var pE,hE,fE,gE,vE,yE,bE=(e,t)=>{if(e instanceof uE)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?dE[mE.COERCERTLFULL]:dE[mE.COERCERTL];let i;for(;(i=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),r.lastIndex=i.index+i[1].length+i[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?dE[mE.COERCEFULL]:dE[mE.COERCE]);if(null===n)return null;const r=n[2],i=n[3]||"0",o=n[4]||"0",a=t.includePrerelease&&n[5]?`-${n[5]}`:"",s=t.includePrerelease&&n[6]?`+${n[6]}`:"";return cE(`${r}.${i}.${o}${a}${s}`,t)};function xE(){if(gE)return fE;gE=1;const e=/\s+/g;class t{constructor(n,r){if(r=i(r),n instanceof t)return n.loose===!!r.loose&&n.includePrerelease===!!r.includePrerelease?n:new t(n.raw,r);if(n instanceof o)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!f(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&g(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&h))+":"+e,n=r.get(t);if(n)return n;const i=this.options.loose,s=i?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(s,N(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],c),a("comparator trim",e),e=e.replace(l[u.TILDETRIM],d),a("tilde trim",e),e=e.replace(l[u.CARETTRIM],m),a("caret trim",e);let g=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>T(e,this.options)));i&&(g=g.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(l[u.COMPARATORLOOSE]))))),a("range list",g);const v=new Map,b=g.map((e=>new o(e,this.options)));for(const e of b){if(f(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const x=[...v.values()];return r.set(t,x),x}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>v(t,n)&&e.set.some((e=>v(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(w(this.set[t],e,this.options))return!0;return!1}}fE=t;const n=(hE||(hE=1,pE=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}),pE),r=new n,i=nS,o=SE(),a=Zx,s=pS,{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:m}=Qx,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:h}=Kx,f=e=>"<0.0.0-0"===e.value,g=e=>""===e.value,v=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(a("comp",e,t),e=E(e,t),a("caret",e),e=x(e,t),a("tildes",e),e=C(e,t),a("xrange",e),e=A(e,t),a("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const n=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(n,((t,n,r,i,o)=>{let s;return a("tilde",e,t,n,r,i,o),b(n)?s="":b(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:b(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${n}.${r}.${i}-${o} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,a("tilde return",s),s}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>M(e,t))).join(" "),M=(e,t)=>{a("caret",e,t);const n=t.loose?l[u.CARETLOOSE]:l[u.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,o,s)=>{let l;return a("caret",e,t,n,i,o,s),b(n)?l="":b(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:b(o)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${o}-${s} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o}-${s} <${+n+1}.0.0-0`):(a("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${o}${r} <${n}.${i}.${+o+1}-0`:`>=${n}.${i}.${o}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${o} <${+n+1}.0.0-0`),a("caret return",l),l}))},C=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const n=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(n,((n,r,i,o,s,l)=>{a("xRange",e,n,r,i,o,s,l);const u=b(i),c=u||b(o),d=c||b(s),m=d;return"="===r&&m&&(r=""),l=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&m?(c&&(o=0),s=0,">"===r?(r=">=",c?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",c?i=+i+1:o=+o+1),"<"===r&&(l="-0"),n=`${r+i}.${o}.${s}${l}`):c?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${o}.0${l} <${i}.${+o+1}.0-0`),a("xRange return",n),n}))},A=(e,t)=>(a("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),T=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),N=e=>(t,n,r,i,o,a,s,l,u,c,d,m)=>`${n=b(r)?"":b(i)?`>=${r}.0.0${e?"-0":""}`:b(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=b(u)?"":b(c)?`<${+u+1}.0.0-0`:b(d)?`<${u}.${+c+1}.0-0`:m?`<=${u}.${c}.${d}-${m}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),w=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(a(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return fE}function SE(){if(yE)return vE;yE=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}vE=t;const n=nS,{safeRe:r,t:i}=Qx,o=lE,a=Zx,s=pS,l=xE();return vE}const EE=xE();var ME=(e,t,n)=>{try{t=new EE(t,n)}catch(e){return!1}return t.test(e)};const CE=xE();var OE=(e,t)=>new CE(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const AE=pS,TE=xE();var NE=(e,t,n)=>{let r=null,i=null,o=null;try{o=new TE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new AE(r,n)))})),r};const wE=pS,kE=xE();var RE=(e,t,n)=>{let r=null,i=null,o=null;try{o=new kE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new wE(r,n)))})),r};const LE=pS,IE=xE(),PE=US;var qE=(e,t)=>{e=new IE(e,t);let n=new LE("0.0.0");if(e.test(n))return n;if(n=new LE("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new LE(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!PE(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!PE(n,i)||(n=i)}return n&&e.test(n)?n:null};const DE=xE();var zE=(e,t)=>{try{return new DE(e,t).range||"*"}catch(e){return null}};const $E=pS,FE=SE(),{ANY:jE}=FE,BE=xE(),_E=ME,VE=US,HE=WS,UE=tE,YE=QS;var WE=(e,t,n,r)=>{let i,o,a,s,l;switch(e=new $E(e,r),t=new BE(t,r),n){case">":i=VE,o=UE,a=HE,s=">",l=">=";break;case"<":i=HE,o=YE,a=VE,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_E(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const u=t.set[n];let c=null,d=null;if(u.forEach((e=>{e.semver===jE&&(e=new FE(">=0.0.0")),c=c||e,d=d||e,i(e.semver,c.semver,r)?c=e:a(e.semver,d.semver,r)&&(d=e)})),c.operator===s||c.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const XE=WE;var GE=(e,t,n)=>XE(e,t,">",n);const KE=WE;var JE=(e,t,n)=>KE(e,t,"<",n);const ZE=xE();var QE=(e,t,n)=>(e=new ZE(e,n),t=new ZE(t,n),e.intersects(t,n));const eM=ME,tM=IS;const nM=xE(),rM=SE(),{ANY:iM}=rM,oM=ME,aM=IS,sM=[new rM(">=0.0.0-0")],lM=[new rM(">=0.0.0")],uM=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===iM){if(1===t.length&&t[0].semver===iM)return!0;e=n.includePrerelease?sM:lM}if(1===t.length&&t[0].semver===iM){if(n.includePrerelease)return!0;t=lM}const r=new Set;let i,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?i=cM(i,t,n):"<"===t.operator||"<="===t.operator?o=dM(o,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&o){if(a=aM(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of r){if(i&&!oM(e,String(i),n))return null;if(o&&!oM(e,String(o),n))return null;for(const r of t)if(!oM(e,String(r),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(c=c||">"===e.operator||">="===e.operator,u=u||"<"===e.operator||"<="===e.operator,i)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(s=cM(i,e,n),s===e&&s!==i)return!1}else if(">="===i.operator&&!oM(i.semver,String(e),n))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=dM(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!oM(o.semver,String(e),n))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&u&&!o&&0!==a)&&(!(o&&c&&!i&&0!==a)&&(!m&&!d))},cM=(e,t,n)=>{if(!e)return t;const r=aM(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},dM=(e,t,n)=>{if(!e)return t;const r=aM(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var mM=(e,t,n={})=>{if(e===t)return!0;e=new nM(e,n),t=new nM(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=uM(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const pM=Qx,hM=Kx,fM=pS,gM=oS,vM=(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>tM(e,t,n)));for(const e of a){eM(e,t,n)?(o=e,i||(i=e)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push(`<=${t}`):s.push(`${e} - ${t}`):s.push(`>=${e}`):s.push("*");const l=s.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return l.length<u.length?l:t};var yM=te({parse:fS,valid:vS,clean:bS,inc:SS,diff:MS,major:OS,minor:TS,patch:wS,prerelease:RS,compare:IS,rcompare:qS,compareLoose:zS,compareBuild:FS,sort:BS,rsort:VS,gt:US,lt:WS,eq:GS,neq:JS,gte:QS,lte:tE,cmp:lE,coerce:bE,Comparator:SE(),Range:xE(),satisfies:ME,toComparators:OE,maxSatisfying:NE,minSatisfying:RE,minVersion:qE,validRange:zE,outside:WE,gtr:GE,ltr:JE,intersects:QE,simplifyRange:vM,subset:mM,SemVer:fM,re:pM.re,src:pM.src,tokens:pM.t,SEMVER_SPEC_VERSION:hM.SEMVER_SPEC_VERSION,RELEASE_TYPES:hM.RELEASE_TYPES,compareIdentifiers:gM.compareIdentifiers,rcompareIdentifiers:gM.rcompareIdentifiers}),bM={BAR_IN_SECONDARY_AXIS:"0.23.1"};const xM=e=>!e||yM.lt(yM.coerce(e),yM.coerce(bM.BAR_IN_SECONDARY_AXIS)),SM=({layoutService:e})=>{const t=!xM(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[hs.TYPE.BAR]:0,[hs.TYPE.LINE]:0,[hs.TYPE.MARKER]:0};return({series:r=hs.NOPE_SERIES},i)=>{const o=Xx(r,t),a=Nc(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?ps.SCALE.MINOR.PRIMARY:ps.SCALE.MINOR.SECONDARY,collection:o?ps.COLLECTION.PRIMARY:ps.COLLECTION.SECONDARY,options:Wx({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>Nc(e)===t)).length,i=n.filter((e=>e.isPrimary)),o=n.filter((e=>!e.isPrimary)),a=[!!i.length&&i[0],!!o.length&&o[0]].filter((e=>!!e)),s=r(n,hs.TYPE.BAR),l=r(i,hs.TYPE.BAR),u=r(o,hs.TYPE.BAR),c=e=>n.filter((t=>Nc(t)===e)),d=c(hs.TYPE.LINE).map((e=>Jl(ps.COMPONENT.POINT,e))),m=c(hs.TYPE.MARKER).map((e=>({key:Jl(ps.COMPONENT.MARKER,e),type:e.options.marker}))),p=m.map((e=>e.key)),h=[];l>0&&h.push(`${ps.COMPONENT.BAR}-${hs.AXIS.PRIMARY}`),u>0&&h.push(`${ps.COMPONENT.BAR}-${hs.AXIS.SECONDARY}`);const f=[...h,...d,...p],{MINI_CHART:g}=ps.COMPONENT,v=c(hs.TYPE.LINE).map((e=>Jl(g.LINE,e))),y=c(hs.TYPE.MARKER).map((e=>Jl(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${hs.AXIS.PRIMARY}`,`${g.BAR}-${hs.AXIS.SECONDARY}`,...v,...y]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:u,measureAxes:a,pointComponentKeys:d,markerComponentKeys:p,barComponentKeys:h,seriesComponentKeys:f,miniComponentKeys:b,markers:m},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:c,isPrimary:Xx}}};function EM({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}function MM({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(Ae).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=o?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,{path:"/qHyperCubeDef",rect:EM({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function CM({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):MM({genericObjectModel:e,layoutService:t})}const OM=e=>"number"==typeof e&&!Number.isNaN(e);function AM({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),o=i.filter((e=>Nc(e.series)===hs.TYPE.BAR)),a=i.filter((e=>Nc(e.series)===hs.TYPE.LINE)),s=i.filter((e=>Nc(e.series)===hs.TYPE.MARKER));return{min:Math.min(...i.filter((e=>OM(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>OM(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>OM(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>OM(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>OM(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>OM(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>OM(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>OM(e.qMax))).map((e=>e.qMax)))}}}}function TM({isPrimary:e,layoutService:t,seriesModel:n}){const r=AM({isPrimary:e,layoutService:t,seriesModel:n}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(hs.TYPE.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=n,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?n:Math.max(n,o.max)})),o}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function NM({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,i=n.query.series(hs.TYPE.BAR).filter((t=>t.isPrimary===e)).length;return!r||i<2?AM({isPrimary:e,layoutService:t,seriesModel:n}):TM({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:u}=a({dataPage:t}),c=i.query.seriesByAxis(e).some((e=>Nc(e)===hs.TYPE.BAR)),d=Number((c?Math.min(n,0):n).toFixed(13)),m=Number((c?Math.max(r,0):r).toFixed(13)),p=Number((c?Math.min(s.min,0):s.min).toFixed(13)),h=Number((c?Math.max(s.max,0):s.max).toFixed(13)),f=Number((c?Math.min(l.min,0):l.min).toFixed(13)),g=Number((c?Math.max(l.max,0):l.max).toFixed(13)),v=Number((c?Math.min(u.min,0):u.min).toFixed(13)),y=Number((c?Math.max(u.max,0):u.max).toFixed(13));o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(m)?m:0,o.implicit.bar.min=Number.isFinite(p)?p:0,o.implicit.bar.max=Number.isFinite(h)?h:0,o.implicit.line.min=Number.isFinite(f)?f:0,o.implicit.line.max=Number.isFinite(g)?g:0,o.implicit.marker.min=Number.isFinite(v)?v:0,o.implicit.marker.max=Number.isFinite(y)?y:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}function wM({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function kM({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=gr().domain([e,t]);return r.nice(n),r}(e,t,n),a={start:!0,stop:!0};if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const RM=50,LM=100,IM=200,PM=125;function qM({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return RM;case 1:return LM;case 2:return IM;default:return e*PM}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/r))}function DM({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=qM({config:e,layoutService:n,size:o}),u=kM({min:a,max:s,count:l,threshold:.05,disable:!0}),c=u.domain(),d={roundedMin:c[0],roundedMax:c[1],ticks:u.ticks(l)},m="horizontal"===r.meta.major.orientation?"height":"width",p=e=>i(e)[m],h=t.formatter(e.formatter),f=()=>{const e=d.ticks.map(h),t=e.some(((t,n)=>e.indexOf(t)!==n));return!t&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(p))<=t})(e)};for(let e=l-1;e>0&&!f();e--)u.domain([a,s]),u.nice(e),[d.roundedMin,d.roundedMax]=u.domain(),d.ticks=u.ticks(e);return d}function zM({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function $M({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function FM({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=kM({min:r,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),u=l?zM:$M;o.ticks=s.filter(((e,t,n)=>u({tick:e,index:t,ticks:n})));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const c=t.formatter(e.formatter),d=o.ticks.map(c),m=d.some(((e,t)=>d.indexOf(e)!==t));return m&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function jM({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function BM({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=DM({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return wM({extrema:i,ticks:u.ticks})?u:FM({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({ticks:u,count:1}),p=[...jM({ticks:u,extrema:i}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return{min:c,max:d,values:p}}function _M({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return BM({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function VM({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,u=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=B.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var r;const i=n.component(t.meta.seriesComponentKeys[0]),o=null!==(r=null==i?void 0:i.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=r.query.getExtrema();return _M({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:c,size:u})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),c=()=>(s.locked&&s.resolved||(s.resolved=u()),s.resolved);return{query:{getValues:()=>c().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:c().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:c().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function HM({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return Ce.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}function UM({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:hs.TYPE.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===hs.TYPE.LINE?2:t!==hs.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==hs.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function YM({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function WM({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:u}){let c;const{theme:d,translator:m}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return c=w({picasso:s,model:o,app:n,translator:m,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:d,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:ps.SCALE.COLOR}},config:{auto:YM,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:t=>{const{components:n,interactions:o,scales:s}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,u={eventName:"legend-c",key:ps.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",styleOverrides:{title:s.query.legend.title.getStyle(),label:s.query.legend.label.getStyle()},rtl:"rtl"===l.direction,settings:UM({layoutService:n,seriesModel:r,colorService:o})},{components:c,interactions:d}=o.getLegend(u,{actions:a,navigationDisabled:!a.interact.enabled()}),m=o.getScales();return{components:c.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=m[`${ps.SCALE.COLOR}Range`];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:d,scales:m}}({viewState:u,chart:r,environment:i,colorService:c,seriesModel:l,layoutService:a,actions:e,styleModel:t});p.wrappedScales=s,p.legendComponents=n,p.legendInteractions=o}}}),c}const XM="REJECTED",GM=()=>{},KM=2,JM=20,ZM=200,QM=10;var eC={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-QM<=t.qTop,i=n.qLeft+n.qWidth+QM>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+QM>=t.qTop+t.qHeight,a=n.qLeft-QM<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var tC={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-QM<=t.qTop,i=n.qTop+n.qHeight+QM>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var nC={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const rC="pages";const iC="discretePan";function oC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:iC,pointers:1,threshold:10,enable(r,i){return this.started===iC||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{[`${iC}start`](e){e.preventDefault(),this.started=iC;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${iC}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${iC}end`](e){e.preventDefault(),this.started=!1},[`${iC}cancel`](e){e.preventDefault(),this.started=!1}}}}function aC({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function sC({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(ZM,n));return{width:e,height:Math.max(JM,Math.min(n*KM,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function lC(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(XM),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(XM),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(XM),n=null)},i}const uC={command:{update:()=>{}}};function cC({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=uC,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:u}=t,c=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=r(l);return o(i(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:sC({layoutService:r}),request:u({definitionPath:o}),process:lC(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=T(((e,{onProcessing:t,onData:n})=>{c(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==XM)throw e}))}),50);return function(e,{onProcessing:t=GM,onDataPage:n=GM}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var dC={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var mC={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function pC(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function hC(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function fC(e){return hC(e.qMatrix,(e=>e[0].qElemNumber))-1}var gC={inTotal:function({layoutService:e}){const t=pC(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=pC(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=pC(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=fC(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const vC=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function yC(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return vC(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:vC(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return vC(e,n);return hC(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var bC={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=yC(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:u}=n,c=yC(t).area(e(),l,a.qArea),d=fC(a),m=a.qArea.qHeight+d,p=u===o?(r.inView-m)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[p,r.inView>=r.inTotal?p+1:p+m/r.inView]}};function xC({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:u,maxDataRows:c}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:p}=r[n.meta.chart.mode],h="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:v}=s,y=h?t.width:t.height,b=y/l>=m;switch(f){case"max":return Math.min(l,c);case"custom":return Math.min(g,c);default:return u?y/p:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:u,fontSize:c,tiltAngle:d}=s.settings.settings.labels,{height:m}=l({fontFamily:u,fontSize:c,text:"M"});if(!t)return m>o;const p=(90-d)*(Math.PI/180);return m>Math.cos(p)*o}({chart:e,isHorizontal:h,axisKey:i,renderer:o,isGrouped:a,itemSize:m,label:v})?y/d:l:y/d}}function SC({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:u}){const{inTotal:c,area:d,scaleRange:m}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?dC:n?r?gC:bC:mC}({layoutService:r}),p=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,h=e=>e?p()/e:0,f=(e,t)=>-(e-t)*h(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=c({layoutService:r});return{inTotal:l,inView:xC({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return h(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,f(n,r))),o=r?Math.abs(r*i/p()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return f(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:p(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=m({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:p(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&u?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=f(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*h(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(h(r)*n)}}}}function EC({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,renderer:c,areaBuffer:d,viewState:m,rtl:p}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const h=SC({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,renderer:c,areaBuffer:d,rtl:p}),f=()=>{const e=h.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=h.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},v=e=>{const t=Date.now(),r=f(),a=g({pixelOffset:e,items:r}),s=h.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((h.validate.offset({pixelOffset:e,items:r})||m.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a.start,items:r})),m.preventSet("viewRange",h.getViewRange({pixelOffset:a.start.pixel,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item})));m.preventSet("viewRange",h.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",h.getScaleRange({offsets:a.start,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=f();n.set("itemSize",h.getItemSize({items:a}));const u=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?h.getUpperBound({items:e}):0;if("number"==typeof n)return h.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return h.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),c=g({pixelOffset:u,items:a});m.preventSet("viewRange",h.getViewRange({pixelOffset:c.start.pixel,items:a}));const d=h.getArea({itemOffset:c.start.item,items:a});return new Promise((e=>{i(d,{onDataPage:()=>{n.set("scaleRange",h.getScaleRange({offsets:c.start,items:a})),m.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;v(t)},scrollToRelative(e){const t=n.get("items"),r=h.convert.relativeToPixelOffset({relativeOffset:e,items:t});v(r)}}}function MC({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:m,renderer:p,areaBuffer:h,processDataPage:f=()=>{}}={}}){const g=O(),v=function({qMode:e}){switch(e){case"K":return tC;case"T":return nC;default:return eC}}({qMode:i.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(rC,[]),{add:t=>{const n=e.get(rC);n.length=0,n.push(t)},getCurrent:()=>e.get(rC)[0],getAll:()=>e.get(rC),contains:n=>t(e.get(rC)[0],n)}}({state:g,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:y,composition:v});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:h}),x=cC({dataStore:y,composition:v,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:c,processDataPage:f}),S=EC({chart:e,componentKey:n,state:g,dataStore:y,pageData:x,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:m,renderer:p,areaBuffer:b,viewState:l,rtl:u}),M=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:y}),C=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[oC({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:aC({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:S});return{interactions:C,query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>y.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var CC={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function OC({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:e,defaultValue:t})=>n&&Object.hasOwnProperty.call(n,e)?n[e]:t}function AC({layoutService:e,dockService:t,themeService:n,colorService:r,flags:i}){const{BAR:o,LINE:a,POINT:s}=lu,l=n.getStyles(),u=OC({layoutService:e,key:"bar"}),c=OC({layoutService:e,key:"line"}),d=()=>{const e=u({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},m=t=>i.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0,p=(e,t)=>{const n=r.getPaletteColor;var i;return null!=e&&e.color&&n&&null!==(i=n(e))&&void 0!==i?i:t};return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>u({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!d(),getStrokeWidth:()=>d(),getStrokeColor:()=>u({property:"strokeColor",defaultValue:{index:-1,color:o.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r;const i=null===(e=m("bar"))||void 0===e||null===(e=e.bar)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.value;return{fill:p(null==i?void 0:i.color,l.label.value.color),useContrastColor:null===(t=null==i?void 0:i.useContrastColor)||void 0===t||t,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:12,fontFamily:null!==(r=null==i?void 0:i.fontFamily)&&void 0!==r?r:l.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>c({property:"lineCurve",defaultValue:a.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>c({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?a.WIDTH.FULL.DEFAULT:a.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=c({property:"lineType",defaultValue:a.TYPE.SOLID});return e&&a.TYPE[e.toUpperCase()]}},point:{getSize:()=>c({property:"dataPointSize",defaultValue:s.SIZE.DEFAULT}),label:{getStyle:()=>{var e,t,n;const r=null===(e=m("line"))||void 0===e||null===(e=e.line)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.value;return{fill:p(null==r?void 0:r.color,l.label.value.color),fontSize:null!==(t=null==r?void 0:r.fontSize)&&void 0!==t?t:l.label.value.fontSize,fontFamily:null!==(n=null==r?void 0:r.fontFamily)&&void 0!==n?n:l.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{var e,t,n;const r=null===(e=m("marker"))||void 0===e||null===(e=e.marker)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.value;return{fill:p(null==r?void 0:r.color,l.label.value.color),fontSize:null!==(t=null==r?void 0:r.fontSize)&&void 0!==t?t:l.label.value.fontSize,fontFamily:null!==(n=null==r?void 0:r.fontFamily)&&void 0!==n?n:l.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n;const r=null===(e=m("axis"))||void 0===e||null===(e=e.axis)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==r?void 0:r.fontFamily)&&void 0!==t?t:l.axis.title.fontFamily,fontSize:null!==(n=null==r?void 0:r.fontSize)&&void 0!==n?n:l.axis.title.fontSize,color:p(null==r?void 0:r.color,l.axis.title.color)}}},label:{getStyle:()=>{var e,t,n;const r=null===(e=m("axis"))||void 0===e||null===(e=e.axis)||void 0===e||null===(e=e.label)||void 0===e?void 0:e.name;return{fill:p(null==r?void 0:r.color,l.axis.label.name.color),fontSize:null!==(t=null==r?void 0:r.fontSize)&&void 0!==t?t:l.axis.label.name.fontSize,fontFamily:null!==(n=null==r?void 0:r.fontFamily)&&void 0!==n?n:l.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n;const r=null===(e=m("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==r?void 0:r.fontFamily)&&void 0!==t?t:l.legend.title.fontFamily,fontSize:null!==(n=null==r?void 0:r.fontSize)&&void 0!==n?n:l.legend.title.fontSize,color:p(null==r?void 0:r.color,l.legend.title.color)}}},label:{getStyle:()=>{var e,t,n;const r=null===(e=m("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.label;return{fontFamily:null!==(t=null==r?void 0:r.fontFamily)&&void 0!==t?t:l.legend.label.fontFamily,fontSize:null!==(n=null==r?void 0:r.fontSize)&&void 0!==n?n:l.legend.label.fontSize,color:p(null==r?void 0:r.color,l.legend.label.color)}}}}}}}function TC({layoutService:e}){return k({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function NC({dataset:e,data:t,valueData:n}){var r;const{source:i,label:o,value:a}=n,s=e(i.key).field(i.field);return xe.shouldUseFormat(s.raw())?"-"===o||""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a):o}function wC({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,propertiesModel:l,custom:u}){const c=s.getStyles(),d=({data:e})=>e.major.value,m=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:p}=ps.COMPONENT,{PRIMARY:h,SECONDARY:f}=hs.AXIS,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=ps.COMPONENT,{PRIMARY:a,SECONDARY:s}=hs.AXIS,{orientation:l}=e.meta.chart,u="vertical"===l,c=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:m}=l,p=m===n.MAJOR?d.data.value:d.data.major.value;if(u){const t=e.findShapes("container").find((e=>(e.key===`${o}-max-${a}`||e.key===`${o}-max-${s}`)&&e.data&&e.data.value===p&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const h=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===`${i}-max`)&&e.data.major.value===p));if(u&&h)return{key:h.key,bounds:h.bounds};const f=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===`${i}-min`)&&e.data.major.value===p)),g=e.findShapes("*").filter((e=>c.indexOf(e.key)>-1&&e.data&&e.data.major.value===p));if(u&&f&&!g.find((e=>{var t,n;return(null===(t=e.data.end)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=f.data.end)||void 0===n||null===(n=n.source)||void 0===n?void 0:n.field)}))&&!g.find((e=>{var t,n;return(null===(t=e.data.segment)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=f.data.source)||void 0===n?void 0:n.field)})))return{key:f.key,bounds:f.bounds};const v=h||f;return!(u||!v||g.find((e=>{var t,n;return(null===(t=e.data.end)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=v.data.end)||void 0===n||null===(n=n.source)||void 0===n?void 0:n.field)}))||g.find((e=>{var t,n;return(null===(t=e.data.segment)||void 0===t||null===(t=t.source)||void 0===t?void 0:t.field)!==(null===(n=v.data.source)||void 0===n?void 0:n.field)})))&&{key:v.key,bounds:v.bounds}},"collectible"]}({dockService:i,seriesModel:o});return R({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:c.fontFamily},main:{key:ps.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...o.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...o.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...o.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[ps.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:m},placement:g},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${p}-max-${h}`,`${p}-max-${f}`,`${p}-min-${h}`,`${p}-min-${f}`,`${ps.COMPONENT.BAR_OOB}-max-${h}`,`${ps.COMPONENT.BAR_OOB}-max-${f}`,`${ps.COMPONENT.BAR_OOB}-min-${h}`,`${ps.COMPONENT.BAR_OOB}-min-${f}`,`${ps.COMPONENT.DATA_OOB_MARKER}-max`,`${ps.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:d,filter:m},placement:g},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:m},placement:g}],section:({h:e,nodes:t,dataset:n,create:r,util:i})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(r.text({value:a,style:{bold:!0}})),s&&c.push(r.text({value:s}));const d=u.hideBasic();d&&!l.length&&(a||s)||c.push(r.text({value:o.data.label,style:{bold:!0}})),d||(c.push(r.color({nodes:t,property:ps.SCALE.COLOR})),c.push(...t.map((e=>{const{segment:t,end:o}=e.data,a=t||o,{key:s,field:l}=a.source;return r.measure({label:i.dataset.title(s,l),value:NC({dataset:n,data:e.data,valueData:a})})})))),l&&c.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(r.raw({value:u.chart.createLimitationRow()}))):c.push(r.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:m}=o.data;return u.isEnabled()&&m&&c.push(...m.map((t=>r.raw({value:u.createImageRow({value:t,h:e})})))),c},layout:{grouping:!0,single:()=>!(!u.isEnabled()||!u.hasImages())||u.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>u.isEnabled()&&u.hasImages()?u.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{u.chart.isEnabled()&&!u.chart.hasLimitation()&&u.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:ps.COMPONENT.LEGEND_TOOLTIP,component:ps.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:kC}=gm,RC=({picasso:e,chart:t,environment:m,flags:p,viewState:h,viewCache:f,actions:g,selectionService:v})=>{var y;const b=s(),{width:x,height:S}=i(),[M,C]=n(),[O,A]=n(),T=a(),N=l(),w=u(),k=c(),R=d(),z=Vx({enable:!1===(null==M||null===(y=M.layoutService)||void 0===y||null===(y=y.meta)||void 0===y?void 0:y.isSnapshot)});r((()=>{if(!(b&&null!=t&&t.update&&m&&h&&v))return;const n=L({source:b,metaAdditionsFn:function({layout:e}){var t;const n=E(e,"qHyperCube.qMeasureInfo",[]),r=n.some((({series:e=hs.NOPE_SERIES})=>Nc(e)===hs.TYPE.LINE)),i=Ce.continuous(e,(()=>r&&ve.isTime(!0,e))),o=!xM(E(e,"version","")),a=n.filter((({series:e=hs.NOPE_SERIES})=>Nc(e)===hs.TYPE.BAR)),s=a.length,l=a.filter((({series:e=hs.NOPE_SERIES})=>e.axis!==hs.AXIS.SECONDARY)).length,u=a.filter((({series:e=hs.NOPE_SERIES})=>e.axis===hs.AXIS.SECONDARY)).length,c=o?l>1||u>1:s>1,d=("grouped"!==E(e,"barGrouping.grouping")||i)&&c,m=!d&&s>1,p=o&&d&&(l>0&&u>1||l>1&&u>0),h=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t||null===(t=t[0])||void 0===t||!t.qLocked);return{canBeContinuous:ve.canBeContinuous(e),isDiscrete:!i,isContinuous:i,isTime:ve.isTime(i,e),isSnapshot:Ce.snapshot(e),isBarSeriesStacked:d,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:p,isGrouped:m||p,isGroupedByMeasure:m||p,isDimensionLocked:h,groupSize:p?2:s,hasLineSeries:r}}}),{options:r,translator:i}=m,{direction:o}=r,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=CM({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:T,layoutService:n}),l=I({app:N,translator:i}),u=P({chart:t,layoutService:n,config:{logicalSize:{width:x,height:S},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),c=SM({layoutService:n}),d=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return MC({chart:e,actions:s,componentKey:vm(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:CC,options:{axisKey:ps.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:T,layoutService:n,dockService:u,seriesModel:c,viewState:h,rtl:"rtl"===m.options.direction,actions:g,picasso:e}):void 0,y=n.meta.isContinuous?kC({model:T,layoutService:n,viewState:h,viewCache:f}):void 0,M=q({theme:m.theme,config:{id:"comboChart",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),O=WM({actions:g,appLayoutModel:w,appModel:N,chart:t,environment:m,genericObjectModel:T,layoutService:n,picasso:e,seriesModel:c,viewState:h}),A=AC({layoutService:n,dockService:u,themeService:M,colorService:O,flags:p}),z=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`,o=n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:o}}({layoutService:n,seriesModel:c}),$=NM({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:c,continuousModel:y}),F=NM({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:c,continuousModel:y}),j=TC({layoutService:n}),B=VM({config:{measureAxesRef:"measureAxes.0",formatter:ps.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:$,dockService:u,seriesModel:c,themeService:M}),_=VM({config:{measureAxesRef:"measureAxes.1",formatter:ps.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:F,dockService:u,seriesModel:c,themeService:M}),V=HM({genericObjectModel:T,layoutService:n}),H=Ps({flags:p,layout:b,app:N,model:T,picasso:e,chart:t,translator:i,localeInfo:w.qLocaleInfo,embed:R,options:r}),U=wC({chart:t,actions:g,translator:i,rtl:a,dockService:u,seriesModel:c,colorService:O,themeService:M,propertiesModel:V,custom:H}),Y=Ya({layoutService:n,discreteModel:d}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:ps.SCALE.MAJOR,MAJOR_INNER:ps.SCALE.MAJOR_INNER,MINOR:{PRIMARY:ps.SCALE.MINOR.PRIMARY,SECONDARY:ps.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${ps.COMPONENT.BAR}-${hs.AXIS.PRIMARY}`,BAR_SECONDARY:`${ps.COMPONENT.BAR}-${hs.AXIS.SECONDARY}`,AXIS:{MAJOR:ps.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:ps.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:ps.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:ps.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:ps.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:ps.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:ps.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:ps.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:ps.COLLECTION.MAIN}}}}(n),X=D({picassoInstance:e,plugins:k,pluginArgs:W}),G=function({options:e,viewCache:t,layoutService:n}){const r={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||r.hasSlicedHats||r.isPartialUpdating||r.isSizeChanging||Da.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:r}}({options:r,viewCache:f,layoutService:n});C({alternativeService:l,selectionService:v,genericObjectModel:T,appModel:N,dockService:u,styleModel:A,layoutService:n,fieldModel:z,seriesModel:c,reducedModel:s,primaryExtremumModel:$,secondaryExtremumModel:F,primaryTickModel:B,secondaryTickModel:_,propertiesModel:V,colorService:O,themeService:M,appLayoutModel:w,tooltipService:U,disclaimerService:j,flags:p,...d&&{discreteModel:d},...y&&{continuousModel:y},refLineModel:Y,pluginService:X,animationsModel:G})}),[b,T,N,w,m,null==t?void 0:t.update,h,v]);const[,$]=o((()=>{if(!M)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:r,primaryExtremumModel:i,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:u,disclaimerService:c,styleModel:d}=M,p=s?()=>{var e;s.update(t.getLayout());const n=s.initialFetch(),r=!t.meta.isSnapshot&&(null==m||null===(e=m.options)||void 0===e||null===(e=e.viewState)||void 0===e?void 0:e.zoom);return r&&h.preventSet("zoom",r),n}:()=>Promise.resolve(),f=n.initialize().then((()=>{const e=n.getSettings().field;v&&v.setBrushAliases({colorField:e}),n.custom.updateLegend(d)}));return Promise.all([u.initialize(),r.command.initialize(),T?a.command.initialize():Promise.resolve(),f,p(),g.scroll.attachDiscreteModel(l)]).then((()=>Promise.all([i.command.initialize(),o.command.initialize()]).then((async()=>{await e.initialize({properties:a.query.getProperties()||{}}),c.initialize(),A({...M})}))))}),[M,z]);if($)throw $;return O};const LC={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"}}]};const IC={query:{getCanScroll:()=>!0}};function PC({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function qC({setSelectionInfo:e,event:t,components:n,clear:r}){const i=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===ps.COMPONENT.LEGEND_CATEGORICAL}),r()}function DC({chart:e,actions:t}){const i=b(),o=s(),[a,l]=n();return r((()=>{if(null==e||!e.update||!e.scale)return null;const n=e.scale(ps.SCALE.MAJOR),r=$({chart:e,actions:t,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:PC},selectionEvents:{start:qC}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}}),[i,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=a&&a.setLayout&&o&&a.setLayout(o)}),[o]),a}const zC={version:"1.33.1",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var $C=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let i;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)i=Nc(n[e].qDef.series),i===hs.TYPE.BAR?r[0]=1:i===hs.TYPE.LINE?r[1]=1:r[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(o)},FC=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===hs.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===hs.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function jC(e){var t,n;const r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&Nc(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===hs.TYPE.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function BC(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:$C(t),added(e,t){Ns.addCallbackCustomTooltip(t)},moved(e,t){Ns.moveCallbackCustomTooltip(t,e)},removed(e,t){Ns.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){Ns.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:FC(t),added({qDef:e},t){var n;jC(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:hs.TYPE.LINE,axis:hs.AXIS.SECONDARY}:e.series={type:hs.TYPE.BAR,axis:hs.AXIS.PRIMARY})},moved(e,t){jC(t)}}}}function _C(e){const t=BC(e);return{properties:zC,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=Q.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&de(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>Q.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const VC=({models:e,chart:t,viewState:n})=>{x((r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=e,{width:c,height:d}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:Oe(t,ps.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),u.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:Oe(t,ps.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])};const HC=e=>{const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=hs.NOPE_SERIES})=>Nc(e)===hs.TYPE.LINE));return Ce.continuous(e,(()=>t&&ve.isTime(!0,e)))},UC=(e,t,n)=>{let r;const i=n||0;var o,a;"function"==typeof(null==e?void 0:e.getMeasureLayouts)?r=e.getMeasureLayouts():r=null!==(o=null===(a=t.layout)||void 0===a||null===(a=a.qHyperCube)||void 0===a?void 0:a.qMeasureInfo)&&void 0!==o?o:[];return r.filter((e=>{const{series:t}=e||{};return 0===i?Xx(t,!0):!Xx(t,!0)}))},YC=(e,t)=>{const n=UC(e,t,0).filter((e=>e.series.type===hs.TYPE.BAR)),r=UC(e,t,1).filter((e=>e.series.type===hs.TYPE.BAR)),i="stacked"===E(t.layout,"barGrouping.grouping");return!Ce.continuous(t.layout)&&i&&(n.length>1||r.length>1)},WC=(e,t,n,r,i=void 0)=>{const o=`${t}.fontFamily`,a=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(a),defaultValue:()=>null!=i?i:n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function XC(e,t,n){const r=F({theme:t,translator:n,flags:e,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}});return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",show:(e,t)=>!HC(t.layout),items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...WC("bar.label.value","label.value",r,t,"12px"),contrastColor:{component:"checkbox",type:"boolean",ref:"bar.label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:WC("line.label.value","label.value",r,t)}}}:void 0}},markerSection:{translation:"Visualizations.Descriptions.Markers",component:"accordion",items:{labelValueSection:{translation:"properties.dataPoints.markerlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"marker",items:WC("marker.label.value","label.value",r,t)}}}}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:WC("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:WC("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:WC("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:WC("legend.label","legend.label",r,t)}}}:void 0}}}const GC={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",show:(e,t)=>!HC(t.layout),items:{barWidth:{component:"items",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function KC(e){var t;return!(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t||!t.on)}function JC(e){var t,n;return KC(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(n=n.color)||void 0===n?void 0:n.mode)&&void 0!==t?t:"primary")}function ZC(e){var t;return KC(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.mode)}function QC(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function eO(e){return ZC(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function tO(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...QC(n),...eO(e)]:eO(e)}(t,n,e)))}function nO(e){var t;const n={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||HC(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},r={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return Nc(null===(t=e.qDef)||void 0===t?void 0:t.series)===hs.TYPE.MARKER}},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return Nc(null===(t=e.qDef)||void 0===t?void 0:t.series)===hs.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)}},o={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>KC(...e)},a=null===(t=e.anything)||void 0===t||null===(t=t.sense)||void 0===t?void 0:t.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:n,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:r,seriesMarkerFill:i}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:o,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=a.getDataColorSpecials(),n=null===(e=a.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:JC},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:ZC}}}}}}}}}}}}const rO=10,iO=!0;function oO(e){return e.qHyperCube.qMeasureInfo.filter((e=>Nc(e.series)===hs.TYPE.LINE)).length>0}function aO(e,t){const n=e.qHyperCube.qMeasureInfo.filter((e=>Nc(e.series)===hs.TYPE.BAR));return n.filter((e=>e.series.axis!==hs.AXIS.SECONDARY)).length>t||n.filter((e=>e.series.axis===hs.AXIS.SECONDARY)).length>t}function sO(e){return e.qHyperCube.qMeasureInfo.filter((e=>Nc(e.series)===hs.TYPE.MARKER)).length>0}const lO=(e,t,n,r)=>{const i="vertical"===e.layout.orientation||HC(e.layout)?"y":"x",o=UC(e,t,r).map((e=>e.qFallbackTitle));let a;return a=o.length?n.get(`properties.${i}AxisWithInfo`,[o.join(",")]):n.get(`properties.${i}Axis`),a};function uO(e){var t,n,r;const{translator:i,flags:o,anything:a}=e,s=null==e||null===(t=e.anything)||void 0===t||null===(t=t.sense)||void 0===t?void 0:t.theme,l=null==e||null===(n=e.anything)||void 0===n||null===(n=n.sense)||void 0===n||null===(r=n.isUnsupportedFeature)||void 0===r?void 0:r.call(n,"continuousData"),u={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>tO(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>KC(e)))}}},c=e=>e.qHyperCubeDef.qMeasures.some((e=>KC(e))),d=(e,t)=>0!==e.filter((e=>e.series.axis===t)).length,m={items:{disclaimer:{show:(e,t)=>c(e),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!c(e)}}},p={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&aO(n.layout,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t,n)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&oO(n.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,i){i.dataPoint.showLineLabels=e,i.dataPoint.show=e}},reset(e){M(e,"dataPoint.show",!1),M(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",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)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t,n)=>i.get(UC(t,n,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&UC(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,i){i.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&UC(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,i){i.measureAxes[1].show=e?"labels":"all"}}}}}}},h={uses:"settings",items:{simpleStyling:GC,simpleLabels:p,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:XC(o,s,i),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>aO(n.layout,1)&&!HC(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>HC(n.layout),convertFunctions:(f="vertical",{get:(e,t,n)=>HC(n.layout)?f:e(t.type),set(e,t,n,r){t(n.type,HC(r.layout)?f:e,f)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!HC(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t,n)=>oO(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>oO(e)},show:(e,t,n)=>oO(n.layout),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},barLabels:{type:"items",snapshot:{tid:"property-barLabels",show:e=>aO(e,0)},show:(e,t,n)=>aO(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>aO(n.layout,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},showSegmentLabels:{ref:"dataPoint.showBarSegmentLabels",type:"boolean",translation:"properties.dataPoints.segmentLabelMode",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&YC(t,n)},showTotalLabels:{ref:"dataPoint.showBarTotalLabels",type:"boolean",translation:"properties.dataPoints.totalLabelMode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],show:(e,t,n)=>e.dataPoint.showBarLabels&&YC(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>sO(e)},show:(e,t,n)=>sO(n.layout),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridLineAxis:{ref:"gridLine.axis",type:"integer",component:"dropdown",defaultValue:0,options(e,t,n){const r=[],i=n.layout.qHyperCube.qMeasureInfo,o=d(i,0),a=d(i,1);return o&&r.push({translation:"properties.axis.primary",value:0}),a&&r.push({translation:"properties.axis.secondary",value:1}),r},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,r){var i;const o=null!==(i=r.gridLine.axis)&&void 0!==i?i:0,a=n.layout.qHyperCube.qMeasureInfo,s=d(a,0),l=d(a,1);return 0===o&&!s&&l?(M(r,"gridLine.axis",1),1):1===o&&s&&!l?(M(r,"gridLine.axis",0),0):o}}},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridLine&&!e.gridLine.auto}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:u,simpleColors:m,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||HC(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let o;return o=r?i.get(`properties.${n}AxisWithInfo`,[r]):i.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||HC(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!HC(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:rO,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=rO:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!l}},measureAxis:{uses:"axis.measureAxis",label:(e,t,n)=>lO(t,n,i,0),show:(e,t,n)=>UC(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>lO(t,n,i,0),show:(e,t,n)=>UC(t,n,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&Xx(null==e?void 0:e.series,iO)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&UC(t,n,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||HC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&UC(t,n,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t,n)=>UC(t,n,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.0.autoMinMax",!1),M(i,"measureAxes.0.minMax","min"),M(i,"measureAxes.0.min",0)):M(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t,n)=>lO(t,n,i,1),show:(e,t,n)=>UC(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>lO(t,n,i,1),show:(e,t,n)=>UC(t,n,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!Xx(null==e?void 0:e.series,iO)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&UC(t,n,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||HC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&UC(t,n,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t,n)=>UC(t,n,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.1.autoMinMax",!1),M(i,"measureAxes.1.minMax","min"),M(i,"measureAxes.1.min",0)):M(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var f;o.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(h.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});const g={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,i;if(null!=a&&null!==(r=a.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"includeZeroValues"))return!1;return!HC(n.layout)}}}},measures:nO(e)}};return{type:"items",component:"accordion",items:{data:g,sorting:{uses:"sortingWithDisclaimer"},addons:(()=>{const e={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>Xx(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,iO)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!Xx(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,iO)},dimRefLines:{uses:"dimReflines"},plugins:null!=o&&o.isEnabled("CLIENT_TLV_694_PLUGINS_UI")&&null!=o&&o.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?ms({flags:o,translator:i,pluginOptions:[{value:"point",translation:i.get("Visualizations.Descriptions.Point")},{value:"line",translation:i.get("Visualizations.Descriptions.Line")}]}):void 0}};return e})(),settings:h}}}function cO(e){return e.qHyperCubeDef.qMeasures.filter((e=>Nc(e.qDef.series)===hs.TYPE.LINE)).length>0}function dO(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>cO(e)||!HC(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>Nc(e.qDef.series)===hs.TYPE.BAR));return t?n.filter((e=>e.qDef.series.axis===hs.AXIS.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===hs.AXIS.SECONDARY)).length>1:n.length>1}(e,!xM(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!HC(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!HC(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>cO(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>cO(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>KC(e)))}}}}}}const mO={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function pO(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=mO[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function hO(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});pO(r,o,t,n,"bar"),pO(r,o,t,n,"line"),pO(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function fO(e){const t={},{tooltip:n}=e;if(n){var r;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(r=r.object)||void 0===r?void 0:r.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const gO=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function vO(e){return{definition:uO(e),softDefinition:dO(),support:{snapshot:gO,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:hO,extendMetrics:fO,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=Q.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:BC(e),defaultPropertyValues:a,hypercubePath:i,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&de(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),tO(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return Q.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:(function(e){var t;e.qHyperCubeDef.qDimensions.forEach(qt),null!==(t=e.qHyperCubeDef.qLayoutExclude)&&void 0!==t&&null!==(t=t.qHyperCubeDef)&&void 0!==t&&t.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(qt)}(e),function(e){return xM(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=hs.NOPE_SERIES),void 0===t.series.type&&(t.series.type=hs.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===hs.TYPE.BAR?hs.AXIS.PRIMARY:hs.AXIS.SECONDARY),t.series.type===hs.TYPE.BAR&&t.series.axis===hs.AXIS.SECONDARY&&(t.series.axis=hs.AXIS.PRIMARY)})),e.version=bM.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}}));