@nebula.js/sn-combo-chart 1.33.5 → 1.33.7

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,7 +1,7 @@
1
1
  /*
2
- * @nebula.js/sn-combo-chart v1.33.5
2
+ * @nebula.js/sn-combo-chart v1.33.7
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","qlik-chart-modules/react","qlik-object-conversion"],(function(e){"use strict";var t,n,i,r,o,a,s,l,u,c,d,m,h,p,f,g,v,y,S,M,x,b,E,C,A,N,O,T,L,I,R,w,k,q,D,P,z,$,_,F,B,j,V,H,U,Y;return{setters:[function(e){t=e.useElement,n=e.useState,i=e.useEffect,r=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,h=e.useTranslator,p=e.useTheme,f=e.useDeviceType,g=e.useConstraints,v=e.useLayout,y=e.useAction,S=e.useSelections,M=e.onTakeSnapshot,x=e.useImperativeHandle},function(e){b=e.getValue,E=e.setValue,C=e.createColor,A=e.cache,N=e.debouncer,O=e.throttler,T=e.pointLabelComponent,L=e.colorService,I=e.disclaimerService,R=e.tooltipService,w=e.layoutService,k=e.alternativeService,q=e.dockService,D=e.themeService,P=e.pluginService,z=e.storage,$=e.selectionService,_=e.fontResolver},function(e){F=e.default},function(e){B=e.default},function(e){j=e.default},function(e){V=e.reactRenderer,H=e.axisTitleComponent,U=e.disclaimerComponent},function(e){Y=e.default}],execute:function(){e("default",(function(e){var r;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(W).forEach((t=>{e.add(W[t])}))}}(e.translator);const{flags:a}=e,s=null===(r=e.anything)||void 0===r||null===(r=r.sense)||void 0===r?void 0:r.isUnsupportedFeature,l=Qm();return{qae:iv(e),ext:wv(e),component(){const e=function(){const[e,t]=n();return i((()=>t(A())),[]),e}(),r=function(){const[e,t]=n();return i((()=>{t(z({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),u=function(){const e=m(),t=h(),r=d(),o=p(),[a,s]=n(),l=f();return i((()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:r,deviceType:l})}),[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),c=function(){const e=g(),[t,r]=n(!1),[o,a]=n(!1),[s,l]=n(!1),u=function(){const e=g(),[t,r]=n(!1),[o,a]=n({}),[s,l]=n();return i((()=>()=>{a({})}),[]),i((()=>{e&&r(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const i=null===(n=o[e])||void 0===n?void 0:n.indexOf(t);i>-1&&o[e].splice(i,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(),[r,o]=n(!1),[a,s]=n(!1),l=v(),u=h(),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);i((()=>{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:Wg,hidden:!r||!c||d,active:a,action:m})),[c,d,a,r,u.language()]),{action:m,enabled:()=>r,active:()=>a}}();let d=Xg;i((()=>{e&&(r(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=n({});return m.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||Xg}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=c,m.select=u,m}(),S=function({picasso:e,environment:r}){const o=t(),[a,s]=n();return i((()=>{if(!r)return;o.style.overflow="hidden";const t=e({renderer:{prio:[r.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[r]),a}({picasso:l,environment:u}),M=Jg({chart:S,actions:c}),x=Yg({picasso:l,chart:S,environment:u,flags:a,viewState:r,viewCache:e,actions:c,selectionService:M});!function({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:u,onZoomChange:c}}=Qd,[,d]=o((async()=>{if(!(null!=t&&t.update&&n&&i&&a&&s))return;const{layoutService:o,colorService:d,continuousModel:m,discreteModel:h,refLineModel:p,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:v}=f.meta,{options:y}=i,{viewState:S={}}=y,{legendScrollOffset:M,scrollOffset:x}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):S;a.preventSet("scrollOffset",x),a.preventSet("legendScrollOffset",M),a.preventSet("title",o.getLayoutValue("title"));const b=()=>{p&&p.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...bm,...v]}),g.meta.isPartialUpdating=!1};function E(o=!1){const u=Mm({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:a,viewCache:s,actions:l}),c=o&&[Em({models:n}),...Cm({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",b),o.meta.isContinuous&&(a.onChanged("zoom",c({layoutService:o,continuousDataModel:m},b)),a.intercept("zoom",u({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),E(!0),o.setDataPages(C),o.meta.isContinuous||await h.command.initialize(),E(!1),Ma.cacheProperties({viewCache:s,layout:o.getLayout()})}),[null==t?void 0:t.update,n,i]);if(d)throw d}({picasso:l,chart:S,models:x,environment:u,flags:a,viewState:r,viewCache:e,actions:c}),xm({picasso:l,chart:S,models:x,environment:u,flags:a,viewState:r,viewCache:e,actions:c,isUnsupportedFeature:s}),rv({models:x,chart:S,viewState:r})}}}));var W={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 X(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K=Object.prototype.hasOwnProperty,G=Object.prototype.toString,J=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,Q=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===G.call(e)},ee=function(e){if(!e||"[object Object]"!==G.call(e))return!1;var t,n=K.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&K.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||K.call(e,t)},te=function(e,t){J&&"__proto__"===t.name?J(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ne=function(e,t){if("__proto__"===t){if(!K.call(e,t))return;if(Z)return Z(e,t).value}return e[t]},ie=function e(){var t,n,i,r,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)i=ne(s,n),s!==(r=ne(t,n))&&(c&&r&&(ee(r)||(o=Q(r)))?(o?(o=!1,a=i&&Q(i)?i:[]):a=i&&ee(i)?i:{},te(s,{name:n,newValue:e(c,a,r)})):void 0!==r&&te(s,{name:n,newValue:r}));return s},re=X(ie);const oe=[["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}]],ae={};oe.forEach((([e,{width:t,height:n}])=>{ae[e]={width:t,height:n}}));const se={getLayoutModes:()=>ae,getLayoutMode(e,t){let n;for(n=0;n<oe.length;++n)if(e>=oe[n][1].width&&t>=oe[n][1].height)return oe[n][0];return"SPARK"}};const le=["$date","$timestamp","$time"],ue=["D","TS","T"],ce={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>le.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&ue.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(ce.hasTimeTag(t)&&ce.hasUnknownFormat(t)||ce.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&ce.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 i=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==i?void 0:i.length)&&void 0!==n?n:0)<1)&&ce.canBeContinuousDimension(i[0])},maxNumberOfLines:12},de=/^[A-Z][A-z0-9_]*$/i,me={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,"")}},he={setValue:(e,t,n)=>{if(!t)return!1;const i=t.split("."),r=i[i.length-1];let o,a=e;for(o=0;o<i.length-1;++o)void 0===a[i[o]]&&(a[i[o]]=Number.isNaN(+i[o+1])?{}:[]),a=a[i[o]];if(void 0!==n){const e=a[r];return a[r]=n,{updated:n,previous:e}}return delete a[r],!1},getValue:(e,t,n)=>{const i=t.split(".");let r,o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}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||de.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},generateId:()=>me.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},pe=e=>he.getValue(e,"qHyperCube.qDimensionInfo",[]),fe=e=>he.getValue(e,"qHyperCube.qMeasureInfo",[]),ge=e=>he.getValue(e,"barGrouping.grouping"),ve={continuous:(e,t=!1)=>!!ce.canBeContinuous(e)&&(he.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!pe(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ge(e)&&(pe(e).length>1||fe(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&pe(e).length>1&&1===fe(e).length},groupedByMeasure(e){return this.grouped(e)&&1===pe(e).length&&fe(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ge(e)&&"butterfly"!==ge(e)||this.continuous(e))&&(pe(e).length>1||fe(e).length>1)},stackedByDimension(e){return this.stacked(e)&&pe(e).length>1&&1===fe(e).length},stackedByMeasure(e){return this.stacked(e)&&1===pe(e).length&&fe(e).length>1},simple:e=>0===pe(e).length||1===pe(e).length&&1===fe(e).length,snapshot:e=>!!he.getValue(e,"snapshotData")};function ye(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Se=e=>{throw e.isHandled=!0,e};const Me={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?Me.getVerticalDock(t):n?Me.getOppositeDock(Me.getHorizontalDock(t)):Me.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},xe=166/26,be=12/11,Ee={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*xe)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),i=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,i=i?i.length:0;const r=t+n+i;return{latin:e.length-r,cjk:r}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const i={latin:0,cjk:0};let r;void 0===t?e.forEach((e=>{r=Ee.getCharacterRatios(e[n]),i.latin+=r.latin,i.cjk+=r.cjk})):e.forEach((e=>{r=Ee.getCharacterRatios(e[t][n]),i.latin+=r.latin,i.cjk+=r.cjk}));const o=Math.max(1,i.latin+i.cjk);return i.latinRatio=i.latin/o,i.cjkRatio=i.cjk/o,i},getAdjustedMaxGlyphCount(e,t,n,i="qText"){const r=Ee.getTotalCharacterRatios(t,n,i),o=r.latinRatio*e,a=r.cjkRatio*e;return Math.ceil(Ee.stringWidthOverMWidth(o)+a*be)}},Ce=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ae=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ne=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Oe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Ce.test(e),isRtlChar:e=>Ae.test(e)||Ne.test(e),detectTextDirection(e){const t=e?e.length:0;let n,i;for(n=0;n<t;n++){if(i=e[n],Oe.isLtrChar(i))return"ltr";if(Oe.isRtlChar(i))return"rtl"}return"ltr"}},Te={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 i=t.data,r=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&i.fillTooltip){const e=r("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(i.fillTooltip.value):i.fillTooltip.label?i.fillTooltip.label:i.fillTooltip.value,!n.coloring.label){const e=o(i.fillTooltip.source.key).field(i.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===i._fillColor?Te.getNodeFillColor(t):i._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=Oe.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=Oe.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 i=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:i,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Oe.detectTextDirection(i)},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 i=Oe.detectTextDirection(t.color.label),r=n?[":",t.color.label]:[t.color.label,":"],o=Oe.detectTextDirection(t.color.value);return[{content:r,style:{"text-align":n?"right":"left",direction:i}},{content:n?[t.color.value,Te.getColorSymbol(e,t)]:[Te.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,i,r=!1){const o=Oe.detectTextDirection(e.label),a=i?[":",e.label]:[e.label,":"],s=Oe.detectTextDirection(e.value);let l;return l=r?i?[e.value,Te.getColorSymbol(t,n)]:[Te.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":i?"right":"left",direction:o}},{content:l,style:{"text-align":i?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Le(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ie(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Re(){}var we=.7,ke=1/we,qe="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ze=/^#([0-9a-f]{3,8})$/,$e=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),_e=new RegExp(`^rgb\\(${Pe},${Pe},${Pe}\\)$`),Fe=new RegExp(`^rgba\\(${qe},${qe},${qe},${De}\\)$`),Be=new RegExp(`^rgba\\(${Pe},${Pe},${Pe},${De}\\)$`),je=new RegExp(`^hsl\\(${De},${Pe},${Pe}\\)$`),Ve=new RegExp(`^hsla\\(${De},${Pe},${Pe},${De}\\)$`),He={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 Ue(){return this.rgb().formatHex()}function Ye(){return this.rgb().formatRgb()}function We(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ze.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xe(t):3===n?new Ze(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ke(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=$e.exec(e))?new Ze(t[1],t[2],t[3],1):(t=_e.exec(e))?new Ze(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Fe.exec(e))?Ke(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=je.exec(e))?rt(t[1],t[2]/100,t[3]/100,1):(t=Ve.exec(e))?rt(t[1],t[2]/100,t[3]/100,t[4]):He.hasOwnProperty(e)?Xe(He[e]):"transparent"===e?new Ze(NaN,NaN,NaN,0):null}function Xe(e){return new Ze(e>>16&255,e>>8&255,255&e,1)}function Ke(e,t,n,i){return i<=0&&(e=t=n=NaN),new Ze(e,t,n,i)}function Ge(e){return e instanceof Re||(e=We(e)),e?new Ze((e=e.rgb()).r,e.g,e.b,e.opacity):new Ze}function Je(e,t,n,i){return 1===arguments.length?Ge(e):new Ze(e,t,n,null==i?1:i)}function Ze(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Qe(){return`#${it(this.r)}${it(this.g)}${it(this.b)}`}function et(){const e=tt(this.opacity);return`${1===e?"rgb(":"rgba("}${nt(this.r)}, ${nt(this.g)}, ${nt(this.b)}${1===e?")":`, ${e})`}`}function tt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function it(e){return((e=nt(e))<16?"0":"")+e.toString(16)}function rt(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,n,i)}function ot(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Re||(e=We(e)),!e)return new at;if(e instanceof at)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=t===o?(n-i)/s+6*(n<i):n===o?(i-t)/s+2:(t-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new at(a,s,l,e.opacity)}function at(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function st(e){return(e=(e||0)%360)<0?e+360:e}function lt(e){return Math.max(0,Math.min(1,e||0))}function ut(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Le(Re,We,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ue,formatHex:Ue,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ot(this).formatHsl()},formatRgb:Ye,toString:Ye}),Le(Ze,Je,Ie(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?we:Math.pow(we,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ze(nt(this.r),nt(this.g),nt(this.b),tt(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:Qe,formatHex:Qe,formatHex8:function(){return`#${it(this.r)}${it(this.g)}${it(this.b)}${it(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:et,toString:et})),Le(at,(function(e,t,n,i){return 1===arguments.length?ot(e):new at(e,t,n,null==i?1:i)}),Ie(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new at(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?we:Math.pow(we,e),new at(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new Ze(ut(e>=240?e-240:e+120,r,i),ut(e,r,i),ut(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new at(st(this.h),lt(this.s),lt(this.l),tt(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=tt(this.opacity);return`${1===e?"hsl(":"hsla("}${st(this.h)}, ${100*lt(this.s)}%, ${100*lt(this.l)}%${1===e?")":`, ${e})`}`}}));const ct=Math.PI/180,dt=180/Math.PI,mt=.96422,ht=.82521,pt=4/29,ft=6/29,gt=3*ft*ft,vt=ft*ft*ft;function yt(e){if(e instanceof St)return new St(e.l,e.a,e.b,e.opacity);if(e instanceof At)return Nt(e);e instanceof Ze||(e=Ge(e));var t,n,i=Et(e.r),r=Et(e.g),o=Et(e.b),a=Mt((.2225045*i+.7168786*r+.0606169*o)/1);return i===r&&r===o?t=n=a:(t=Mt((.4360747*i+.3850649*r+.1430804*o)/mt),n=Mt((.0139322*i+.0971045*r+.7141733*o)/ht)),new St(116*a-16,500*(t-a),200*(a-n),e.opacity)}function St(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function Mt(e){return e>vt?Math.pow(e,1/3):e/gt+pt}function xt(e){return e>ft?e*e*e:gt*(e-pt)}function bt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Et(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ct(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof At)return new At(e.h,e.c,e.l,e.opacity);if(e instanceof St||(e=yt(e)),0===e.a&&0===e.b)return new At(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*dt;return new At(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new At(e,t,n,null==i?1:i)}function At(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function Nt(e){if(isNaN(e.h))return new St(e.l,0,0,e.opacity);var t=e.h*ct;return new St(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Le(St,(function(e,t,n,i){return 1===arguments.length?yt(e):new St(e,t,n,null==i?1:i)}),Ie(Re,{brighter(e){return new St(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new St(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 Ze(bt(3.1338561*(t=mt*xt(t))-1.6168667*(e=1*xt(e))-.4906146*(n=ht*xt(n))),bt(-.9787684*t+1.9161415*e+.033454*n),bt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Le(At,Ct,Ie(Re,{brighter(e){return new At(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new At(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Nt(this).rgb()}}));var Ot={isDark:function(e){return Ct(e).l<70}};function Tt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function It(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Lt(t(e),n)}),{left:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)>0?r=o:i=o+1}return i}}}var Rt=It(Lt).right,wt=Math.sqrt(50),kt=Math.sqrt(10),qt=Math.sqrt(2);function Dt(e,t,n){var i=(t-e)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=wt?10:o>=kt?5:o>=qt?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=wt?10:o>=kt?5:o>=qt?2:1)}function Pt(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=wt?r*=10:o>=kt?r*=5:o>=qt&&(r*=2),t<e?-r:r}function zt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var $t="$";function _t(){}function Ft(e,t){var n=new _t;if(e instanceof _t)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var i,r=-1,o=e.length;if(null==t)for(;++r<o;)n.set(r,e[r]);else for(;++r<o;)n.set(t(i=e[r],r,e),i)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Bt(){}_t.prototype=Ft.prototype={constructor:_t,has:function(e){return $t+e in this},get:function(e){return this[$t+e]},set:function(e,t){return this[$t+e]=t,this},remove:function(e){var t=$t+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===$t&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===$t&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===$t&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===$t&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===$t&&++e;return e},empty:function(){for(var e in this)if(e[0]===$t)return!1;return!0},each:function(e){for(var t in this)t[0]===$t&&e(this[t],t.slice(1),this)}};var jt=Ft.prototype;Bt.prototype={constructor:Bt,has:jt.has,add:function(e){return this[$t+(e+="")]=e,this},remove:jt.remove,clear:jt.clear,values:jt.keys,size:jt.size,empty:jt.empty,each:jt.each};var Vt=Array.prototype,Ht=Vt.map,Ut=Vt.slice;function Yt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wt(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Xt(){}var Kt=.7,Gt=1/Kt,Jt="\\s*([+-]?\\d+)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",en=/^#([0-9a-f]{3,8})$/,tn=new RegExp("^rgb\\("+[Jt,Jt,Jt]+"\\)$"),nn=new RegExp("^rgb\\("+[Qt,Qt,Qt]+"\\)$"),rn=new RegExp("^rgba\\("+[Jt,Jt,Jt,Zt]+"\\)$"),on=new RegExp("^rgba\\("+[Qt,Qt,Qt,Zt]+"\\)$"),an=new RegExp("^hsl\\("+[Zt,Qt,Qt]+"\\)$"),sn=new RegExp("^hsla\\("+[Zt,Qt,Qt,Zt]+"\\)$"),ln={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 un(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function dn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=en.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?mn(t):3===n?new fn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?hn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?hn(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=tn.exec(e))?new fn(t[1],t[2],t[3],1):(t=nn.exec(e))?new fn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=rn.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=on.exec(e))?hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=an.exec(e))?Sn(t[1],t[2]/100,t[3]/100,1):(t=sn.exec(e))?Sn(t[1],t[2]/100,t[3]/100,t[4]):ln.hasOwnProperty(e)?mn(ln[e]):"transparent"===e?new fn(NaN,NaN,NaN,0):null}function mn(e){return new fn(e>>16&255,e>>8&255,255&e,1)}function hn(e,t,n,i){return i<=0&&(e=t=n=NaN),new fn(e,t,n,i)}function pn(e,t,n,i){return 1===arguments.length?((r=e)instanceof Xt||(r=dn(r)),r?new fn((r=r.rgb()).r,r.g,r.b,r.opacity):new fn):new fn(e,t,n,null==i?1:i);var r}function fn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function gn(){return"#"+yn(this.r)+yn(this.g)+yn(this.b)}function vn(){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 yn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Sn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xn(e,t,n,i)}function Mn(e){if(e instanceof xn)return new xn(e.h,e.s,e.l,e.opacity);if(e instanceof Xt||(e=dn(e)),!e)return new xn;if(e instanceof xn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=t===o?(n-i)/s+6*(n<i):n===o?(i-t)/s+2:(t-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new xn(a,s,l,e.opacity)}function xn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function bn(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 En(e){return function(){return e}}function Cn(e){return 1==(e=+e)?An: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(i){return Math.pow(e+i*t,n)}}(t,n,e):En(isNaN(t)?n:t)}}function An(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):En(isNaN(e)?t:e)}Yt(Xt,dn,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:un,formatHex:un,formatHsl:function(){return Mn(this).formatHsl()},formatRgb:cn,toString:cn}),Yt(fn,pn,Wt(Xt,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Kt:Math.pow(Kt,e),new fn(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:gn,formatHex:gn,formatRgb:vn,toString:vn})),Yt(xn,(function(e,t,n,i){return 1===arguments.length?Mn(e):new xn(e,t,n,null==i?1:i)}),Wt(Xt,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new xn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Kt:Math.pow(Kt,e),new xn(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new fn(bn(e>=240?e-240:e+120,r,i),bn(e,r,i),bn(e<120?e+240:e-120,r,i),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 Nn=function e(t){var n=Cn(t);function i(e,t){var i=n((e=pn(e)).r,(t=pn(t)).r),r=n(e.g,t.g),o=n(e.b,t.b),a=An(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=o(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function On(e,t){t||(t=[]);var n,i=e?Math.min(t.length,e.length):0,r=t.slice();return function(o){for(n=0;n<i;++n)r[n]=e[n]*(1-o)+t[n]*o;return r}}function Tn(e,t){var n,i=t?t.length:0,r=e?Math.min(i,e.length):0,o=new Array(r),a=new Array(i);for(n=0;n<r;++n)o[n]=Dn(e[n],t[n]);for(;n<i;++n)a[n]=t[n];return function(e){for(n=0;n<r;++n)a[n]=o[n](e);return a}}function Ln(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function In(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Rn(e,t){var n,i={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=Dn(e[n],t[n]):r[n]=t[n];return function(e){for(n in i)r[n]=i[n](e);return r}}var wn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kn=new RegExp(wn.source,"g");function qn(e,t){var n,i,r,o=wn.lastIndex=kn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=wn.exec(e))&&(i=kn.exec(t));)(r=i.index)>o&&(r=t.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:In(n,i)})),o=kn.lastIndex;return o<t.length&&(r=t.slice(o),s[a]?s[a]+=r:s[++a]=r),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,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function Dn(e,t){var n,i,r=typeof t;return null==t||"boolean"===r?En(t):("number"===r?In:"string"===r?(n=dn(t))?(t=n,Nn):qn:t instanceof dn?Nn:t instanceof Date?Ln:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?Tn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Rn:In:On))(e,t)}function Pn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function zn(e){return+e}var $n=[0,1];function _n(e){return e}function Fn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function Bn(e){var t,n=e[0],i=e[e.length-1];return n>i&&(t=n,n=i,i=t),function(e){return Math.max(n,Math.min(i,e))}}function jn(e,t,n){var i=e[0],r=e[1],o=t[0],a=t[1];return r<i?(i=Fn(r,i),o=n(a,o)):(i=Fn(i,r),o=n(o,a)),function(e){return o(i(e))}}function Vn(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),o=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)r[a]=Fn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Rt(e,t,1,i)-1;return o[n](r[n](t))}}function Hn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Un(e,t){return function(){var e,t,n,i,r,o,a=$n,s=$n,l=Dn,u=_n;function c(){return i=Math.min(a.length,s.length)>2?Vn:jn,r=o=null,d}function d(t){return isNaN(t=+t)?n:(r||(r=i(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=i(s,a.map(e),In)))(n)))},d.domain=function(e){return arguments.length?(a=Ht.call(e,zn),u===_n||(u=Bn(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Ut.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Ut.call(e),l=Pn,c()},d.clamp=function(e){return arguments.length?(u=e?Bn(a):_n,d):u!==_n},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,i){return e=n,t=i,c()}}()(e,t)}function Yn(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Wn(e){return(e=Yn(Math.abs(e)))?e[1]:NaN}var Xn,Kn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gn(e){if(!(t=Kn.exec(e)))throw new Error("invalid format: "+e);var t;return new Jn({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 Jn(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 Zn(e,t){var n=Yn(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Gn.prototype=Jn.prototype,Jn.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 Qn={"%":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 Zn(100*e,t)},r:Zn,s:function(e,t){var n=Yn(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(Xn=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Yn(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 ei(e){return e}var ti,ni,ii,ri=Array.prototype.map,oi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ai(e){var t=void 0===e.grouping||void 0===e.thousands?ei:function(e,t){return function(n,i){for(var r=n.length,o=[],a=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(n.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(ri.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",r=e.decimal+"",o=void 0===e.numerals?ei:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(ri.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=Gn(e)).fill,c=e.align,d=e.sign,m=e.symbol,h=e.zero,p=e.width,f=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(f=!0,y="g"):Qn[y]||(void 0===g&&(g=12),v=!0,y="g"),(h||"0"===u&&"="===c)&&(h=!0,u="0",c="=");var S="$"===m?n:"#"===m&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",M="$"===m?i:/[%p]/.test(y)?a:"",x=Qn[y],b=/[defgprs%]/.test(y);function E(e){var n,i,a,m=S,E=M;if("c"===y)E=x(e)+E,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,i=1,r=-1;i<n;++i)switch(e[i]){case".":r=t=i;break;case"0":0===r&&(r=i),t=i;break;default:if(!+e[i])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),m=(C?"("===d?d:s:"-"===d||"("===d?"":d)+m,E=("s"===y?oi[8+Xn/3]:"")+E+(C&&"("===d?")":""),b)for(n=-1,i=e.length;++n<i;)if(48>(a=e.charCodeAt(n))||a>57){E=(46===a?r+e.slice(n+1):e.slice(n))+E,e=e.slice(0,n);break}}f&&!h&&(e=t(e,1/0));var A=m.length+e.length+E.length,N=A<p?new Array(p-A+1).join(u):"";switch(f&&h&&(e=t(N+e,N.length?p-E.length:1/0),N=""),c){case"<":e=m+e+E+N;break;case"=":e=m+N+e+E;break;case"^":e=N.slice(0,A=N.length>>1)+m+e+E+N.slice(A);break;default:e=N+m+e+E}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)),E.toString=function(){return e+""},E}return{format:u,formatPrefix:function(e,t){var n=u(((e=Gn(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(Wn(t)/3))),r=Math.pow(10,-i),o=oi[8+i/3];return function(e){return n(r*e)+o}}}}function si(e,t,n,i){var r,o=Pt(e,t,n);switch((i=Gn(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(r=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Wn(t)/3)))-Wn(Math.abs(e)))}(o,a))||(i.precision=r),ii(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wn(t)-Wn(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(e){return Math.max(0,-Wn(Math.abs(e)))}(o))||(i.precision=r-2*("%"===i.type))}return ni(i)}function li(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var i,r,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((i=t<e)&&(r=e,e=t,t=r),0===(a=Dt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(r=Math.ceil(t-e+1));++s<r;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(r=Math.ceil(e-t+1));++s<r;)o[s]=(e-s)/a;return i&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t();return si(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,r=t(),o=0,a=r.length-1,s=r[o],l=r[a];return l<s&&(i=s,s=l,l=i,i=o,o=a,a=i),(i=Dt(s,l,n))>0?i=Dt(s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i,n):i<0&&(i=Dt(s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i,n)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(l/i)*i,t(r)):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(l*i)/i,t(r)),e},e}function ui(){var e=Un(_n,_n);return e.copy=function(){return Hn(e,ui())},zt.apply(e,arguments),li(e)}ti=ai({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),ni=ti.format,ii=ti.formatPrefix;var ci=new Date,di=new Date;function mi(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},r.range=function(n,i,o){var a,s=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<i);return s},r.filter=function(n){return mi((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,i){if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););}))},n&&(r.count=function(t,i){return ci.setTime(+t),di.setTime(+i),e(ci),e(di),Math.floor(n(ci,di))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?function(t){return i(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}var hi=mi((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));hi.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mi((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):hi:null},hi.range;var pi=6e4,fi=36e5,gi=864e5,vi=6048e5,yi=mi((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()}));yi.range;var Si=mi((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())*pi)/gi}),(function(e){return e.getDate()-1}));function Mi(e){return mi((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())*pi)/vi}))}Si.range;var xi=Mi(0),bi=Mi(1),Ei=Mi(2),Ci=Mi(3),Ai=Mi(4),Ni=Mi(5),Oi=Mi(6);xi.range,bi.range,Ei.range,Ci.range,Ai.range,Ni.range,Oi.range;var Ti=mi((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()}));Ti.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mi((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},Ti.range;var Li=mi((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*pi)}),(function(e,t){return(t-e)/pi}),(function(e){return e.getUTCMinutes()}));Li.range;var Ii=mi((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*fi)}),(function(e,t){return(t-e)/fi}),(function(e){return e.getUTCHours()}));Ii.range;var Ri=mi((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/gi}),(function(e){return e.getUTCDate()-1}));function wi(e){return mi((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)/vi}))}Ri.range;var ki=wi(0),qi=wi(1),Di=wi(2),Pi=wi(3),zi=wi(4),$i=wi(5),_i=wi(6);ki.range,qi.range,Di.range,Pi.range,zi.range,$i.range,_i.range;var Fi=mi((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()}));Fi.range;var Bi=mi((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 ji(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 Vi(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 Hi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Bi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mi((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},Bi.range;var Ui,Yi,Wi={"-":"",_:" ",0:"0"},Xi=/^\s*\d+/,Ki=/^%/,Gi=/[\\^$*+?|[\]().{}]/g;function Ji(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(t)+r:r)}function Zi(e){return e.replace(Gi,"\\$&")}function Qi(e){return new RegExp("^(?:"+e.map(Zi).join("|")+")","i")}function er(e){for(var t={},n=-1,i=e.length;++n<i;)t[e[n].toLowerCase()]=n;return t}function tr(e,t,n){var i=Xi.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function nr(e,t,n){var i=Xi.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function ir(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function rr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function or(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function ar(e,t,n){var i=Xi.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function sr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function lr(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ur(e,t,n){var i=Xi.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function cr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function dr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function mr(e,t,n){var i=Xi.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function hr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function pr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function fr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function gr(e,t,n){var i=Xi.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function vr(e,t,n){var i=Xi.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function yr(e,t,n){var i=Ki.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function Sr(e,t,n){var i=Xi.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Mr(e,t,n){var i=Xi.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function xr(e,t){return Ji(e.getDate(),t,2)}function br(e,t){return Ji(e.getHours(),t,2)}function Er(e,t){return Ji(e.getHours()%12||12,t,2)}function Cr(e,t){return Ji(1+Si.count(Ti(e),e),t,3)}function Ar(e,t){return Ji(e.getMilliseconds(),t,3)}function Nr(e,t){return Ar(e,t)+"000"}function Or(e,t){return Ji(e.getMonth()+1,t,2)}function Tr(e,t){return Ji(e.getMinutes(),t,2)}function Lr(e,t){return Ji(e.getSeconds(),t,2)}function Ir(e){var t=e.getDay();return 0===t?7:t}function Rr(e,t){return Ji(xi.count(Ti(e)-1,e),t,2)}function wr(e){var t=e.getDay();return t>=4||0===t?Ai(e):Ai.ceil(e)}function kr(e,t){return e=wr(e),Ji(Ai.count(Ti(e),e)+(4===Ti(e).getDay()),t,2)}function qr(e){return e.getDay()}function Dr(e,t){return Ji(bi.count(Ti(e)-1,e),t,2)}function Pr(e,t){return Ji(e.getFullYear()%100,t,2)}function zr(e,t){return Ji((e=wr(e)).getFullYear()%100,t,2)}function $r(e,t){return Ji(e.getFullYear()%1e4,t,4)}function _r(e,t){var n=e.getDay();return Ji((e=n>=4||0===n?Ai(e):Ai.ceil(e)).getFullYear()%1e4,t,4)}function Fr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ji(t/60|0,"0",2)+Ji(t%60,"0",2)}function Br(e,t){return Ji(e.getUTCDate(),t,2)}function jr(e,t){return Ji(e.getUTCHours(),t,2)}function Vr(e,t){return Ji(e.getUTCHours()%12||12,t,2)}function Hr(e,t){return Ji(1+Ri.count(Bi(e),e),t,3)}function Ur(e,t){return Ji(e.getUTCMilliseconds(),t,3)}function Yr(e,t){return Ur(e,t)+"000"}function Wr(e,t){return Ji(e.getUTCMonth()+1,t,2)}function Xr(e,t){return Ji(e.getUTCMinutes(),t,2)}function Kr(e,t){return Ji(e.getUTCSeconds(),t,2)}function Gr(e){var t=e.getUTCDay();return 0===t?7:t}function Jr(e,t){return Ji(ki.count(Bi(e)-1,e),t,2)}function Zr(e){var t=e.getUTCDay();return t>=4||0===t?zi(e):zi.ceil(e)}function Qr(e,t){return e=Zr(e),Ji(zi.count(Bi(e),e)+(4===Bi(e).getUTCDay()),t,2)}function eo(e){return e.getUTCDay()}function to(e,t){return Ji(qi.count(Bi(e)-1,e),t,2)}function no(e,t){return Ji(e.getUTCFullYear()%100,t,2)}function io(e,t){return Ji((e=Zr(e)).getUTCFullYear()%100,t,2)}function ro(e,t){return Ji(e.getUTCFullYear()%1e4,t,4)}function oo(e,t){var n=e.getUTCDay();return Ji((e=n>=4||0===n?zi(e):zi.ceil(e)).getUTCFullYear()%1e4,t,4)}function ao(){return"+0000"}function so(){return"%"}function lo(e){return+e}function uo(e){return Math.floor(+e/1e3)}!function(e){Ui=function(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Qi(r),c=er(r),d=Qi(o),m=er(o),h=Qi(a),p=er(a),f=Qi(s),g=er(s),v=Qi(l),y=er(l),S={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:xr,e:xr,f:Nr,g:zr,G:_r,H:br,I:Er,j:Cr,L:Ar,m:Or,M:Tr,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:lo,s:uo,S:Lr,u:Ir,U:Rr,V:kr,w:qr,W:Dr,x:null,X:null,y:Pr,Y:$r,Z:Fr,"%":so},M={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:Br,e:Br,f:Yr,g:io,G:oo,H:jr,I:Vr,j:Hr,L:Ur,m:Wr,M:Xr,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:lo,s:uo,S:Kr,u:Gr,U:Jr,V:Qr,w:eo,W:to,x:null,X:null,y:no,Y:ro,Z:ao,"%":so},x={a:function(e,t,n){var i=h.exec(t.slice(n));return i?(e.w=p[i[0].toLowerCase()],n+i[0].length):-1},A:function(e,t,n){var i=d.exec(t.slice(n));return i?(e.w=m[i[0].toLowerCase()],n+i[0].length):-1},b:function(e,t,n){var i=v.exec(t.slice(n));return i?(e.m=y[i[0].toLowerCase()],n+i[0].length):-1},B:function(e,t,n){var i=f.exec(t.slice(n));return i?(e.m=g[i[0].toLowerCase()],n+i[0].length):-1},c:function(e,n,i){return C(e,t,n,i)},d:dr,e:dr,f:vr,g:sr,G:ar,H:hr,I:hr,j:mr,L:gr,m:cr,M:pr,p:function(e,t,n){var i=u.exec(t.slice(n));return i?(e.p=c[i[0].toLowerCase()],n+i[0].length):-1},q:ur,Q:Sr,s:Mr,S:fr,u:nr,U:ir,V:rr,w:tr,W:or,x:function(e,t,i){return C(e,n,t,i)},X:function(e,t,n){return C(e,i,t,n)},y:sr,Y:ar,Z:lr,"%":yr};function b(e,t){return function(n){var i,r,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!=(r=Wi[i=e.charAt(++s)])?i=e.charAt(++s):r="e"===i?" ":"0",(o=t[i])&&(i=o(n,r)),a.push(i),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function E(e,t){return function(n){var i,r,o=Hi(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?(r=(i=Vi(Hi(o.y,0,1))).getUTCDay(),i=r>4||0===r?qi.ceil(i):qi(i),i=Ri.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=ji(Hi(o.y,0,1))).getDay(),i=r>4||0===r?bi.ceil(i):bi(i),i=Si.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.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),r="Z"in o?Vi(Hi(o.y,0,1)).getUTCDay():ji(Hi(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Vi(o)):ji(o)}}function C(e,t,n,i){for(var r,o,a=0,s=t.length,l=n.length;a<s;){if(i>=l)return-1;if(37===(r=t.charCodeAt(a++))){if(r=t.charAt(a++),!(o=x[r in Wi?t.charAt(a++):r])||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return S.x=b(n,S),S.X=b(i,S),S.c=b(t,S),M.x=b(n,M),M.X=b(i,M),M.c=b(t,M),{format:function(e){var t=b(e+="",S);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=b(e+="",M);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}(e),Ui.format,Ui.parse,Yi=Ui.utcFormat,Ui.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 co=1e3,mo=6e4,ho=36e5,po=864e5,fo=2592e6,go=31536e6;function vo(e){return new Date(e)}function yo(e){return e instanceof Date?+e:+new Date(+e)}function So(e,t,n,i,r,o,a,s,l){var u=Un(_n,_n),c=u.invert,d=u.domain,m=l(".%L"),h=l(":%S"),p=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),S=l("%Y"),M=[[a,1,co],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,mo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,ho],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,po],[i,2,1728e5],[n,1,6048e5],[t,1,fo],[t,3,7776e6],[e,1,go]];function x(s){return(a(s)<s?m:o(s)<s?h:r(s)<s?p:i(s)<s?f:t(s)<s?n(s)<s?g:v:e(s)<s?y:S)(s)}function b(t,n,i,r){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(i-n)/t,a=It((function(e){return e[2]})).right(M,o);a===M.length?(r=Pt(n/go,i/go,t),t=e):a?(r=(a=M[o/M[a-1][2]<M[a][2]/o?a-1:a])[1],t=a[0]):(r=Math.max(Pt(n,i,t),1),t=s)}return null==r?t:t.every(r)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Ht.call(e,yo)):d().map(vo)},u.ticks=function(e,t){var n,i=d(),r=i[0],o=i[i.length-1],a=o<r;return a&&(n=r,r=o,o=n),n=(n=b(e,r,o,t))?n.range(r,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?x:l(t)},u.nice=function(e,t){var n=d();return(e=b(e,n[0],n[n.length-1],t))?d(function(e,t){var n,i=0,r=(e=e.slice()).length-1,o=e[i],a=e[r];return a<o&&(n=i,i=r,r=n,n=o,o=a,a=n),e[i]=t.floor(o),e[r]=t.ceil(a),e}(n,e)):u},u.copy=function(){return Hn(u,So(e,t,n,i,r,o,a,s,l))},u}function Mo(){return zt.apply(So(Bi,Fi,ki,Ri,Ii,Li,yi,hi,Yi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const xo={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"}}},bo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var Eo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:i}=this.settings.settings,[r,o]=t(),a=Math.abs(r)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=xo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:bo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:bo(t.shadow.endOffset)}}})(n),u="horizontal"===n&&i,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 Co({viewState:e,viewCache:t,layoutService:n,dockService:i,rtl:r}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:i.meta.major.orientation,rtl:r,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-i)/(r-i),(n.max-i)/(r-i)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Ao;function No(){Ao=Ao||document.createElement("canvas").getContext("2d")}const Oo={measureTextWidth(e){No();const{width:t}=Ao.measureText(e);return t},lineWrap(e,t,n,i){let r,o;No();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof i&&a.length>=i)return a.slice(0,i);for(n&&(Ao.font=n),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[h]=m,c="",r=1;r<m.length;r++)if(l=`${h} ${m[r]}`,u=Oo.measureTextWidth(l),u>t&&("number"!=typeof i||i>s.length)?(s.push(h),h=m[r]):h=l,"number"==typeof i&&s.length>=i){c=m.slice(r+1).join(" ");break}"number"!=typeof i||s.length<i?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${c}`}return s},wordWrap(e,t,n,i,r){if(No(),!e||!e.length)return[];n&&(Ao.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||Oo.measureTextWidth(u)<=t?o.push(u):(s=Oo.splitWord(u,t,void 0,i-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?Oo.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=i?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>i?(o=o.splice(0,i),o[o.length-1]=Oo.truncate(o[o.length-1],t,n,r).text):(u=o[o.length-1],u&&u.length>1&&Oo.measureTextWidth(u)>t&&(o[o.length-1]=Oo.truncate(u,t,n,r).text)),o},truncate(e,t,n,i="…"){No();let r,o,a,s,l=e;const u=Oo.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Ao.font=n),e&&t){if(Oo.measureTextWidth(l)>t){for(r=Math.min(c,l.length);r>0;r--)if(o=l.substring(0,r-1),a=o.trim()+i,Oo.measureTextWidth(a)<=t){s=l.substring(r-1),l=a;break}r||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,i){let r;No();let o,a=e,s="",l=[];if(Oo.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/i);for(r=Math.min(e.length,u);r>0&&(a=e.substring(0,r),o=e.substring(r-1,r)," "===o?a=e.substring(0,r-1):a+="-",s=e.substring(r),!(Oo.measureTextWidth(a)<=t));r--);return(!r&&!a||Oo.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Oo.measureTextWidth(s)>t?(s=Oo.explodeWord(s,t,n-1,i),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,i)=>(No(),e&&t?(n&&(Ao.font=n),Oo.explodeWord(e,t,i,Math.max(1,Oo.measureTextWidth("i")))):[]),wrapText(e,t,n,i,r){let o;return Number.isNaN(t)?[e]:(o=i>1?Oo.lineWrap(e,t,n,i):[e],o=Oo.wordWrap(o,t,n,i,r),o)},getFontHeight:e=>(No(),e&&(Ao.font=e),1.5*Oo.measureTextWidth("m")),tokenize(e,t,n,i,r,o,a=1){No(),t&&(Ao.font=t);const s=Oo.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):i||1;return Array.isArray(i)?(i.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),i.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(i)||i<=0?m:Math.min(m,i)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(Oo.wrapText(e,r,t,u[n])))})):d=Oo.wrapText(e,r,t,u[0],n),d}},To={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:i,rendHeight:r,flipXY:o,symbol:a}){let s="x",l="y",u=i,c=r,d=t<.5?90:-90;return o&&(s="y",l="x",u=r,c=i,d=t<.5?180:0),a(re({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};re.bind(null,!0);const Lo=Math.log(10);function Io(e){return 10**e}const Ro={pow10:Io,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/Lo,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))/Lo),i=e/Io(n);return t=i<=1?1:i<=2?2:i<=5?5:10,t*Io(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/Lo);const i=e/Io(t);return i<1?(n=5,t--):n=i<2?1:i<5?2:5,n*Io(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return Io(Math.floor(Math.log(Math.abs(e))/Lo))},getFraction(e){if(0===e)return 0;return e/Io(Math.floor(Math.log(Math.abs(e))/Lo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/Lo),i=e/Io(n);return t=Math.ceil(i),7!==t&&9!==t||t++,i>1&&i<=1.5?t=1.5:i>2&&i<=2.5&&(t=2.5),t*Io(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},wo=[[2,4,6],[2,4],[3]],ko=[,[,,[[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 qo(e,t,n){const i=e?e.length:0;let r,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(r=1;r<i;r++)o=Math.min(o,e[r]/e[r-1]);void 0!==n&&(o=Math.min(o,n/e[i-1])),e.splice(0,0,o)}function Do(e,t,n){let i;const r=e?e.length:0;for(i=0;i<r;i++)qo(e[i],t,n)}!function(){let e,t;for(Do(wo,1,10),e=0;e<ko.length;e++)if(ko[e])for(t=0;t<ko[e].length;t++)Array.isArray(ko[e][t])&&Do(ko[e][t])}();const Po={isInside(e,t,n,i){if(!i)return!0;const r=e.position-e.radius,o=e.position+e.radius;return r>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,i=e.position<t.position?t:e;return i.position-i.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 i=Po.findSegmentPositionMeetMin(e,t);return Po.findSegmentPositionMeetMax({center:i,max:i+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const i=Po.findSegmentPositionMeetMax(e,n);return Po.findSegmentPositionMeetMin({center:i,min:i-e.radius},t)},layoutPositionFromMin(e,t,n,i=0){const r=e.length-1;let o,a,s=t;for(let t=0;t<r;t++)o=e[t],a=e[t+1],o.position=Po.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-i)/2),s=o.position+o.radius+i/2;a.position=Po.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,i=0){const r=e.length-1;let o,a,s;const l=Math.max(0,e[r].position+e[r].radius-n);if(0===l)return;let u,c=0;for(o=r;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,Po.getGap(s,a)-i),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<=r;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,i=0){const r=e.length-1;if(!(r<0))if(0!==r)Po.layoutPositionFromMin(e,t,n,i),Po.adjustPositionFromMax(e,t,n,i);else{const i=e[0];i.position=Po.findSegmentPositionMeetMaxThenMin(i,t,n)}}},zo=(e,t,n,i=1)=>{const r=e.bandwidth();return n?"start"===t?r:"end"===t?r*(1-i):r*(2-i)/2:"start"===t?0:"end"===t?r*i:r*i/2},$o=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,_o=e=>e.filter($o),Fo=(e,t)=>_o(he.getValue(e,t,[])),Bo=e=>$o(e)&&(!1!==e.showValue||!1!==e.showLabel),jo=e=>e.filter(Bo),Vo=(e,t)=>jo(he.getValue(e,t,[])),Ho=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,Uo=(e,t,n)=>{const{dimensionRefLineInfo:i}=t;if(i[e])return i[e][n]},Yo=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:r}=n;return void 0!==i&&void 0!==r&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<i},Wo=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:r}=n;return void 0!==i&&void 0!==r&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=i+r},Xo=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ko=({value:e,qMax:t})=>"NaN"!==t&&e>t,Go={isRefLineVisible:$o,getVisibleRefLines:_o,getRefLines:Fo,getMeasureRefLines:e=>Fo(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:Fo(e,"refLine.dimRefLines"),isRefLineLabelVisible:Bo,getVisibleRefLineLabels:jo,getRefLineLabels:Vo,getMeasureRefLineLabels:e=>Vo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:Vo(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:i,align:r,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let u;var l;if(a.meta.isGroupedByMeasure)return u=zo(s,r,o,null!==(l=a.meta.groupSize)&&void 0!==l?l:a.meta.measureCount),s([n,0])+u;if(a.meta.isGroupedByDimension){if(!i)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=i;let l;return u=zo(s,r,o,t),e&&e.length&&(l=(({pxScale:e,value:t,innerValues:n,invert:i,minOrder:r})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:i});for(let i=0;i<n.length;i++){const{id:a,order:s}=n[i],l=e([t,a]);if(void 0!==l)return l-o*(s-r)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===l?s(n):l)+u}return u=zo(s,r,o),s(n)+u}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:i})=>{const{isGroupedByDimension:r}=i.meta,o={},a=he.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():he.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=s?"qData.0.qSubNodes":"qMatrix",c=he.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,i=t[d];o[i]||(o[i]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:c[e]})}})():r?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],i=c[t][1],r=t+m,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,r),o[a].maxOrder=Math.max(o[a].maxOrder,r),o[a].innerValues[o[a].innerValues.length]={id:i.qElemNumber,order:r}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:r,maxOrder:r,innerValues:[{id:i.qElemNumber,order:r}],dataNode:c[t]},0===t?0===r&&(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,i=t[d];o[i]||(o[i]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:c[e]})}})(),o},getInputValue:Ho,extractInfoFromInputValue:Uo,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=Ho({refLineLayout:e,layoutService:n});return Uo(i,t,"id")},isDiscreteMinOutOfBounds:Yo,isDiscreteMaxOutOfBounds:Wo,isContinuousMinOutOfBounds:Xo,isContinuousMaxOutOfBounds:Ko,isOutOfRange:({value:e,qMin:t,qMax:n})=>Xo({value:e,qMin:t})||Ko({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Wo({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Yo({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Jo=({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 Zo(e){return e.showValue?`… ${e.valueString}`:"…"}function Qo(e,t,n=70){for(let i=0;i<e.length;i++){const r=e[i],o=Jo({label:r,labelStyle:t});r.lines=Oo.tokenize(r.title,o,Zo(r),3,n),r.maxNumLines=r.lines.length}}function ea({title:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:r=200}){const o=Oo.tokenize(e,t,n,i,r),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function ta({oobs:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:r=200}){const o=e.map((e=>ea({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:i,maxWidth:r}))),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 na(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const ia=3,ra=2;function oa({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const i=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${i}]`,"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 aa=({label:e,dataPages:t,qMin:n,qMax:i})=>{if(void 0!==n&&void 0!==i){const{inputValue:t}=e;if(Go.isContinuousMaxOutOfBounds({value:t,qMax:i}))return 1;if(Go.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Go.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Go.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},sa={hasEngineFormat:oa,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:i,orientation:r,rtl:o,isContinuous:a,isDimension:s}){const l=Go.getInvert({orientation:r,rtl:o,isContinuous:a}),u="S"===i.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=i.getHyperCubeValue(u),{canBeContinuous:d}=i.meta;let m,h;if(s&&d){const e=i.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,h=e.qMax}for(let r=0;r<e.length;r++){const o=e[r],{value:s,align:u,valueInfo:d}=o,p=aa({label:o,dataPages:c,qMin:m,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:Go.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:i,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:i,localeInfo:r}){let o;if(n)for(let n=0;n<e.length;n++){const i=e[n],{value:a,inputValue:s,inputValueLabel:l}=i;o=oa({inputValue:s,inputValueLabel:l,localeInfo:r})?l:t?t(a):a,i.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,i.title=sa.getTitle(i)}else if(i)for(let t=0;t<e.length;t++){const n=e[t],{valueText:i,inputValue:a,inputValueLabel:s}=n;o=oa({inputValue:a,inputValueLabel:s,localeInfo:r})?s:i,n.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,n.title=sa.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,n.title=sa.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const i=e[n];i.totalWidth=t(i.title,i).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,i=0){const r=e.length-1;if(r<0)return;let o,a;if([o]=e,o.cMin=t,0!==r){for(let t=0;t<r;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-i)/2,a.cMin=o.cMax+i;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 i=t-1,r=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,r.length);for(let e=r.length-1;e>=r.length-o;e--)r[e].maxNumLines=i},reduceTotalMaxNumLines(e,t,n){const i=Math.floor(n/t);let r=3;do{const t=sa.getTotalNumLines(e)-i;if(t<=0)return;sa.reduceLabelsHavingMaxNumLines(e,r,t),r--}while(r>1)},reduceMaxNumLines(e,t,n=0){for(let i=0;i<e.length;i++){const r=e[i];r.maxNumLines=Math.max(1,Math.min(r.maxNumLines,Math.floor((Math.max(0,r.cMax-r.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,i){for(let r=0;r<e.length;r++){const o=e[r];o.width=Math.min(t,sa.measureLabelMaxLineWidth(o,i)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const i=e[n],{center:r}=i,o=i[t],a=o/2;i.segment={center:r,range:o,min:r-a,max:r+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:i,upperLimit:r,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:h,isContinuous:p,isDimension:f}){const g=e.map((e=>e)),v=n;sa.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:h,orientation:c,rtl:m,isContinuous:p,isDimension:f}),na(e,"center"),sa.addLabelsNeighborInfo(e,i,r,o),Qo(e,a,s),sa.reduceTotalMaxNumLines(g,l,r-(g.length-1)*o),"vertical"===c&&(sa.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let i=0;i<e.length;i++){const r=e[i],o=Jo({label:r,labelStyle:t});r.lines.length>r.maxNumLines&&(r.lines=Oo.tokenize(r.title,o,Zo(r),r.maxNumLines,n))}}(e,a,s)),sa.addLabelsSize(e,s,l,d),sa.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:i,area:r,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:u}=i,{minorCenter:c}=r,{fontSize:d,fontFamily:m,fontStyle:h,fontWeight:p,textDecoration:f,background:g}=t;let v=[];return e.forEach((e=>{const{lines:t}=e,i=t.length,r=t.map(((t,r)=>{const g={type:"text",text:t,title:ea({title:e.title,font:a,ellipsis:Zo(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||d,fontFamily:e.fontFamily||m,fontStyle:e.fontStyle||h,fontWeight:e.fontWeight||p,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+=(r-(i-1)/2)*o,g}));e.background&&v.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:i,label:r,lineHeight:o,background:a}){const{lines:s}=r,{borderRadius:l=ia,padding:u={}}=a,{top:c=ra,bottom:d=ra,left:m=ra,right:h=ra}=u,p=s.length,f={type:"rect",rx:l,ry:l,fill:r.background.fill,width:r.width+(m+h),height:r.height+(c+d),value:r.value,dock:i};return f[n]=e,f[t]=r.segment.position,f.x-=r.width/2+m,f.y-=p*o/2+c,f}({minorCenter:c,majorAxis:s,minorAxis:l,dock:u,label:e,lineHeight:o,background:g})),v=v.concat(r)})),v}};function la(e,t,n){let i;const r=typeof t;if("string"===r||"object"===r)i=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;i=e&&e[0]?e[0].formatter():null}return i}function ua(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:i,bottom:r,maxLabelWidth:o}=t;let a=1;return sa.getMaxTextWidth(e)>o&&(Qo(e,t,o),a=Math.max(...e.map((e=>e.lines.length)))),a*n+i+r}(t,n):function(e,t){const{left:n,right:i,maxLabelWidth:r}=t;return Math.min(r,sa.getMaxTextWidth(e))+n+i}(t,n)}function ca(e,t){return t?e.domain():[0,1]}function da(e,t,n,i="value"){let r=e.filter((e=>e[i]>=t));r=r.filter((e=>e[i]<=n));const o=e.filter((e=>e[i]<t)),a=e.filter((e=>e[i]>n));return{filteredLabels:r,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function ma(e){let t,n=0;for(let i=1;i<10;i++)t=e(i),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 ha(e,t){return e>9?t[1]:t[0]}function pa({alignment:e,dockValue:t,oobs:n,style:i,rect:r,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:h,minorDimension:p,dock:f}=s,g=r[p],v=To.createOob({oob:To.getDefaultSettings({size:i.size,fill:i.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:r.width,rendHeight:r.height,flipXY:d,symbol:o});v.dock=f;const y=`c${m}`,S=`c${h}`,M={type:"circle",r:l,stroke:"transparent",fill:i.text.background.fill,strokeWidth:0,dock:f};M[S]=g/2,M[y]=a;const x={type:"text",text:c>9?"9+":c,title:ta({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:i.text.fontSize,fontFamily:i.text.fontFamily,fill:i.text.fill,baseline:"central",anchor:"middle",dock:f};return x[h]=g/2,x[m]=a,[v,M,x]}const fa=e=>{const t=Jo({labelStyle:e}),n=Oo.getFontHeight(t)*(e.lineHeightMultiplicator||1),i=e.gap||12,r=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:i,maxLabelWidth:r,top:o,bottom:a,left:s,right:l}},ga=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 va={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:i,localeInfo:r}=this.settings,o=!!i||n.meta.canBeContinuous,a=ga(this.settings.labels),s=la(this.chart,this.settings.formatter,e);sa.addLabelTitles({labels:a,formatter:s,isContinuous:i,canBeContinuous:o,localeInfo:r});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:i,layoutService:r})=>{if(n){const[i,r]=ca(t,n);return da(e,i,r)}if(i){const t=r.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:i}=t;if("NaN"!==n&&"NaN"!==i)return da(e,n,i,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:i,canBeContinuous:o,layoutService:n});let d;if(this.measureText=(e,n)=>{const{fontSize:i,fontFamily:r,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:i||t.label.fontSize,fontFamily:r||t.label.fontFamily})},c&&c.length){const e=fa(t.label),{dock:n}=this.settings.layout;return sa.measureLabelsWidth(c,this.measureText),d=ua(n,c,e),d}const m=ma(this.measureText),h=l?ha(l,m):0,p=u?ha(u,m):0;return d=Math.max(h,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:i,theme:r,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||i.meta.canBeContinuous,u=ga(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=n.label,h=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),p=function(e,t,n){const i=e[t.minorDimension];return{minorSize:i,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(i-n.right-n.left)/2+n.left:(i-n.top-n.bottom)/2+n.top}}(this.rect,h,m),{orientation:f,majorDimension:g}=h,{majorSize:v}=p,y=fa(n.label),{font:S,lineHeight:M,gap:x,maxLabelWidth:b}=y,E=la(this.chart,this.settings.formatter,e),C=v;sa.addLabelTitles({labels:u,formatter:E,isContinuous:o,canBeContinuous:l,localeInfo:s}),sa.calculateLabelPositions({labels:u,scale:e,size:C,layoutService:i,orientation:f,rtl:d,isContinuous:o,isDimension:a});const[A,N]=ca(e,o),{filteredLabels:O,lowerOobs:T,upperOobs:L,lowerCircleSize:I,upperCircleSize:R,lowerOobSpace:w,upperOobSpace:k}=function({labels:e,minValue:t,maxValue:n,orientation:i,rtl:r,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=da(e,t,n,u),h="scaledValue"!==u&&Go.getInvert({orientation:i,rtl:r,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,c,h),f=function(e,t,n){return n?e:t}(d,c,h),g=p.length,v=f.length,y=ma(l),S=ha(g,y),M=ha(v,y),x=function(e,t,n,i,r){return("vertical"===i?r.top:r.left)+(e>0?t+n:0)}(g,a.oob.size,S,i,s),b=function(e,t,n,i,r){return("vertical"===i?r.bottom:r.right)+(e>0?t+n:0)}(v,a.oob.size,M,i,s);return{filteredLabels:m,lowerOobs:p,upperOobs:f,lowerCircleSize:S,upperCircleSize:M,lowerOobSpace:x,upperOobSpace:b}}({labels:u,minValue:A,maxValue:N,orientation:f,rtl:d,isContinuous:o,style:n,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),q=w,D=v-k;na(T),na(L);const P=pa({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+I/2,areaProps:h,radius:I/2,font:S}),z=pa({alignment:1,dockValue:1,oobs:L,style:n.oob,rect:this.rect,symbol:t,position:v-(n.oob.size+R/2),areaProps:h,radius:R/2,font:S});sa.addLabelsInfo({labels:O,scale:e,majorSize:v,lowerLimit:q,upperLimit:D,labelStyle:y,lineHeight:M,gap:x,maxLabelWidth:b,majorDimension:g,orientation:f,measureText:this.measureText,rtl:d,layoutService:i,isContinuous:o,isDimension:a}),Po.layout(O.map((e=>e.segment)),q,D,n.label.gap);const $=O.filter((e=>Po.isInside(e.segment,q,D,o)));return sa.createLabels({labels:$,style:n.label,maxLabelWidth:b,areaProps:h,area:p,lineHeight:M,font:S,theme:r}).concat([...P,...z])}};var ya={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 Sa(e){const{qHyperCube:t,...n}=e,{qAxisData:i,qDataPages:r,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=re(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=ya;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==b(l,e)&&E(l,e,null);else{const e=t[0],n=t[1].split("].")[1];b(l,e,[]).forEach((e=>{void 0!==b(e,n)&&E(e,n,null)}))}})),l}var Ma={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:i}){return r=>{if(e||t||n){var o;if("line"===r.type)return null!==(o=r.tickValue)&&void 0!==o?o:"axis";if("text"===r.type)return`${r.tickValue} ${r.text}`;if("container"===r.type){const e=r.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${r.data.value} ${e.join("")}`}return Math.random()}if(i){if("line"===r.type&&void 0===r.tickValue)return"axis";const e=r.transform&&r.transform.match(/rotate/gi)?"rotated":"horizontal";return`${r.data.group?`${r.data.group.value} `:""}${r.data.value} ${r.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:i,dock:r}){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"===r&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==r&&"right"!==r||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"!==r&&"bottom"!==r||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||i?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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=i,e.y-=r):e.transform=`translate(${-i}, ${-r})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x;0===t.y-n.y&&0===i||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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=r,e.y-=i):(e.x-=i,e.y-=r)}))},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 i=t.x-n.x,r=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-=r,e.y2-=r):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=i,e.x2-=i);else{const t="x"===e.major.p?i/e.major.size:r/e.major.size,n="y"===e.minor.p?r/e.minor.size:i/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 i=t.x-n.x;0===t.y-n.y&&0===i||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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{switch(e.type){case"circle":e.cx-=i,e.cy-=r;break;case"rect":e.x-=i,e.y-=r;break;case"path":e.transform=`translate(${-i}, ${-r})`}}))}},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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{"image"===e.type?(e.x-=i,e.y-=r):(e.cx-=i,e.cy-=r)}))}},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 i=t.x-n.x,r=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-i,l=-r;e.forEach((e=>{switch(e.dock){case"right":i>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":r>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=Sa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Sa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:xa,extractInfoFromInputValue:ba,resolveValue:Ea}=Go;var Ca={resolveValue:Ea,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const i=xa({refLineLayout:e,layoutService:n});return ba(i,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const i=xa({refLineLayout:e,layoutService:n});return ba(i,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:i}=t,{canBeContinuous:r}=n.meta,o=xa({refLineLayout:e,layoutService:n});return i[o]&&r?i[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=xa({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:r}=t;return r[i]}};const Aa=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:i,colorModel:r,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,h;const p={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(h=t.style)||void 0===h?void 0:h.lineType,stroke:r.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||i.meta.isContinuous?(p.scale=s,p.value=t.refLineExpr.value):(p.valueInfo=Ca.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:i}),p.value=()=>{var e;const r=Go.getScaledPosition({scale:a.scale(s),value:Ca.resolveValue({refLineLayout:t,refLineModel:n,layoutService:i}),valueInfo:p.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:i,isContinuous:d});return Number.isNaN(r)?void 0:r}),p};function Na({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,dockService:r,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:u,key:c,mainComponentKey:d,path:m,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!p.length)return!1;const f={key:c,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==r.meta.major.orientation||!u),v=!e||n.meta.isContinuous;return p.forEach((o=>{f.lines[l].push(Aa({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:i,dockService:r,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:v}))})),f}const Oa=({isDimension:e,layoutService:t,animationsEnabled:n,style:i,labels:r,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:r,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:u},theme:c,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:i.referenceLine.label.name.fontFamily,fontSize:i.referenceLine.label.name.fontSize,fontStyle:i.referenceLine.label.name.fontStyle,fontWeight:i.referenceLine.label.name.fontWeight,textDecoration:i.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:i.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:i.referenceLine.outOfBounds.fontFamily,fontSize:i.referenceLine.outOfBounds.fontSize,fill:i.referenceLine.outOfBounds.color,background:{fill:i.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Ma.refLineLabels.trackBy,compensateForLayoutChanges:Ma.refLineLabels.compensateForLayoutChanges}}),Ta=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:r,theme:o,isContinuous:a})=>{const s=i.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:u}=e,{fontSize:c,fontFamily:d,fontStyle:m,fontWeight:h,textDecoration:p}=u||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:c,fontFamily:d,fontStyle:m,fontWeight:h,textDecoration:p,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=r,f.value=e.refLineExpr.value):(f.value=()=>Ca.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>Ca.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>Ca.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function La({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,animationsEnabled:r,dock:o,scale:a,style:s,formatter:l,theme:u,localeInfo:c,rtl:d,key:m,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const f=[],g=!e||n.meta.isContinuous,v=p.map((e=>Ta({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:a,theme:u,isContinuous:g})));return f.push(Oa({isDimension:e,rtl:d,style:s,dock:o,key:m,labels:v,scale:a,formatter:l,layoutService:n,animationsEnabled:r,theme:u,isContinuous:g,localeInfo:c})),f}function Ia({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:i,isGroupedByDimension:r}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=ve.dimensionless(o),l=Go.getMeasureRefLines(o),u=Go.getDimensionRefLines(o,s),c=Go.getMeasureRefLineLabels(o),d=Go.getDimensionRefLineLabels(o,s);let m={},h={};const p=()=>!(!u||!u.length)&&!u.every((t=>{const o=Go.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(i){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:i,qMax:r}=n;return Go.isOutOfRange({value:t,qMin:i,qMax:r})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&r){const n={valueInfo:h[t]},i="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",r=e.getHyperCubeValue(i);return Go.isOutOfDataPages({label:n,dataPages:r})}return!0})(o)})),f={isKMode:a,canBeContinuous:i,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:m,query:{getRefLines:e=>Go.getRefLines(o,e),getRefLineLabels:e=>Go.getRefLineLabels(o,e)},update:()=>{h=f.dimensionRefLineInfo,p()&&(m=Go.getDimensionValuesInfo({layout:o,canBeContinuous:i,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=m,u.forEach((t=>{const n=Go.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(h[n]?(h[n].innerValues=m[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,m[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,m[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||m[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||m[n].isMaxOrderOk):h[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},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)})))}};return f.update(),f}function Ra(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 wa({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const i=C(n);return i.setAlpha((null==e?void 0:e.alpha)>=0?e.alpha:1),i.isInvalid()?void 0:i.getRGBA()}function ka({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:i}=e,r=""===e.measureValue?void 0:+e.measureValue;if(Ro.isNumber(r))return r;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;var l;if(Ro.isNumber(s)&&(!(s>=a||0===o)&&1===o))return null===(l=t[i])||void 0===l||null===(l=l.dataNode[s+1])||void 0===l?void 0:l.qNum}const qa=3,Da=10,Pa={index:-1,color:"#595959"};function za({chart:e,chartModel:t,discreteModel:n,colorService:i,themeService:r,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:u,mainComponentKey:c,data:d,key:m}){var h;if(!Array.isArray(d)||0===d.length)return!1;const p={resolveUIColor:i.getMain().getPaletteColor},f=r.getTheme(),g="horizontal"===a.meta.major.orientation,v=!(!g||!s),{canBeContinuous:y,isContinuous:S,isButterfly:M}=o.meta,x=o.getLayout(),b=null!==(h=function({layout:e,colorModel:t}){var n,i,r;const o=null==e||null===(n=e.components)||void 0===n?void 0:n.find((e=>"general"===e.key));if(null!=o&&null!==(i=o.bgColor)&&void 0!==i&&i.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 wa({color:null==o||null===(r=o.bgColor)||void 0===r?void 0:r.color,colorModel:t})}({layout:x,colorModel:p}))&&void 0!==h?h:f.getStyle("object","","backgroundColor"),E=Go.getDimensionValuesInfo({layout:x,canBeContinuous:y,discreteModel:n,layoutService:o}),A=S?d:d.filter((e=>!!E[e.dimensionValue])),N={};A.map((e=>e.dimensionValue)).forEach((e=>{E[e]&&(N[e]?(N[e].innerValues=E[e].innerValues,N[e].minOrder=Math.min(N[e].minOrder,E[e].minOrder),N[e].maxOrder=Math.max(N[e].maxOrder,E[e].maxOrder),N[e].isMinOrderOk=N[e].isMinOrderOk||E[e].isMinOrderOk,N[e].isMaxOrderOk=N[e].isMaxOrderOk||E[e].isMaxOrderOk):N[e]={id:E[e].id,dataNode:E[e].dataNode,qText:E[e].qText,innerValues:E[e].innerValues,minOrder:E[e].minOrder,maxOrder:E[e].maxOrder,isMinOrderOk:E[e].isMinOrderOk,isMaxOrderOk:E[e].isMaxOrderOk},N[e].numInnerValues=(N[e].maxOrder||0)-(N[e].minOrder||0)+1)})),A.forEach((e=>{var t,n,i;const a=ka({point:e,dimensionValueInfo:N,layoutService:o});if(e.validMeasureValue=M&&1===e.measureIndex?-a:a,null!=o&&null!==(t=o.meta)&&void 0!==t&&t.isStacked){var s;const t=null===(s=N[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),i=null===(l=t[e.measureIndex+1])||void 0===l?void 0:l.qNum;if("number"==typeof i&&0!==i){const t=Math.sign(i);e.validMeasureValue=n.reduce(((e,n)=>{const i=n.qNum;return"number"==typeof i&&Math.sign(i)===t?e+i:e}),0)}}}const u=wa({colorModel:p,color:(null===(n=e.style)||void 0===n||null===(n=n.label)||void 0===n?void 0:n.color)||Pa}),c=!(null===(i=e.style)||void 0===i||null===(i=i.label)||void 0===i||!i.coloredBackground);e.labelBackgroundColor=c?u:void 0,e.labelColor=c?r.getTheme().getContrastingColorTo(u):u,e.hasBackground=c,e.maxLabelWidth=100}));const O={scale:l,fn:({datum:t})=>{var n;const i=e.scale(l),r=t.value.dimensionValue;if(S)return i("string"==typeof r?""===r?void 0:+r:r);if(void 0===N[r])return;return Go.getScaledPosition({scale:i,value:N[r].id,valueInfo:N[r],size:null===(n=e.component(c))||void 0===n?void 0:n.rect[g?"width":"height"],align:"center",invert:v,layoutService:o,isContinuous:S})}},T={scale:u,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:m,type:"point",data:A,settings:{x:g?O:T,y:g?T:O,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:qa},stroke:({datum:e})=>{var t,n;return wa({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"}})},fill:({datum:e})=>{var t,n;return null!==(t=e.value.style)&&void 0!==t&&null!==(t=t.fill)&&void 0!==t&&t.color?wa({colorModel:p,color:null===(n=e.value.style)||void 0===n?void 0:n.fill}):b},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:Da}px`},shape:({datum:e})=>{var t;return(null===(t=e.value.style)||void 0===t?void 0:t.symbol)||"circle"}},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:Ma.points.compensateForLayoutChanges}}}const $a=2;const _a=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},Fa=!0,Ba=!1,ja={index:0,color:"none"},Va={index:-1,color:"#595959"},Ha={index:-1,color:"#595959"},Ua=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)},Ya=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)},Wa=e=>{var t,n,i,r,o,a,s,l,u,c,d;switch(e.type){case"image":break;case"point":delete e.points,null===(t=e.style)||void 0===t||delete t.lineType,delete e.showPoints,null===(n=e.style)||void 0===n||delete n.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,null===(i=e.style)||void 0===i||delete i.dataPointSize,null===(r=e.style)||void 0===r||delete r.fill,null===(o=e.style)||void 0===o||delete o.symbol,null===(a=e.style)||void 0===a||delete a.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,null===(s=e.style)||void 0===s||delete s.lineType,null===(l=e.style)||void 0===l||delete l.lineThickness,null===(u=e.style)||void 0===u||delete u.lineColor,null===(c=e.style)||void 0===c||delete c.dataPointSize,null===(d=e.style)||void 0===d||delete d.fill}},Xa=({translator:e})=>({label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>ce.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!ce.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===_a(n.layout),convertFunctions:{get:(e,t,n,i)=>void 0===i.measureValue?1:0,set(e,t,n,i,r){0===e?(r.measureValue=0,delete r.measureIndex):(r.measureIndex=0,delete r.measureValue)}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.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===_a(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===_a(n.layout),invalid:(e,t,n)=>{return e.measureIndex<0||e.measureIndex>=((null==(i=n.layout)||null===(r=i.qHyperCube)||void 0===r||null===(r=r.qMeasureInfo)||void 0===r?void 0:r.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})).length)||0);var i,r}}}),Ka=()=>({symbol:{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"}]},labelPlacement:{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"}]},fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:ja},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:Va},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:Ha},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!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}}),Ga=({translator:e,pluginOptions:t})=>{const n={type:"array",ref:"plugins",filter:e=>e.filter((e=>["point","line"].includes(e.type))),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 n;return t.filter((t=>t.value===e.type))[0].translation+(null!==(n=e.label)&&void 0!==n&&n.value?`: ${e.label.value}`:"")},allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},add(e,t){void 0===t.plugins&&(t.plugins=[]),Wa(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(Wa),ce.canBeContinuous(n.layout)?e.plugins.forEach((e=>{switch(e.type){case"point":Ua(e);break;case"line":null===(t=e.points)||void 0===t||t.forEach(Ua)}var t})):e.plugins.forEach((e=>{switch(e.type){case"point":Ya(e);break;case"line":null===(t=e.points)||void 0===t||t.forEach(Ya)}var t})))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:Xa({translator:e})},styleSection:{component:"items",items:Ka()}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(t,n)=>{var i;return e.get("properties.plugins.Points.Point",n+1)+(null!==(i=t.label)&&void 0!==i&&i.value?`: ${t.label.value}`:"")},allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:Xa({translator:e})},styleSection:{component:"items",items:Ka(),show:(e,t,n)=>{const i=((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==i?void 0:i.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:Va},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 n};var Ja=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,i=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=i.length):(n=arguments[1],t=arguments[2]),t&&i?(i.length>n&&(i=i.substr(0,n)),new e(i,t)):null}},Za=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,i){let r,o;if(t.length===n)return o=this._value,this.setValue(i),o;const a=t.charAt(n);return this._nextMap?(r=this._nextMap[a],r||(r=new e,this._nextMap[a]=r)):(this._nextMap={},r=new e,this._nextMap[a]=r),r.put(t,n+1,i)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return Ja.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return Ja.newInstanceIfNeeded(e,t,this._value);const i=n.getLongestMatch(e,t+1);return i||Ja.newInstanceIfNeeded(e,t,this._value)}},Qa=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new Za);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new Qa;let i,r,o;for(i in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[i]&&e.hasOwnProperty(i)&&(t[e[i]]=i);for(r in t)"function"!=typeof t[r]&&t.hasOwnProperty(r)&&(o=t[r].toLowerCase().substr(1),n.put(o,String.fromCharCode(r)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);var es={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"}},ts={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const ns={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 is(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const rs={getImageSize(e,t){let n;function i(){n&&(clearTimeout(n),n=null)}function r(e){const t=e;t.onload=null,t.onerror=null,i()}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},r(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},i()):(e={height:u,width:c},i()),a(e)},s.onerror=()=>{r(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{r(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function os(e,t,n){let i=e.ref.qStaticContentUrl.qUrl;const r=function(e){var t,n,i;let r,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!==(i=e.session)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.url)){var c;if(r=e.session.options||(null===(c=e.enigmaModel)||void 0===c?void 0:c.session.sessionConfig),!r){var d;r=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(r.url);r.host=t.hostname,r.port=t.port,r.isSecure="wss:"===t.protocol}return u=void 0!==r.secure?r.secure:r.isSecure,o=u?"https://":"http://",a=r.host||"localhost",s=r.port?`:${r.port}`:"",l=r.prefix?r.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}return""}(n);r&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(i,r),i=i.replace(/"/g,'\\"'),i=i.replace(/'/g,"\\'"),i=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(i,r));const{height:o,width:a,imageError:s}=await rs.getImageSize(i,t);return{src:i,size:t,height:o,width:a,imageError:s}}async function as(e,t,n,i){var r,o,a;const{app:s,flags:l}=t,u=null===(r=e.layout)||void 0===r||null===(r=r.tooltip)||void 0===r?void 0:r.imageComponents;if(!u)return[];const[c]=u,d=c.size||"small",m=c.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===c.cId){h=e;break}const p=(null===(o=i.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let f;if(-1!==h&&p[h]&&(f=p[h]),"media"===m&&null!==(a=c.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return os(c,d,s);if("url"===m)return async function(e,t,n,i,r){let o,a=n.ref;if(r&&r.label&&(a=r.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&is(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:r,imageError:s}=await rs.getImageSize(t,i);o={src:t,size:i,height:n,width:r,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await rs.getImageSize(a,i);o={src:a,size:i,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,i){let r;const o=i.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(is(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:i,width:o,imageError:a}=await rs.getImageSize(e,n);r={src:e,size:n,height:i,width:o,imageError:a}}}catch(e){}return r}(s,n[h],d,f)}return[]}const ss={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){const r=t,o=[];for(let t=0;t<r.length;t++)o.push(as(e,i,n,r[t]));const a=await Promise.all(o);for(let e=0;e<r.length;e++)r[e].data.customTooltipImages=[a[e]];return r},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}},ls={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){let r=t;return r=await ss.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}),r},checkIfPromisesExist:({customTooltipModel:e})=>ss.checkIfPromisesExist({customTooltipModel:e})};const us=(e,t)=>{var n,i,r;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qMeasures,s=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qInterColumnSortOrder,l=t;return{qInfo:{qType:ns.CHART.CHART_PARENT_TYPE,qId:ns.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},cs=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:ns.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const ds={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,i;const r=null!==(n=null===(i=t.tooltip)||void 0===i||null===(i=i.chart)||void 0===i||null===(i=i.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",o=ns.CHART.STYLE[r];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:ns.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:i,customTooltipModel:r,rtl:o})=>{var a;const s=r,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 ds.hide({app:e,customTooltipModel:r});try{await async function({app:e,properties:t,customTooltipModel:n}){const i=n,r=ns.CHART.STATE,o=t.qStateName;i.miniChartToken.alternateState||(i.miniChartToken.alternateState=r,await e.addSessionAlternateState(r,o),i.miniChartToken.alternateState=r)}({app:e,properties:t,customTooltipModel:r});const a=await async function({app:e,properties:t,customTooltipModel:n}){var i;const r=n;null!==(i=r.miniChartToken.sessionObj)&&void 0!==i&&i.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const o=ns.CHART.STATE,a=us(t,o),s=await e.createSessionObject(a),l=cs(t);if(s.id!==ns.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);r.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===s.id)return r.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:r});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!==i?i:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===i&&n.length>0){var h,p;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(p=e.source)&&void 0!==p&&p.field){var f;const t=null==e||null===(f=e.source)||void 0===f?void 0:f.field.split("/"),n=t[t.length-1],i=void 0!==e.value?[e.value]:[];i.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),i,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(ns.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await r.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 ds.hide({app:e,customTooltipModel:r})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ds.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ns.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,i=ns.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(i)}({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 ms(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function hs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:i}=ns.CUSTOM,r={};return r[e]=!0,r[t]=!0,r[n]=!0,r[i]=!0,r}function ps(e){const t=hs();return e.filter((e=>t[e.id]))}const fs={getNodes(e,t){const n=function(e,t){let n=0,i=0;e.center?(n+=e.center.x,i+=e.center.y):(n+=e.clientX,i+=e.clientY);const r=t.element.getBoundingClientRect();return{cx:n-r.left,cy:i-r.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,i=[];const r={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||r[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],i.push(e)}}else{n||(n=[],Object.keys(r).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&r[t][e.key])))})));const t=n.filter((e=>{var t,n;const i=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return i&&i.value===u.value&&i.label===u.label}));t.length>0&&(i=i.concat(t[0]))}})),i},displayTooltip(e,t,{nodes:n,opts:i={},customTooltipModel:r,extractedNodes:o=[],hide:a}){if(r&&!a){const{layout:a,chart:s}=r,{attrExps:l}=fs.getAttrExprData(a);o.length||n.length?ls.handlePromises({customTooltipModel:r,nodes:fs.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:i}).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!=r&&null!==(s=r.miniChartToken)&&void 0!==s&&s.alternateState&&ds.hide({app:i.app,customTooltipModel:r}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>ls.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const i=t,r=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return i[r]||(i[r]=[]),i[r]},getAttrExprData(e){var t;let n=[],i="";const r=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(r.length>0){var o;const t=r.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)||[],i=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:i}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[ns.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let i=n.qLayoutExclude;i||(n.qLayoutExclude={quarantine:{}},i=n.qLayoutExclude),i.quarantine||(i.quarantine={}),i.quarantine[ns.CUSTOM.QUARANTINE]=[],e.forEach((e=>{i.quarantine[ns.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=i}(ps(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[ns.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[ns.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ms(e);if(!n)return;const i=void 0!==t?t:n.length-1;if(!n[i])return;const r=this.getAttrExps(e,n[i]);if(0===ps(r).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...r,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[i].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[i].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let i=[];const r=ms(e)||[];[...r,t].forEach((e=>{const t=ps(e.qAttributeExpressions||[]);t.length>0&&(i=t)}));const o=hs(),a=r.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(i));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:Oe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Oe.detectTextDirection(e.src),i=[],r={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){i.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;i.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),r.style["text-align"]="center",r.style["white-space"]="nowrap"}else r.style["background-size"]="contain",r.style["background-repeat"]="no-repeat",r.style["background-position"]="center",r.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",r,i),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function gs(e,t,n,i){var r;const o=(null===(r=t.qHyperCube)||void 0===r||null===(r=r[n])||void 0===r||null===(r=r[i])||void 0===r?void 0:r.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[i]?e.qSubNodes[i].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const r=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===r?"NaN":function(e,t){let n;switch(e.id){case ns.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ns.CUSTOM.TITLE:case ns.CUSTOM.DESCRIPTION:case ns.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,r);a.push({source:{key:"qHyperCube",field:`${n}/${i}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const vs={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,i="qDimensionInfo";return{field:`${i}/${n}`,value:t=>gs(t,e,i,n)}}};const ys={getCustomAttrExps(e,t,n){var i;const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(i=t.data)||void 0===i||null===(i=i.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(o))return r;return function(e,t,n,i){const r={[ns.CUSTOM.TITLE]:!0,[ns.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=fs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===ns.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,r="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);i.customTooltipAttrExpsArr.push({label:t,value:r})}else if(r[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&i.customTooltipInfoAttrExpsArr.push({...e.id===ns.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),i}(n,o.map((t=>Te.getMeasure(e,t))),e,r)}};function Ss({nodes:e,layout:t,dataset:n}){const i=function(e,t,n){const i=[];return e.forEach((e=>{i.push(ys.getCustomAttrExps(n,e,t))})),i}(e,t,n);return i.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Ms}=ns;function xs({flags:e,layout:t,app:n,model:i,picasso:r,chart:o,translator:a,localeInfo:s,embed:l,options:u}){const c={properties:void 0},d=function({layout:e,app:t,picasso:n,model:i,chart:r,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:i,chart:r,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:fs,miniChartToken:{},embed:s}}({layout:t,app:n,model:i,picasso:r,chart:o,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=()=>{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:()=>h(),hideBasic:()=>h()&&b(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var i,r;const o=Ss({dataset:e,nodes:n,layout:t});return{title:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Ms.TITLE)))||void 0===i?void 0:i.title,description:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Ms.DESCRIPTION)))||void 0===r?void 0:r.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>fs.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>fs.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:i})=>{const r=fs.getDataNodes(o,i),{attrExps:a}=fs.getAttrExprData(t);return ls.handlePromises({customTooltipModel:d,nodes:r,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(h()&&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==i?void 0:i.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>ds.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>fs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>ds.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:()=>ds.hide({app:n,customTooltipModel:d}),destroy:()=>ds.destroyVisualization({customTooltipModel:d})}}}function bs({key:e,source:t,layoutService:n,fieldModel:i,colorService:r,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=i.main,l=o.filter((e=>e.type===ts.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:i,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:i,...r.getDatumProps(o),customTooltipAttrExps:vs.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 Es({key:e,series:t,source:n,fieldModel:i,colorService:r,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=i.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:i,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:i,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:vs.getNode(o.getLayout(),o.meta),...r.getDatumProps(t)}})))}}]}return[]}function Cs({key:e,layoutService:t,fieldModel:n,series:i}){const{meta:r}=t;if(r.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=i.filter((e=>e.type===ts.TYPE.BAR)),s=r.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:r.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:r.isContinuous?e=>e.qNum:void 0}}}]}return[]}const As={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var Ns={OPTIONS:As,DEFAULT:As.MINI_CHART};function Os({layoutService:e,discrete:t}){return({h:n,rect:i,orientation:r,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===r,u=i[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 Ts({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-i)/(r-i),(n.max-i)/(r-i)]}(t,n):function(e){return e.get("viewRange")}(t)}const Ls=e=>({miniChart:e===Ns.OPTIONS.MINI_CHART.value,bar:e===Ns.OPTIONS.BAR.value,none:e===Ns.OPTIONS.NONE.value}),Is=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Ls(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Ls(Ns.DEFAULT.value);const i=e.getLayoutValue("dimensionAxis.continuousAuto"),r=e.getLayoutValue("preferContinuousAxis");return Ls(!n&&(i||!i&&r)?Ns.OPTIONS.NONE.value:Ns.OPTIONS.MINI_CHART.value)};function Rs({layoutService:e,override:t}){const n=Is({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ns.OPTIONS.MINI_CHART.value,n.bar=t.value===Ns.OPTIONS.BAR.value,n.none=t.value===Ns.OPTIONS.NONE.value),n}function ws({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:r,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,h=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,p=m?d.rect.computedInner.width:d.rect.computedInner.height,f=m&&a?p-h:h,g=Math.max(0,Math.min(f/p,1)),[v,y]=Ts({layoutService:r,viewState:n,viewCache:i}),S=g<v,M=g>y,x=!S&&!M;return{pixel:f,relative:g,thumb:x?f-v*p:0,beforeThumb:S,afterThumb:M,onThumb:x}}}function ks({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:r,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]=Ts({layoutService:r,viewState:n,viewCache:i});return{size:c,thumbSize:(m-d)*c}}}function qs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ws({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),c=ks({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(i,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(o.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),o=r.get("continuousMax"),s=n+(o-n)*a.relative;i.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 Ds="data-scrollbar-handle";function Ps({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ds)||""}const zs="scrollbarResize",$s=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function _s({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:s}){const l=ws({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${zs}`,options:{event:zs,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[zs]=this[zs]||{},$s(t)&&Ps({e:t})&&(this[zs].panningEvent=t.srcEvent),!!this[zs].panningEvent))}},events:{[`${zs}start`](n){n.preventDefault(),this[zs]=this[zs]||{},this[zs].panningEvent&&t.component(e).emit("dragStart",this[zs].panningEvent)},[`${zs}move`](n){if(n.preventDefault(),this[zs]=this[zs]||{},!this[zs].panningEvent)return;const o=i.get("zoom"),a=r.get("continuousMin"),s=r.get("continuousMax"),u=r.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Ps({e:this[zs].panningEvent});let m="start"===d?Math.min(c,o.max):o.min,h="end"===d?Math.max(c,o.min):o.max;m===h&&(m-="start"===d?u:0,h+="end"===d?u:0),i.set("zoom",{min:m,max:h}),t.component(e).emit("render")},[`${zs}end`](n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")},[`${zs}cancel`](n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")}}}}const Fs="scrollbarPan";function Bs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ws({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),c=ks({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Fs}`,options:{event:Fs,threshold:0,enable(i,r){return this[Fs]=this[Fs]||{},!(r&&!this[Fs].isPanning)||!!n.scroll.enabled()&&((!r||r.target===t.element)&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e)))}},events:{[`${Fs}start`](n){n.preventDefault();const a=u(n);if(this[Fs]=this[Fs]||{},this[Fs].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),o=r.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?i.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&i.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Fs].relative=a.relative,this[Fs].zoom=i.get("zoom"),this[Fs].zoom.span=this[Fs].zoom.max-this[Fs].zoom.min,this[Fs].zoom.fullSpan=o-n}else if(a.onThumb)this[Fs].offset=a.thumb;else{const e=c();this[Fs].offset=a.beforeThumb?0:e.thumbSize}},[`${Fs}move`](n){n.preventDefault();const a=u(n);if(this[Fs]=this[Fs]||{},o.meta.isContinuous){const e=a.relative-this[Fs].relative,{fullSpan:t,span:n,min:o,max:s}=this[Fs].zoom,l=r.get("continuousMin"),u=r.get("continuousMax");i.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Fs].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Fs}end`](n){n.preventDefault(),this[Fs]=this[Fs]||{},this[Fs].isPanning=!1,t.component(e).emit("unlockState")},[`${Fs}cancel`](n){n.preventDefault(),this[Fs]=this[Fs]||{},this[Fs].isPanning=!1,t.component(e).emit("unlockState")}}}}function js({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){return[qs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}),_s({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),Bs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Vs({componentKey:e,chart:t,actions:n,layoutService:i}){const r=(r,o)=>{if(!i.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(r,o)};return{type:"native",events:{mousemove:e=>r("hover",e),mouseleave:()=>r("leave")}}}const Hs={background:"rgba(0, 0, 0, 0.1)"},Us={top:-1,bottom:-1,width:6},Ys={width:2,background:"#595959"};var Ws={before:Hs,after:Hs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Us,endHandle:Us,startHandleBorder:Ys,endHandleBorder:Ys};const Xs={background:"rgba(0, 0, 0, 0.1)"},Ks={top:-1,bottom:-1,width:6},Gs={width:2,background:"#595959"};var Js={before:Xs,after:Xs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Ks,endHandle:Ks,startHandleBorder:Gs,endHandleBorder:Gs};const Zs={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Qs={pointerEvents:"initial"},el={pointerEvents:"none"};const tl="ew-resize",nl="default";function il(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,i=n?e.computedInner.width:e.computedInner.height,r=t.range(),o=n&&t.rtl;return{size:i,start:(o?1-r[1]:r[0])*i,end:(o?1-r[0]:r[1])*i}}function rl(){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?tl:nl}function ol(e,t,n){const{min:i}=this.settings.settings.size.thumb;if(n-t<i){const r=(i-(n-t))/2,o=Math.max(0,0-(t-r))-Math.max(0,n+r-e);return{size:e,start:t-r+o,end:n+r+o}}return{size:e,start:t,end:n}}function al(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function sl(){const{size:e,start:t,end:n}=il.call(this);this.renderer.render(this.elements(this.h,ol.call(this,e,t,n)))}function ll(){const{state:e,settings:t,style:n}=this,i=t.settings.style;return e.style[i]||(e.style[i]=function({id:e,style:t}){const n="slim"===e?Js:Ws;return{container:{...Zs},before:{...Zs,...n.before,...t.before},after:{...Zs,...n.after,...t.after},thumb:{...Zs,...n.thumb,...t.thumb},startHandle:{...Zs,...Qs,...n.startHandle},endHandle:{...Zs,...Qs,...n.endHandle},startHandleBorder:{...Zs,...el,...n.startHandleBorder},endHandleBorder:{...Zs,...el,...n.endHandleBorder}}}({id:t.settings.style,style:n[i]})),e.style[i]}var ul={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(){sl.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||!al.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Ps({e:e});t&&(this.state.hover[t]=!0),rl.call(this),sl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),rl.call(this),sl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Ps({e:e});t&&(this.state.drag[t]=!0),rl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),rl.call(this),sl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:i}=this.settings.settings.size.area,r="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[r]*i))},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:i}=il.call(this);return this.elements(e,ol.call(this,t,n,i))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:i}){const{settings:r}=this.settings,o=r.injections().map((t=>t({h:e,rect:this.rect,orientation:r.orientation,minThumbSize:r.size.thumb.min})));return function({h:e,size:t,start:n,end:i,properties:r,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[r.end]:t-n},m={[r.start]:i},h={left:-3},p={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"}),S=[];if(l){const t=e("div",{style:{...s.startHandle,...u?f:h},class:"scrollbar--start-handle",[Ds]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?g:p}}):void 0);S.push(t);const n=e("div",{style:{...s.endHandle,...u?h:f},class:"scrollbar--end-handle",[Ds]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?p:g}}):void 0);S.push(n)}const M=e("div",{style:{...s.thumb,[r.start]:n,[r.end]:t-i},class:"scrollbar--thumb"},S);return e("div",{style:{...s.container}},[v,M,y,...c])}({h:e,size:t,start:n,end:i,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:ll.call(this),continuous:r.isContinuous,invert:"horizontal"===r.orientation&&r.rtl,injections:o})}};function cl({layoutService:e}){return e.meta.isContinuous&&Rs({layoutService:e}).miniChart}function dl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:i,colorService:r}=e,{primarySeries:o,secondarySeries:a}=i.meta,s=i.query.series(ts.TYPE.LINE),l=[...Es({forceCreate:!0,key:es.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:r,layoutService:t}),...Es({key:es.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:r,layoutService:t}),...Es({key:es.COLLECTION.LINE,series:s,fieldModel:n,colorService:r,layoutService:t}),...bs({key:es.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:r,series:o}),...bs({key:es.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:r,series:a}),...Cs({key:es.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...Cs({key:es.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return cl(e)&&(l.push(...Es({key:es.COLLECTION.REDUCED,source:es.DATA.REDUCED,series:i.query.all(),fieldModel:n,colorService:r,layoutService:t})),l.push(...Es({key:es.COLLECTION.REDUCED_PRIMARY,source:es.DATA.REDUCED,series:o,fieldModel:n,colorService:r,layoutService:t})),l.push(...Es({key:es.COLLECTION.REDUCED_SECONDARY,source:es.DATA.REDUCED,series:a,fieldModel:n,colorService:r,layoutService:t})),l.push(...bs({key:es.COLLECTION.REDUCED_STACKED_PRIMARY,source:es.DATA.REDUCED,layoutService:t,fieldModel:n,series:i.meta.primarySeries.filter((e=>e.type===ts.TYPE.BAR)),colorService:r})),l.push(...bs({key:es.COLLECTION.REDUCED_STACKED_SECONDARY,source:es.DATA.REDUCED,layoutService:t,fieldModel:n,series:i.meta.secondarySeries.filter((e=>e.type===ts.TYPE.BAR)),colorService:r}))),l}const ml=({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 hl({models:e}){const{dockService:t,seriesModel:n,layoutService:i}=e,r=2===n.meta.measureAxes.length;if(r)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!r){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===i.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 pl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:i,layoutService:r,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:ml({layoutService:r,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:i.query.getScaleRange,align:hl({models:e})}},fl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:i,layoutService:r,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:r.meta.groupSize,maxPxStep:ml({layoutService:r,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:i.query.getScaleRange,align:hl({models:e})}};function gl({viewState:e,models:t,environment:n}){const{fieldModel:i,dockService:r}=t,{orientation:o}=r.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:i.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 vl({viewCache:e,mainMajor:t}){return re(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function yl({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const i=t.get("qTimeAxisCache");return i[n]&&i[n][0]===e?i[n][1]:void 0},set:(e,n,i=0)=>{t.get("qTimeAxisCache")[i]=[e,n]},key:({distance:i})=>{const{min:r,max:o}=e.get("zoom"),a=(o-r)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[i,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Sl({picasso:e,viewState:t,viewCache:n,models:i,environment:r}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=i,{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"===r.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:yl({viewState:t,viewCache:n,layoutService:o})};return{[es.SCALE.MAJOR]:re(!0,{},m,{ticks:{level:"outer"}}),[es.SCALE.MAJOR_INNER]:re(!0,{},m,{ticks:{level:"inner"}})}}function Ml({picasso:e,models:t,viewState:n,viewCache:i,environment:r}){const{meta:o}=t.layoutService,a=o.isTime?{...Sl({picasso:e,viewState:n,viewCache:i,models:t,environment:r})}:o.isContinuous?{[es.SCALE.MAJOR]:gl({models:t,viewState:n,environment:r})}:o.isBarSeriesGrouped?{[es.SCALE.MAJOR]:fl({models:t,environment:r})}:{[es.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?fl({models:t,environment:r}):pl({models:t,environment:r})};return cl(t)?{...a,[es.SCALE.REDUCED]:vl({viewCache:i,mainMajor:a[es.SCALE.MAJOR]})}:a}function xl({fields:e,tickModel:t,dockService:n,environment:i}){const r="rtl"===i.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||r,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function bl({layoutService:e,tickModel:t,dockService:n,environment:i}){if(!cl({layoutService:e}))return;const r="rtl"===i.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||r,min:t.query.getMin,max:t.query.getMax}}var El={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 Cl=["all","labels"];function Al({models:e,flags:t}){const{layoutService:n,dockService:i,seriesModel:r,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}=r.meta;return d.filter((e=>{const t=e.isPrimary?0:1;return Cl.some((e=>l[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?es.COMPONENT.AXIS.MINOR.PRIMARY:es.COMPONENT.AXIS.MINOR.SECONDARY,renderer:Ra(t),scale:e.scale,layout:{dock:e.isPrimary?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:El.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:Ma.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?i.meta.minor.dock:i.meta.minorSecondary.dock})}})))}var Nl={INACTIVE:.5},Ol={LOWER:3,UPPER:13};const Tl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),i=n?n.qMatrix:[];return Ee.getAdjustedMaxGlyphCount(t,i,0,"qText")};function Ll({models:e,environment:t,flags:n}){const{layoutService:i,dockService:r,styleModel:o,themeService:a,animationsModel:s}=e,l="rtl"===t.options.direction,u=i.getLayoutValue("dimensionAxis"),c=o.query.axis.label.getStyle(),d=Tl({layoutService:i}),{orientation:m}=r.meta.major,h="horizontal"===m,p=h?u.label:"auto",f=a.getStyles(),{auto:g,spacing:v}=i.getLayoutValue("gridLine",{});return{type:"axis",key:es.COMPONENT.AXIS.MAJOR,renderer:Ra(n),scale:es.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:El.AXIS.MAJOR[m.toUpperCase()]},settings:{labels:{mode:u.label,tiltAngle:l?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===p?void 0:r.meta.minor.size/4,maxGlyphCount:d,tiltThreshold:d>Ol.LOWER&&d<Ol.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:Nl.INACTIVE}}}]},animations:{enabled:s.enabled,trackBy:Ma.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isHorizontal:h})}}}function Il({models:e,flags:t}){const{dockService:n,styleModel:i,themeService:r,layoutService:o,animationsModel:a}=e,{orientation:s}=n.meta.major,l=i.query.axis.label.getStyle(),u=r.getStyles(),{auto:c,spacing:d}=o.getLayoutValue("gridLine",{});return{type:"axis",key:es.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:Ra(t),scale:es.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:El.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:Ma.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Rl({models:e,environment:t,flags:n}){const{layoutService:i}=e,r=i.getLayoutValue("dimensionAxis");if(!r)return[];const{show:o}=r;return"none"===o||"title"===o?[]:i.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:i,styleModel:r,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,u="bottom"===n.meta.major.dock?0:1,c=i.getStyles(),d=r.query.axis.label.getStyle(),m=s?1:0,{auto:h,spacing:p}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:El.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:Ma.axes.trackBy({isTime:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isTime:!0})}};return[re(!0,{},f,{key:es.COMPONENT.AXIS.TIME_INNER,scale:es.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!h&&0===p}},style:{majorGuideLine:{stroke:c.axis.line.minor.color},minorGuideLine:{stroke:c.axis.line.major.color},line:{stroke:c.axis.line.major.color}}}),re(!0,{},f,{key:es.COMPONENT.AXIS.TIME_OUTER,scale:es.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):i.meta.isContinuous?[Il({models:e,flags:n})]:[Ll({models:e,environment:t,flags:n})]}const wl=({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,kl=({layoutService:e,seriesModel:t,rtl:n,orientation:i})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:r})=>e([r.value,n&&"horizontal"===i?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===i?1:0])+e.bandwidth():null;function ql({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:Nl.INACTIVE},...n}}}]}}var Dl="max",Pl="min";function zl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i}(e,t)}const $l=(e,t)=>`${e}-${t.id}`,_l=4,Fl=12,Bl=4;function jl({chart:e,layoutService:t,dockService:n,markerKey:i,markerType:r}){if(t.meta.isContinuous)return()=>`${Bl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(i),s=t.resources.scale(es.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(_l,Math.min(Fl,l));o.size=`${"bar"===r?2*u:u}px`}return o.size}}const Vl=({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:Hl}=Ot;const Ul=({chart:e,models:t,series:n,environment:i})=>{const{layoutService:r,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,animationsModel:c}=t,d=a.getColor(),{fill:m,marker:h}=n.options,{isContinuous:p}=r.meta,f="rtl"===i.options.direction,{orientation:g}=s.meta.major,v="horizontal"===g,y=(n.isPrimary?l:u).query.getExtrema(),S=({end:e})=>{const{value:t}=e;return zl(t,y)},M=$l(es.COMPONENT.MARKER,n);return{type:"point",key:M,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[v?"x":"y"]:{scale:es.SCALE.MAJOR,fn:kl({layoutService:r,seriesModel:o,rtl:f,orientation:g}),ref:p?"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,i=e.scale(n);return r=i,Math.min(Math.max(0,r),1);var r}},fill:m||"bar"===h?d:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||S(e.datum)?0:1},stroke:e=>{const t=d(e);return m?Hl(t)?Je(t).brighter(.5).toString():function(e){return Je(e).darker().toString()}(t):t},size:jl({chart:e,layoutService:r,dockService:s,markerKey:M,markerType:h}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let i;return"triangle"!==e||t||(i=n?"left":"right"),"bar"===e&&(i=t?"horizontal":"vertical"),i?{type:e,direction:i}:{type:e}})({marker:h,horizontal:v,rtl:f})},brush:ql({layoutService:r,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:Nl.INACTIVE}}}),animations:{enabled:c.enabled,isMainComponent:Vl({series:n}),trackBy:Ma.markers.trackBy,compensateForLayoutChanges:Ma.markers.compensateForLayoutChanges}}};function Yl({property:e="end",isHorizontal:t,isColor:n,fallback:i,rtl:r}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(es.SCALE.MAJOR),u=s(es.SCALE.COLOR),c=t&&r?[...a.points].reverse():a.points,d=c.reduce(((t,n,i)=>{const r="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[i+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return r?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),h=d.map(m),p=Math.min(...h),f=Math.max(...h)-p,g=0===f?1:f,v=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-p)/g)),y=[];for(let t=0;t<d.length;t++){const r=d[t],o=r.color&&r.color.value,a=n?o||i:u(o)||i,s=0===t,l=t===d.length-1,c=v[t];if("NaN"===r[e].value||Number.isNaN(r[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 i=d[t+1];i&&"NaN"!==i[e].value&&!Number.isNaN(i[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 S=y.reduce(((e,t,n)=>{if(t.virtual){const t=y[n-1],i=y[n+1],r=t.offset+(i.offset-t.offset)/2;e.push({color:t.color,offset:r},{color:i.color,offset:r})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:S}}}function Wl({environment:e,models:t,measureIndex:n}){const{layoutService:i,colorService:r,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=i.meta,{mode:l,type:u,nil:c}=r.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return r.getColor();if("measure"===l&&"categorical"===u)return r.getColor();const m=i.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?Yl({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):r.getColor();const h=i.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,f=!!h.colorExpression;if(p&&!f)return c;const g=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!g?Yl({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:i},resources:{scale:r}}=n,o=r(es.SCALE.COLOR),a=i.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:i}){return function(r){const{datum:{points:o},resources:{scale:a}}=r,s=a(es.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,h=0===m?1:m,p=s.domain(),f=[];for(let e=0;e<p.length-1;e++){const t=p[e],i=s(t)||n;f.push({color:i,offset:Math.min(1,Math.max(0,(t-d)/h))});const r=p[e+1];f.push({color:i,offset:Math.min(1,Math.max(0,(r-d)/h))})}return{type:"gradient",x1:!e&&i?1:0,x2:e||i?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:d,fallback:c,rtl:a})}const Xl=({models:e,environment:t,series:n})=>{const{layoutService:i,seriesModel:r,dockService:o,styleModel:a,animationsModel:s}=e,l="rtl"===t.options.direction,{orientation:u}=o.meta.major,c=kl({layoutService:i,seriesModel:r,rtl:l,orientation:u});return{key:$l(es.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:es.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Wl({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:ql({layoutService:i,active:{stroke:void 0,strokeWidth:void 0,opacity:Nl.INACTIVE},inactive:{opacity:Nl.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!Vl({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}};var Kl={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 Gl({series:e,layoutService:t}){const{showAsConnections:n}=e.options,i=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}),r=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!i({item:e}))):(e,t)=>0!==e&&!i({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!i({item:e}))):(e,t)=>e!==t.length-1&&!i({item:t[e+1]});return({index:e,items:t})=>({before:r(e,t),after:o(e,t)})}const Jl=3,Zl=20;function Ql({models:e,series:t,environment:n}){const{layoutService:i,colorService:r,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c,animationsModel:d}=e,m=i.getLayoutValue("dataPoint.show",!1),{orientation:h}=a.meta.major,p="horizontal"===h,f="SPARK"===a.meta.chart.mode,g=r.getColor(),{POINT:v}=Kl,y=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},i=Gl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return 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}),{})}({items:t}));const{value:r}=e.line,o=n.map[r],a=`${e.major.value}-${r}`,s=o.keys.indexOf(a),{before:l,after:u}=i({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:i}),S="rtl"===n.options.direction,M=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:x}=i.meta,b=({end:e})=>{const{value:t}=e;return zl(t,M)};return{type:"point",key:$l(es.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:p?v.SIZE.DEFAULT/2:0}}),settings:{[p?"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,i=e.scale(n);return r=i,Math.min(Math.max(0,r),1);var r}},[p?"x":"y"]:{scale:es.SCALE.MAJOR,fn:kl({layoutService:i,seriesModel:o,rtl:S,orientation:h}),ref:"major"},sizeLimits:{minPx:Jl,maxPx:Zl},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||b(e)?0:f?y({item:e,items:t.items})?1:0:m||y({item:e,items:t.items})?1:0}},brush:ql({layoutService:i,active:{r:e=>e.r+Kl.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)||b(e.data))return 0;if(!x||m)return 1;const{event:n,components:i=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;return[es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>i.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:d.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.points.compensateForLayoutChanges}}}const eu=(e,{dataset:t},n=!1)=>{const{value:i,label:r,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return he.shouldUseFormat(a.raw())?a.formatter()(i):r};function tu({chart:e,models:t,environment:n,flags:i,lineSeries:r}){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(!r.length)return!1;const h=s.query.point.label.getStyle();return{type:"point-label",key:es.COMPONENT.POINT_LABEL,renderer:Ra(i),layout:{displayOrder:2,minimumLayoutMode:El.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>eu(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map((e=>({key:`${es.COMPONENT.POINT}-${e.id}`,labels:!0,lines:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(r.find((e=>e.id===t)).isPrimary?l:u).query.getExtrema();return!zl(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(es.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:h.fontFamily,fontSize:h.fontSize,fill:h.fill},animations:{enabled:c.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}}const nu=({chart:e,models:t,environment:n,flags:i,markerSeries:r})=>{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(),h=o.getLayoutValue("dataPoint");return!(null==h||!h.showMarkerLabels)&&(!!r.length&&{type:"point-label",key:es.COMPONENT.MARKER_LABEL,renderer:Ra(i),layout:{displayOrder:2,minimumLayoutMode:El.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>eu(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map((e=>({key:`${es.COMPONENT.MARKER}-${e.id}`,labels:!0,lines:!1,fixed:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(r.find((e=>e.id===t)).isPrimary?l:u).query.getExtrema();return!zl(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(es.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:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}})},iu=({chart:e,dock:t})=>{let n=t;const i=e.component(`${es.COMPONENT.SLICED_HAT}-${Dl}`),r=e.component(`${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.PRIMARY}`),o=e.component(`${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.SECONDARY}`);return i?n=`@${es.COMPONENT.SLICED_HAT}-${Dl}`:r?n=`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.PRIMARY}`:o&&(n=`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.SECONDARY}`),n},ru=({dockPosition:e,orientation:t,rtl:n})=>{let i=1;return e!==`@${es.COMPONENT.SLICED_HAT}-${Dl}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.PRIMARY}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(i=4),e!==`@${es.COMPONENT.SLICED_HAT}-${Pl}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Pl}-${ts.AXIS.PRIMARY}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Pl}-${ts.AXIS.SECONDARY}`||"vertical"!==t||n||(i=4),i};function ou({chart:e,models:t,environment:n,lineSeries:i}){const{layoutService:r,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=r.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!i.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=r.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:es.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:El.LABEL_SPACE,dock:iu({chart:e,dock:c?"top":m})},settings:{size:10},preferredSize:()=>{const t=e.component(`${es.COMPONENT.LINE}-${i[0].id}`);if(null==t||!t.rect)return 0;const n=(c?17:34)/t.rect[c?"height":"width"],r=a.query.getExtrema(),o=e.scale(es.SCALE.MINOR.PRIMARY)(r.implicit.line.max),l=c||u?o:1-o,d=i.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),h=e.scale(es.SCALE.MINOR.SECONDARY)(m.implicit.line.max),p=c||u?h:1-h,f=i.filter((e=>!e.isPrimary)).length>0;return d&&l<n||f&&p<n?10:0}}}const au={min:"Min",max:"Max"};function su(e,t,n){const{hasExplicitMax:i}=n.meta,{max:r}=n.explicit;return!!i&&Math.max(e,t)>r&&r<=Math.min(e,t)}function lu(e,t,n){const{hasExplicitMin:i}=n.meta,{min:r}=n.explicit;return!!i&&Math.min(e,t)<r&&r>=Math.max(e,t)}function uu(e,t,n){return su(e,t,n)||lu(e,t,n)}function cu(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i&&i<=0}function du(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i&&i>=0}function mu(e,t){return cu(e,t)||du(e,t)}function hu({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${au[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Dl?e.implicit.bar.max:e.implicit.bar.min,i=Number(n.toFixed(13));return t===Dl?!cu(i,e):!du(i,e)}({extrema:e,type:t}))}var pu=Object.freeze({__proto__:null,isMaxOutOfBounds:cu,isMinOutOfBounds:du,isOutOfBounds:mu,isSegmentMaxOutOfBounds:su,isSegmentMinOutOfBounds:lu,isSegmentOutOfBounds:uu,shouldShowOob:hu});const fu={min:"Min",max:"Max"},gu=({chart:e,models:t,markerSeries:n,lineSeries:i,barSeries:r,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:m,seriesModel:h,themeService:p,fieldModel:f,animationsModel:g}=t,v="rtl"===o.options.direction,{dock:y,opposite:S,orientation:M}=s.meta.major,x=l.query.getExtrema(),b=u.query.getExtrema(),E=a===Dl,{isBarSeriesGrouped:C}=m.meta,A=(({chart:e,type:t,opposite:n,dock:i})=>{let r=t===Dl?n:i;const o=e.component(`${es.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),s=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`),l=e.component(es.COMPONENT.LABEL_SPACE),u=e.component(`${es.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`),d=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.SECONDARY}`);return o?r=`@${es.COMPONENT.SLICED_HAT}-${t}`:a?r=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`:s?r=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`:u||c||d?l&&t===Dl?r=`@${es.COMPONENT.LABEL_SPACE}`:u?r=`@${es.COMPONENT.BAR_OOB}-${t}`:c?r=`@${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`:d&&(r=`@${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.SECONDARY}`):l&&t===Dl&&(r=`@${es.COMPONENT.LABEL_SPACE}`),r})({chart:e,type:a,opposite:S,dock:y}),N=kl({layoutService:m,seriesModel:h,rtl:v,orientation:M}),O=i.concat(n);if(!O.length)return!1;const T=E?x.implicit.bar.max:x.implicit.bar.min,L=Number(T.toFixed(13));if(!C&&r.length&&pu[`is${fu[a]}OutOfBounds`](L,x))return!1;if(!x.meta.hasExplicit&&!b.meta.hasExplicit)return!1;const I=E?"max":"min",R=Math[I](Number(x.implicit.line[I].toFixed(13)),Number(x.implicit.marker[I].toFixed(13))),w=Math[I](Number(b.implicit.line[I].toFixed(13)),Number(b.implicit.marker[I].toFixed(13))),k=O.filter((e=>e.isPrimary)),q=O.filter((e=>!e.isPrimary)),D=k.length>0,P=q.length>0,{major:z,majorNumeric:$}=f.main,_=e=>"NaN"!==e.qNum?e.qNum:0,F=m.meta.isContinuous?$:z;return{type:"data-out-of-bounds-marker",key:`${es.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:A,minimumLayoutMode:El.OUT_OF_BOUNDS_MARKER},data:{extract:O.map((({ref:e,typeIndex:t,options:n})=>({field:z,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:F},end:{field:e,value:n.showAsZeros?_:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:k,secondarySeries:q,orientation:M,rtl:v,major:{scale:es.SCALE.MAJOR,fn:N},markerOffset:ru({dockPosition:A,orientation:M,rtl:v})},brush:ql({layoutService:m}),show:()=>{if(E){if(D&&R>c.query.getMax())return!0;if(P&&w>d.query.getMax())return!0}if(!E){if(D&&R<c.query.getMin())return!0;if(P&&w<d.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:Ma.lineOobs.compensateForLayoutChanges}}},vu={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function yu({chart:e,models:t,viewState:n,viewCache:i,axis:r}){const o=A(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${es.COMPONENT.BAR}-${r}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=vu[a.meta.chart.mode];return 0===Math.abs(i.get("continuousMax")-i.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),r=Math.abs(i.get("continuousMax")-i.get("continuousMin")),s=Math.abs(t-e),l=vu[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/r/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Su=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:i,isBarSeriesStackedInBothAxis:r})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/i.query.getItemSize(),t=n.query.bar.getWidthFn()(),r=t+e;return r>1?t-(r-1):t}:n.query.bar.getWidthFn():t||r?.9:.7;function Mu(e){return Math.min(Math.max(0,e),1)}const xu=({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:m,animationsModel:h}=t,{isContinuous:p,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:v}=o.meta,y=e=>e.datum.start?e.datum.start.value:e.scale.min(),S=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,M=r?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY;if(!(r?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=f?{scale:M,start:{ref:"start",fn:e=>{const t=y(e);return Mu(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:y(e))(e);return Mu(e.scale(t))}}}:{scale:M,start:{ref:"start",fn:e=>{const t=y(e);return Mu(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 Mu(e.scale(n))}}},b=(r?d:m).query.getExtrema(),E=f?({start:e,end:t})=>uu(e.value,t.value,b):({end:e})=>mu(e.value,b);return{type:"box",key:`${es.COMPONENT.BAR}-${S}`,data:{filter:(()=>{if(f)return;const e=l.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?r?es.COLLECTION.STACKED_PRIMARY:es.COLLECTION.STACKED_SECONDARY:r?es.COLLECTION.PRIMARY:es.COLLECTION.SECONDARY},preferredSize:p?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:es.SCALE.MAJOR,fn:wl({layoutService:o,axis:S}),ref:p?{start:"major",end:"major"}:void 0},minor:x,box:{width:Su({isContinuous:p,isBarSeriesGrouped:g,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:v}),minWidthPx:p?yu({chart:e,models:t,viewState:n,viewCache:i,axis:S}):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)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:ql({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:Nl.INACTIVE}}}),animations:{enabled:h.enabled,isMainComponent:Vl({isPrimary:r,seriesModel:l}),trackBy:Ma.bars.trackBy,compensateForLayoutChanges:Ma.bars.compensateForLayoutChanges}}},bu=({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,f=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,g=r?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${es.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:r?es.COLLECTION.STACKED_TOTAL_PRIMARY:es.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:es.SCALE.MAJOR,fn:wl({layoutService:o,axis:f}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:r?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Su({isContinuous:m,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:p}),minWidthPx:m?yu({chart:e,models:t,viewState:n,viewCache:i,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Eu(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:i}=t,r=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map((e=>{const t=r.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Ot.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:i,simplifiedPlacement:e}):r.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const i=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:i}}({simplifiedPlacement:e,fill:t,isHorizontal:n})})),label:t.label}}function Cu(e,t,n,i){const r=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,i);let o="up";return"vertical"===t&&r<0?o="down":"horizontal"===t&&(o=r>=0&&!n||r<0&&n?"right":"left"),o}const Au=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:i}=e;if(!n)return!1;const{isBarSeriesStacked:r,isContinuous:o}=t;return!r||!o&&!!i},Nu=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:i}=e;if(!n)return!1;const{isBarSeriesStacked:r,isContinuous:o}=t;return!!r&&(!!o||!1!==i)};function Ou(e,t,n,i){const r=[];return void 0!==e&&(r[e]={position:"outside",onBackground:!0,justify:0,overflow:i}),void 0!==t&&(r[t]={position:"inside",onBackground:!1,justify:n}),r}const Tu=({models:e,environment:t,flags:n,isPrimary:i})=>{const{layoutService:r,seriesModel:o,styleModel:a,themeService:s,animationsModel:l}=e,{meta:u}=r,{isBarSeriesStacked:c}=u,d="rtl"===t.options.direction,m=s.getStyles(),h=a.query.bar.label.getStyle(),p=e.layoutService.getLayoutValue("dataPoint",{}),f=i?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(!(i?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!Au(p,u))return!1;let g;!c&&(g=c?1:0);const v={label:e=>eu(e.data,e,c),simplifiedPlacements:Ou(g,0===g?1:0,c?.5:1,u.isContinuous),style:m.label.value},y=[Eu(e,v)],S=[{component:`${es.COMPONENT.BAR}-${f}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Cu(t.data.end.value,e.dockService.meta.minor.orientation,d,0),labels:y,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{type:"labels",key:`${es.COMPONENT.BAR_LABEL}-${f}`,renderer:Ra(n),layout:{minimumLayoutMode:El.VALUE_LABEL},settings:{sources:S},animations:{enabled:l.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}};function Lu(e,t,n,i){const r=[{position:e,onBackground:!0,justify:0,overflow:i}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return r}function Iu({chart:e,models:t,environment:n,flags:i,isPrimary:r}){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=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Nu(u,o))return!1;const d=!Au(u,o),m=l.useContrastColor,h=e.formatter(r?es.FORMATTER.PRIMARY:es.FORMATTER.SECONDARY)||(e=>e),p=e=>h(e),f={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value),simplifiedPlacements:Lu("outside",d,m,o.isContinuous),style:s.label.value},g={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value),simplifiedPlacements:Lu("opposite",d,m,o.isContinuous),style:s.label.value},v=[Eu(t,f),Eu(t,g)];return{type:"labels",key:`${es.COMPONENT.STACK_BAR_LABEL}-${c}`,renderer:Ra(i),layout:{displayOrder:2,minimumLayoutMode:El.VALUE_LABEL},settings:{sources:[{component:`${es.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Cu(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:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}}var Ru=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i&&i>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i&&i<0}});const wu={min:"Min",max:"Max"};function ku({chart:e,models:t,type:n,viewCache:i,viewState:r,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f}=a.meta,g=m?bu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}):xu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}),v=o?l.query.getExtrema():u.query.getExtrema(),y=n===Dl,S=o?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${wu[t]}`]}(v,n)||function(e,t,n){const i=n?e.implicit.bar.max:e.implicit.bar.min,r=Number(i.toFixed(13));return!Ru[`has${wu[t]}Hat`](r,e)}(v,n,y)||function(e,t,n){const i=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${wu[t]}`]&&i(e.explicit[t])}(v,n,y))return!1;let M="end";m&&(M=y?"sumOfPositives":"sumOfNegatives");const x=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY)[n]()));const b=(({chart:e,type:t,isPrimary:n,dock:i})=>{let r=i;const o=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),a=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`);return o&&a&&(r=n?i:`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),r})({chart:e,type:n,isPrimary:o,dock:y?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${es.COMPONENT.SLICED_HAT}-${n}-${S}`,layout:{dock:b},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:re({},g.settings.box,{fill:m?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=x(),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[M].value);return y?n>t:n<t},width:Su({isContinuous:h,isBarSeriesGrouped:p,styleModel:c,discreteModel:d,isBarSeriesStackedInBothAxis:f}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:ql({layoutService:a})}}const qu={min:"Min",max:"Max"},Du={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Pu({chart:e,models:t,type:n,viewCache:i,viewState:r,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c,animationsModel:d}=t,{end:m,start:h}=s.meta.minor,{isBarSeriesStacked:p}=a.meta,f=p?bu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}):xu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}),g=o?l.query.getExtrema():u.query.getExtrema(),v=n===Dl?g.implicit.bar.max:g.implicit.bar.min,y=Number(v.toFixed(13)),S=o?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(!f)return!1;if(!pu[`is${qu[n]}OutOfBounds`](y,g))return!1;const M=(({chart:e,type:t,end:n,start:i,isPrimary:r})=>{let o=t===Dl?n:i;const a=e.component(es.COMPONENT.LABEL_SPACE),s=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),l=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`),u=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`),c=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.SECONDARY}`);return s?o=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`:l?o=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`:u&&c&&!r?o=`@${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`:a&&t===Dl&&(o=`@${es.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:m,start:h,isPrimary:o});let x="end";p&&(x=n===Dl?"sumOfPositives":"sumOfNegatives");const b={type:"box-out-of-bounds",key:`${es.COMPONENT.BAR_OOB}-${n}-${S}`,layout:{dock:M},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:Me.getDockValue(n===Dl?m:h),oob:re({},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 i=p&&0===e.datum[x].value,r=pu[`is${qu[n]}OutOfBounds`](e.datum[x].value,g,n),o=(!i||function({type:e,item:t,prop:n,extrema:i}){const r=t.datum[Du[n]].value;return 0!==r&&pu[`is${qu[e]}OutOfBounds`](r,i,e)}({type:n,item:e,prop:x,extrema:g}))&&r;return o}})},brush:ql({layoutService:a}),animations:{enabled:d.enabled,compensateForLayoutChanges:Ma.barOobs.compensateForLayoutChanges}};return b}function zu(e){return Math.min(Math.max(0,e),1)}const $u=({chart:e,models:t,type:n,isPrimary:i})=>{const{discreteModel:r,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(i?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(i?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY),h=i?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,p=i?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Dl;if(!hu({extrema:p,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);return{type:"box",key:`${es.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?i?es.COLLECTION.STACKED_TOTAL_PRIMARY:es.COLLECTION.STACKED_TOTAL_SECONDARY:i?es.COLLECTION.PRIMARY:es.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:es.SCALE.MAJOR,fn:wl({layoutService:s,axis:h}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:i?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return zu(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return zu(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return zu(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return zu(e.scale(t))}}},box:{width:Su({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:r,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}}}};function _u(e,t,n,i,r){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:i||r?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Fu=({chart:e,models:t,type:n,environment:i,flags:r,isPrimary:o})=>{const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,seriesModel:d,themeService:m,animationsModel:h}=t,p=m.getStyles(),f=c.query.bar.label.getStyle(),{meta:g}=a,{isBarSeriesStacked:v}=g,y=e.formatter(o?es.FORMATTER.PRIMARY:es.FORMATTER.SECONDARY),S=a.getLayoutValue("dataPoint",{}),M="horizontal"===s.meta.major.orientation,x="rtl"===i.options.direction;if(!(o?d.meta.primaryBarSeriesCount:d.meta.secondaryBarSeriesCount)||!v&&!Au(S,g)||v&&!Nu(S,g))return!1;const b=o?l.query.getExtrema():u.query.getExtrema();if(!b.meta.hasExplicit)return!1;const E=n===Dl?b.implicit.bar.max:b.implicit.bar.min;if(!(n===Dl?cu(E,b):du(E,b)))return!1;let C=e=>eu(e.data,e);g.isBarSeriesStacked&&(C=n===Dl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(cu(e.data.sumOfNegatives.value,b)){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(du(e.data.sumOfPositives.value,b)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return y?y(t):t}return""});const A={label:C,simplifiedPlacements:_u("outside",0,g.isContinuous,M,x),style:p.label.value},N={label:C,simplifiedPlacements:_u("opposite",0,g.isContinuous,M,x),style:p.label.value},O=[Eu(t,A),Eu(t,N)],T=o?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,L="horizontal"===s.meta.major.orientation?"down":"right",I=[{component:`${es.COMPONENT.GHOST_BAR_OOB}-${n}-${T}`,selector:"rect",strategy:{type:"bar",settings:{direction:L,labels:O,fontSize:parseInt(f.fontSize,10),fontFamily:f.fontFamily}}}];return{key:`${es.COMPONENT.BAR_OOB_LABEL}-${n}-${T}`,type:"labels",renderer:Ra(r),layout:{minimumLayoutMode:El.VALUE_LABEL},settings:{sources:I},animations:{enabled:h.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}},Bu=({chart:e,models:t,viewState:n,viewCache:i})=>[xu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),xu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1})],ju=({chart:e,models:t,viewState:n,viewCache:i})=>[bu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),bu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1})],Vu=({chart:e,models:t,environment:n,flags:i})=>{const r=Iu({chart:e,models:t,environment:n,flags:i,isPrimary:!0}),o=Iu({chart:e,models:t,environment:n,flags:i,isPrimary:!1});return[Tu({models:t,environment:n,flags:i,isPrimary:!0}),Tu({models:t,environment:n,flags:i,isPrimary:!1}),r,o]},Hu=({chart:e,models:t,viewCache:n,viewState:i})=>[ku({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!0}),ku({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!0}),ku({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!1}),ku({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!1})],Uu=({chart:e,models:t,viewCache:n,viewState:i})=>[Pu({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!0}),Pu({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!0}),Pu({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!1}),Pu({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!1})],Yu=({chart:e,models:t})=>[$u({chart:e,models:t,type:"max",isPrimary:!0}),$u({chart:e,models:t,type:"min",isPrimary:!0}),$u({chart:e,models:t,type:"max",isPrimary:!1}),$u({chart:e,models:t,type:"min",isPrimary:!1})],Wu=({chart:e,models:t,environment:n,flags:i})=>[Fu({chart:e,models:t,type:"max",environment:n,flags:i,isPrimary:!0}),Fu({chart:e,models:t,type:"min",environment:n,flags:i,isPrimary:!0}),Fu({chart:e,models:t,type:"max",environment:n,flags:i,isPrimary:!1}),Fu({chart:e,models:t,type:"min",environment:n,flags:i,isPrimary:!1})],Xu=({chart:e,environment:t,flags:n,models:i,viewState:r,viewCache:o})=>{const{seriesModel:a}=i,s=a.query.series(ts.TYPE.BAR).slice(-1),l=a.query.series(ts.TYPE.LINE),u=a.query.series(ts.TYPE.MARKER);return[...Bu({chart:e,models:i,viewState:r,viewCache:o}),...ju({chart:e,models:i,viewState:r,viewCache:o}),...l.map((e=>Xl({models:i,environment:t,series:e}))),...l.map((e=>Ql({models:i,series:e,environment:t}))),...u.map((n=>Ul({chart:e,models:i,series:n,environment:t}))),tu({chart:e,models:i,environment:t,flags:n,lineSeries:l}),nu({chart:e,models:i,environment:t,flags:n,markerSeries:u}),...Vu({chart:e,models:i,environment:t,flags:n}),...Hu({chart:e,models:i,viewCache:o,viewState:r}),...Uu({chart:e,models:i,viewCache:o,viewState:r}),...Yu({chart:e,models:i}),...Wu({chart:e,models:i,environment:t,flags:n}),gu({chart:e,models:i,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"max"}),gu({chart:e,models:i,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"min"}),ou({chart:e,models:i,environment:t,lineSeries:l})]},Ku={NONE:0,WIDE:1,NARROW:3};function Gu({models:e}){const{dockService:t,seriesModel:n,layoutService:i,themeService:r,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=i.getLayoutValue("gridLine",{});if(!a&&s===Ku.NONE)return!1;const u=r.getStyles(),c=n.meta.primarySeries.length>0;return{key:es.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:El.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===Ku.WIDE)||((e,t)=>t%2==0),stroke:u.grid.line.major.color},minorTicks:{show:!a&&s===Ku.NARROW,stroke:u.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(null!=l?l:0)&&c?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}}function Ju({models:e}){var t,n;const{primaryExtremumModel:i,primaryTickModel:r,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),h=i.query.getExtrema(),p=l.query.getExtrema();if(!h.meta.includesZero&&!p.meta.includesZero)return!1;return{key:es.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:El.GRID_LINE},show:()=>(()=>{const e=s.meta.primarySeries.length>0,t=s.meta.secondarySeries.length>0;return m&&e&&r.query.getMin()<=0&&r.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?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,line:{stroke:o.getStyles().grid.line.highContrast.color}}]},animations:{enabled:d.enabled,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}}function Zu({models:e}){const{layoutService:t,themeService:n,animationsModel:i}=e,{isContinuous:r,isTime:o}=t.meta;if(!r)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:El.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:i.enabled,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}};return o?[re(!0,{},s,{key:"time-inner-grid",x:{scale:es.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),re(!0,{},s,{key:"time-outer-grid",x:{scale:es.SCALE.MAJOR}})]:[re(!0,{},s,{key:"continuous-grid",x:{scale:es.SCALE.MAJOR},minorTicks:{show:!0}})]}function Qu({models:e}){return[Gu({models:e}),Ju({models:e}),...Zu({models:e})]}function ec({models:e,environment:t,actions:n,viewCache:i,flags:r}){const{alternativeService:o,layoutService:a,dockService:s,appModel:l,genericObjectModel:u,selectionService:c,styleModel:d}=e,m=a.getLayoutValue("dimensionAxis");if(!m)return!1;const{show:h}=m;if("all"!==h&&"title"!==h)return!1;const p=o.getAlternatives(),{orientation:f}=s.meta.major,g=d.query.axis.title.getStyle();return{type:"axis-title",key:es.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:s.meta.major.dock,minimumLayoutMode:El.AXIS_TITLE.MAJOR[f.toUpperCase()]},data:{infos:a.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:l,cache:i,model:u,selections:c.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:r.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:g.color,fontFamily:g.fontFamily,fontSize:g.fontSize}}}}const tc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function nc({models:e,environment:t,actions:n,viewCache:i,flags:r}){const{alternativeService:o,layoutService:a,dockService:s,seriesModel:l,appModel:u,genericObjectModel:c,selectionService:d,styleModel:m}=e,h=a.getLayoutValue("measureAxes");if(!h||!h.length)return[];const p=o.getAlternatives(),f=m.query.axis.title.getStyle(),{measureAxes:g}=l.meta;return g.filter((e=>e.isPrimary?"all"===h[0].show||"title"===h[0].show:"all"===h[1].show||"title"===h[1].show)).map((e=>{const o=a.getHyperCube(),{isPrimary:m}=e;return{type:"axis-title",key:m?es.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:es.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:m?s.meta.minor.dock:s.meta.minorSecondary.dock,minimumLayoutMode:El.AXIS_TITLE.MINOR},data:{infos:tc(l,o.qMeasureInfo,m),alternatives:p.measures},resources:{app:u,cache:i,model:c,selections:d.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 i=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(i)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:r.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:f.fontFamily,fontSize:f.fontSize,color:f.color}}}}))}function ic({models:e,environment:t,actions:n,viewCache:i,flags:r}){return[ec({models:e,environment:t,actions:n,viewCache:i,flags:r}),...nc({models:e,environment:t,actions:n,viewCache:i,flags:r})]}function rc({models:e,environment:t,viewState:n,viewCache:i}){const{discreteModel:r,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:i,viewState:r,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=Rs({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?i.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Ts({layoutService:e,viewState:r,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(h.settings.injections=()=>[Os({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:i,discrete:r,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>c,value:Ns.OPTIONS.BAR.value},deviceType:t.deviceType})}function oc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r}){const{layoutService:o}=t,a=xu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r});if(!a)return!1;const s=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;return a.key=`${es.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?r?es.COLLECTION.REDUCED_STACKED_PRIMARY:es.COLLECTION.REDUCED_STACKED_SECONDARY:r?es.COLLECTION.REDUCED_PRIMARY:es.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=r?es.SCALE.MINOR.REDUCED_PRIMARY:es.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=es.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function ac({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(ts.TYPE.LINE).map((i=>{const r=Xl({models:t,environment:e,series:i});return r.key=$l(es.COMPONENT.MINI_CHART.LINE,i),r.data.collection=es.COLLECTION.REDUCED,r.settings.coordinates.minor.scale=i.isPrimary?es.SCALE.MINOR.REDUCED_PRIMARY:es.SCALE.MINOR.REDUCED_SECONDARY,r.settings.coordinates.major.scale=es.SCALE.REDUCED,r.settings.layers.line.strokeWidth=1,r.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",r.layout={dock:"@scrollbar"},r}))}function sc({models:e,environment:t}){return e.seriesModel.query.series(ts.TYPE.MARKER).map((n=>{const i=Ul({models:e,environment:t,series:n});return i.key=$l(es.COMPONENT.MINI_CHART.MARKER,n),i.data.collection=es.COLLECTION.REDUCED,i.settings.y.scale=n.isPrimary?es.SCALE.MINOR.REDUCED_PRIMARY:es.SCALE.MINOR.REDUCED_SECONDARY,i.settings.x.scale=es.SCALE.REDUCED,i.layout={dock:"@scrollbar"},i}))}function lc({chart:e,models:t,viewState:n,viewCache:i,environment:r}){return cl(t)?[oc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),oc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1}),...ac({environment:r,models:t}),...sc({models:t,environment:r})]:[]}function uc({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:i,isTime:r}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!i)return[!1];const a=El.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return r?[{type:"axis-overlay",key:es.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:es.SCALE.MAJOR_INNER,layout:{dock:`@${es.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:es.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:es.SCALE.MAJOR,layout:{dock:`@${es.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:es.SCALE.MAJOR,layout:{dock:`@${es.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function cc({chart:e,models:t,environment:n}){const{refLineModel:i,layoutService:r,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u,animationsModel:c}=t,d=l.qLocaleInfo,{options:m,theme:h}=n,p="rtl"===m.direction,f=u.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary)),g=u.query.series(ts.TYPE.BAR).filter((e=>!e.isPrimary)),v=u.query.series(ts.TYPE.LINE),y=u.query.series(ts.TYPE.MARKER),S=u.query.all(),M=S.some((e=>e.isPrimary)),x=S.some((e=>!e.isPrimary)),b=M&&x,E={resolveUIColor:o.getPaletteColor},C=c.enabled,A=M?La({refLineModel:i,layoutService:r,colorModel:E,dock:b?a.meta.minor.dock:a.meta.minor.opposite,scale:es.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:es.FORMATTER.PRIMARY,theme:h,localeInfo:d,rtl:p,key:es.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],N=x?La({refLineModel:i,layoutService:r,colorModel:E,dock:b?a.meta.minor.opposite:a.meta.minor.dock,scale:es.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:es.FORMATTER.SECONDARY,theme:h,localeInfo:d,rtl:p,key:es.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!M&&Na({refLineModel:i,layoutService:r,colorModel:E,dockService:a,chart:e,scale:es.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:es.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:El.REFERENCE_LINE,animationsEnabled:C}),!!x&&Na({refLineModel:i,layoutService:r,colorModel:E,dockService:a,chart:e,scale:es.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:es.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:El.REFERENCE_LINE,animationsEnabled:C}),Na({isDimension:!0,refLineModel:i,layoutService:r,colorModel:E,dockService:a,chart:e,scale:es.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:p,key:es.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`:g.length?`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`:v.length?`${es.COMPONENT.LINE}-${v[0].id}`:y.length?`${es.COMPONENT.MARKER}-${y[0].id}`:`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,minimumLayoutMode:El.REFERENCE_LINE,animationsEnabled:C}),...A,...N,...La({isDimension:!0,refLineModel:i,layoutService:r,colorModel:E,dock:a.meta.major.opposite,scale:es.SCALE.MAJOR,style:s.getStyles(),theme:h,localeInfo:d,rtl:p,key:es.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function dc({layoutService:e}){return!!cl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:es.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function mc(e){return(null==e?void 0:e.type)||ts.TYPE.BAR}function hc({models:e,environment:t}){const{layoutService:n,colorService:i,dockService:r,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",{}),h=e=>e.filter((e=>mc(e)===ts.TYPE.LINE)).map((e=>({key:$l(es.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),p=!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:es.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:h(o.meta.primarySeries),secondary:h(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=>i.getSettingsForMeasure(e),colorByData:e=>!f[e]&&p,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:r.meta.major.orientation,rtl:"rtl"===d.direction}}}function pc({models:{fieldModel:e}}){return{[es.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[es.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var fc={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:gc}=fc;function vc({layoutService:e,largeDataService:t}){const{maxNumPoints:n=gc}=(null==t?void 0:t.meta)||{},{qHyperCube:i}=e.getLayout();return i.qSize.qcy*i.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:yc}=fc,Sc=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=yc}=(null==t?void 0:t.meta)||{},{qHyperCube:i}=e.getLayout();return i.qDimensionInfo.length>1&&!vc({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Mc}=fc,{MAX_NUM_POINTS:xc,DEFAULT_NUM_POINTS:bc,DEFAULT_NUM_LINES:Ec}=fc,{DEFAULT_NUM_POINTS:Cc}=fc,Ac=({layoutService:e,largeDataService:t})=>{if(!vc({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Cc}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:i=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:r=Ec,maxNumPoints:o=bc,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Sc({layoutService:e,largeDataService:t})*i[0]<=o)return i[0];const s=Math.max(1,Math.min(r,i[1])),l=o/s,u=Math.floor(i[0]<=l?l:l/4),c=2*s*(s+1);return a&&(s>Ec||o>bc)?Math.min(u,Math.ceil(xc/c)):u})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Mc}=(null==t?void 0:t.meta)||{},{measureCount:i=1}=(null==e?void 0:e.meta)||{},r=4+2*(i-1);return Math.floor(n/(i*r))})({layoutService:e,largeDataService:t})};function Nc({model:e,layoutService:t,largeDataService:n,definitionPath:i="/qHyperCubeDef"}){return{shouldFetchReduced:()=>vc({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Ac({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Sc({layoutService:t,largeDataService:n}),fetch:(r,o)=>(({start:e,end:t,model:n,layoutService:i,largeDataService:r,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:Ac({layoutService:i,largeDataService:r}),qMaxNbrTicks:300,qMaxNumberLines:Sc({layoutService:i,largeDataService:r})};return n.getHyperCubeContinuousData(o,a,!1)})({start:r,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:i})}}function Oc(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Tc({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 i=n+e,r=i+t;return 1===t&&0===e&&(i=n-.5,r=n+.5),{zoom:{min:i,max:r}}}(n,t.get("continuousMin"))}}}function Lc(){const e=()=>{},t=[],n={};return e.set=(e,i)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1),t.push(e),n[e]=i},e.forEach=e=>{t.forEach(((t,i)=>e(n[t],i)))},e.has=e=>e in n,e}function Ic(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const i=[],r=Lc(),o=Lc();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?r.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return r.forEach(((e,t)=>i.splice(t,0,e))),o.forEach((e=>i.push(e))),i}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const i=[];let r,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?r=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return r&&i.unshift(r),o&&i.push(o),i}({start:e,end:t,matrix:n})}function Rc(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function wc(e,t,n){const i={qDataPages:(n.qDataPages||[]).map((n=>{const i=Ic(e,t,n.qMatrix),r=Rc(n.qArea,i);return{...n,qArea:r,qMatrix:i}}))};return n.qAxisData&&n.qAxisData.qAxis&&(i.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,i)=>((i.qStart>=e&&i.qStart<=t||i.qEnd>=e&&i.qEnd<=t||i.qStart<e&&i.qEnd>t)&&n.push(i),n)),[])})))}}(e,t,n.qAxisData)),i}const kc=2**.5,qc=1/kc,Dc=qc**44;function Pc(e){return e.qIsOtherCell}function zc({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Pc)){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(Pc)||t++})),t}(n)}const $c={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var _c={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 i=t[e],r=t[e+1];i.data={},r||1===i.end?r?(i.data.start=i.value,i.data.end=r.value,i.end=r.position):(i.data.start=i.value,i.data.end=i.value):(i.data.start=i.value,i.data.end=n,i.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 i=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],i.data.start]},x:0,y:0,width:i.start*this.rect.width,height:this.rect.height})}return n}};function Fc(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Bc(e,t){const{localProps:{size:n},props:{anchor:i}}=t,r=function({props:e,localProps:{size:t},style:n,renderer:i}){const r=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=>i.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,i)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=i;e.start===e.end&&(d=u.width+2*r,1===e.end&&(c-=d));const m={x:c+r,y:r,width:d-2*r,height:t.height-2*r},h=s(`${l[0]}…`).width,p=Math.max(0,m.width-u.width),f=Math.max(0,m.height-u.height),g=o*p,v=a*f;return{show:m.width>=Math.min(h,u.width),text:l,dx:g,dy:v,rect:m,style:n.label,segment:{x:c+g,width:u.width+2*r},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:i}){const[r,o]=n.domain(),a=Math.max(0,Math.min(1,i.guideLine.major.justify));return{resolve:(n,i)=>{const s=a*i.width,l=Fc(i.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=r&&n.value<=o,x1:l,y1:0,x2:l,y2:Fc(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const i=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:i,height:t.height}}(e,n,i);return{rect:t,label:r.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const i=e[n-1],r=t[n-1].label;if(i&&i.start===i.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=r.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function jc(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:i=>{const r=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Fc(i.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Fc(r,n.minorGuideLine.strokeWidth),x2:o,y2:Fc(t.guideLine.minor.size+r,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Vc(e){return e.filter((e=>e.show)).map((e=>re({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var Hc={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)),i=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const i=Fc(1,t.line.strokeWidth);return{show:n.line.show,x1:Fc(0,t.line.strokeWidth),y1:i,x2:Fc(e.width,t.line.strokeWidth),y2:i,style:t.line}}(this),this.state.major=Bc(n,this),this.state.minor=jc(i,this)},render(){return[...Vc([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>re({},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})))),...Vc(this.state.major.map((e=>e.guideLine))),...Vc(this.state.minor.map((e=>e.guideLine)))];var e}};function Uc(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 Yc({qAxis:e}){const t=[],n=[];for(let i=0;i<e.length;i++){const r=i+1,o=e[i],a=e[r];Uc(o,a)?(a.qTags.indexOf("$qualified")>-1?(t.push(r),n.push(i)):(t.push(i),n.push(r)),i++):(t.push(i),n.push(i))}return{qualified:t,nonQualified:n}}function Wc({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let i,r=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(r=u.index,i=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const i=t[l+2];i&&i.queries.minor(n)&&(a=i.index);break}}}if(!Number.isNaN(r)&&Number.isNaN(o)&&"auto"!==o){o=r,r=NaN;const e=t[i+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(r)&&(r="auto",o="auto");return{outer:r,inner:o,minor:a,isDayOrShorter:s}}}}function Xc({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:i}){const r=n;return{isDayOrShorter:()=>(r.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,r.isDayOrShorter),count:()=>e.length,maxRange:()=>(r.maxRange=e.length?Math.max(...e.map((e=>Math.abs(i(e.qStart)-i(e.qEnd))))):0,r.maxRange),rangeAndWidth(){const n=i.clamp();return i.clamp(!1),r.rangeAndWidth=e.map((e=>({range:Math.abs(i(e.qStart)-i(e.qEnd)),width:t(`${e.qText}`).width+16}))),i.clamp(n),r.rangeAndWidth}}}function Kc({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 Gc({qualified:e,nonQualified:t,qAxis:n,measureText:i,reqAutoFitWidth:r,scale:o},{attributesFactory:a=Xc,queryFactory:s=Kc}={attributesFactory:Xc,queryFactory:Kc}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:i,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:r})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function Jc({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:i=0,scale:r},{metaFactory:o=Gc,mapper:a=Yc,resolver:s=Wc}={metaFactory:Gc,mapper:Yc,resolver:Wc}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:i,scale:r}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const i=n.key({distance:t});if(n.get(i))return n.get(i);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 r=m.resolve(t);return n.set(i,r),r}}}function Zc(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Qc=Zc(0).getTime();function ed(e){return(e.getTime()-Qc)/86400/1e3}const td=new Date,nd=new Date;function id(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=t=>(e(t=new Date(+t)),t),r.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),r.round=e=>{const t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),r.range=(n,i,o)=>{const a=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<i);return a},r.filter=n=>id((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,i)=>{if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););})),n&&(r.count=(t,i)=>(td.setTime(+t),nd.setTime(+i),e(td),e(nd),Math.floor(n(td,nd))),r.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?t=>i(t)%e==0:t=>r.count(0,t)%e==0):r:null)),r}const rd=1e3,od=6e4,ad=36e5,sd=864e5,ld=6048e5,ud=id((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*rd)}),((e,t)=>(t-e)/rd),(e=>e.getUTCSeconds()));ud.range;const cd=id((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd)}),((e,t)=>{e.setTime(+e+t*od)}),((e,t)=>(t-e)/od),(e=>e.getMinutes()));cd.range;const dd=id((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*od)}),((e,t)=>(t-e)/od),(e=>e.getUTCMinutes()));dd.range;const md=id((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd-e.getMinutes()*od)}),((e,t)=>{e.setTime(+e+t*ad)}),((e,t)=>(t-e)/ad),(e=>e.getHours()));md.range;const hd=id((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*ad)}),((e,t)=>(t-e)/ad),(e=>e.getUTCHours()));hd.range;const pd=id((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*od)/sd),(e=>e.getDate()-1));pd.range;const fd=id((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sd),(e=>e.getUTCDate()-1));fd.range;const gd=id((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sd),(e=>Math.floor(e/sd)));function vd(e){return id((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())*od)/ld))}gd.range;const yd=vd(0),Sd=vd(1),Md=vd(2),xd=vd(3),bd=vd(4),Ed=vd(5),Cd=vd(6);function Ad(e){return id((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)/ld))}yd.range,Sd.range,Md.range,xd.range,bd.range,Ed.range,Cd.range;const Nd=Ad(0),Od=Ad(1),Td=Ad(2),Ld=Ad(3),Id=Ad(4),Rd=Ad(5),wd=Ad(6);Nd.range,Od.range,Td.range,Ld.range,Id.range,Rd.range,wd.range;const kd=id((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 qd=id((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()));qd.range;const Dd=id((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()));Dd.every=e=>isFinite(e=Math.floor(e))&&e>0?id((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,Dd.range;const Pd=id((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()));Pd.every=e=>isFinite(e=Math.floor(e))&&e>0?id((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,Pd.range;const zd=1,$d=2,_d=3,Fd=4,Bd=5,jd=6;function Vd({timeScale:e,labels:t,distance:n,isDayOrShorter:i,cache:r,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=r.key({distance:n});let c;r.get(u,1)?c=r.get(u,1):(c=function(e,t,n,i,r,o){function a(e){return Pd.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=ud.count(e,t),l=dd.count(e,t),u=hd.count(e,t),c=fd.count(e,t),d=Nd.count(e,t),m=qd.count(e,t),h=Pd.count(e,t),p=n/i.second.width-1,f=n/i.minute.width-1,g=n/i.date.width-1,v=n/i.year.width-1,y={type:"year",desc:"year",count:h,interval:Pd.every(1),formatter:i.year.formatter,offset:e=>Pd.offset(e,-1),floor:Pd.floor};if(s<=p)y.type=zd,y.desc="second",y.count=s,y.interval=ud.every(1),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-1),y.floor=ud.floor;else if(s/2<=p)y.type=zd,y.desc="every other second",y.count=s/2,y.interval=ud.every(2),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-2),y.floor=ud.floor;else if(s/5<=p)y.type=zd,y.desc="every 5 second",y.count=s/5,y.interval=ud.every(5),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-5),y.floor=ud.floor;else if(s/15<=p)y.type=zd,y.desc="every 15 second",y.count=s/15,y.interval=ud.every(15),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-15),y.floor=ud.floor;else if(s/30<=p)y.type=zd,y.desc="every 30 second",y.count=s/30,y.interval=ud.every(30),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-30),y.floor=ud.floor;else if(l<=f)y.type=$d,y.desc="minute",y.count=l,y.interval=dd.every(1),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-1),y.floor=dd.floor;else if(l/2<=f)y.type=$d,y.desc="every 2 minute",y.count=l/2,y.interval=dd.every(2),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-2),y.floor=dd.floor;else if(l/5<=f)y.type=$d,y.desc="every 5 minute",y.count=l/5,y.interval=dd.every(5),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-5),y.floor=dd.floor;else if(l/10<=f)y.type=$d,y.desc="every 10 minute",y.count=l/10,y.interval=dd.every(10),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-10),y.floor=dd.floor;else if(l/15<=f)y.type=$d,y.desc="every 15 minute",y.count=l/15,y.interval=dd.every(15),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-15),y.floor=dd.floor;else if(l/30<=f)y.type=$d,y.desc="every 30 minute",y.count=l/30,y.interval=dd.every(30),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-30),y.floor=dd.floor;else if(u<=f)y.type=_d,y.desc="hour",y.count=u,y.interval=hd.every(1),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-1),y.floor=hd.floor;else if(u/2<=f)y.type=_d,y.desc="every 2 hour",y.count=u/2,y.interval=hd.every(2),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-2),y.floor=hd.floor;else if(u/3<=f)y.type=_d,y.desc="every 3 hour",y.count=u/3,y.interval=hd.every(3),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-3),y.floor=hd.floor;else if(u/6<=f)y.type=_d,y.desc="every 6 hour",y.count=u/6,y.interval=hd.every(6),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-6),y.floor=hd.floor;else if(u/12<=f||r)y.type=_d,y.desc="every 12 hour",y.count=u/12,y.interval=hd.every(12),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-12),y.floor=hd.floor;else if(c<=g)y.type=Fd,y.desc="day",y.count=c,y.interval=fd.every(1),y.formatter=i.date.formatter,y.offset=e=>fd.offset(e,-1),y.floor=fd.floor;else if(c/2<=g)y.type=Fd,y.desc="every 2 day",y.count=c/2,y.interval=fd.every(2),y.formatter=i.date.formatter,y.offset=e=>fd.offset(e,-2),y.floor=fd.floor;else if(c/3<=g)y.type=Fd,y.desc="every 3 day",y.count=c/3,y.interval=fd.every(3),y.formatter=i.date.formatter,y.offset=e=>fd.offset(e,-3),y.floor=fd.floor;else if(d<=g)y.type=Fd,y.desc="week",y.count=d,y.interval=Nd.every(1),y.formatter=i.date.formatter,y.offset=e=>Nd.offset(e,-1),y.floor=fd.floor;else if(d/2<=g)y.type=Fd,y.desc="every 2 week",y.count=d/2,y.interval=Nd.every(2),y.formatter=i.date.formatter,y.offset=e=>Nd.offset(e,-2),y.floor=fd.floor;else if(m<=g)y.type=Bd,y.desc="month",y.count=m,y.interval=qd.every(1),y.formatter=i.date.formatter,y.offset=e=>qd.offset(e,-1),y.floor=fd.floor;else if(m/3<=g)y.type=Bd,y.desc="quarter",y.count=m/3,y.interval=qd.every(3),y.formatter=i.date.formatter,y.offset=e=>qd.offset(e,-3),y.floor=fd.floor;else if(m/6<=g)y.type=Bd,y.desc="half year",y.count=m/6,y.interval=qd.every(6),y.formatter=i.date.formatter,y.offset=e=>qd.offset(e,-6),y.floor=fd.floor;else if(h<=v)y.type=jd,y.desc="year",y.count=h,y.interval=Pd.every(1),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-1),y.floor=Pd.floor;else if(h/2<=v)y.type=jd,y.desc="every 2 year",y.count=h/2,y.interval=a(2),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-2),y.floor=Pd.floor;else if(h/5<=v)y.type=jd,y.desc="every 5 year",y.count=h/5,y.interval=a(5),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-5),y.floor=Pd.floor;else if(h/10<=v)y.type=jd,y.desc="every 10 year",y.count=h/10,y.interval=a(10),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-10),y.floor=Pd.floor;else{const e=Math.max(1,Math.floor(h/v));y.type=jd,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=i.year.formatter,y.offset=t=>Pd.offset(t,-e),y.floor=Pd.floor}return y}(s,l,n,t.all(),i,a),r.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 i=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:c.formatter}}));let h=[];if(!o&&c.type<=_d){const n=t.getFormat("date"),i=e.ticks(fd.every(1));i.length&&s.getUTCDate()!==i[0].getUTCDate()&&i.unshift(fd.offset(i[0],-1)),h=(i.length?i:[fd.floor(s)]).map(((e,t,i)=>{const r=i[t+1]?i[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:n.formatter}}))}return{inner:m,outer:h}}const Hd=86400,Ud=1440,Yd={};function Wd(e,t,n,i){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:i}}function Xd(e,t,n){const{generator:i,anchor:r,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=Mo().domain([Zc(l),Zc(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof i?i:{type:i};let m;m="d3"===d.type?(e,r)=>Vd({timeScale:c,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:Zc(i.initialMin)}):e=>function(e,t,n,i,r,o=!1){if(Yd[[t,n,i,i,o]])return Yd[[t,n,i,i,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Zc(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=i-n,m=t/(r-i),h=m/1440,p=m/Hd,f=366*m,g=3*m*30,v=a.second.width/p,y=a.minute.width/h,S=a.date.width/g,M=a.year.width/f;let x,b,E,C=0,A=0,N=null,O=null,T=null,L=null,I=null,R=null;const w={outer:[],inner:[]};for(v<1?(N=1,A=1/Hd):v<2?(N=2,A=1/Hd*2):v<5?(N=5,A=1/Hd*5):v<10?(N=10,A=1/Hd*10):v<30?(N=30,A=1/Hd*30):y<1?(O=1,A=1/Ud):y<2?(O=2,A=1/Ud*2):y<5?(O=5,A=1/Ud*5):y<10?(O=10,A=.006944444444444445):y<30?(O=30,A=.020833333333333336):y<60?(T=1,A=1/24):y<120?(T=2,A=2/24):y<360?(T=6,A=.25):y<720?(T=12,A=.5):S<1/90?(A=1,L=1):S<2/90?(A=2,L=2):S<7/90?(A=7,L=7):S<31/90?(I=1,A=31):S<1?(I=3,A=90):M<1?(R=1,A=366):M<2?(R=2,A=732):M<5?(R=5,A=1826.25):(R=10,A=3652.5),b=Math.floor((d+n%1)/A);C<r;){E=b+1,x=R?Wd("year",[l+b*R,0,1],[l+E*R,0,1],a.year.formatter):I?Wd("month",[l,u+b*I,1],[l,u+E*I,1],a.date.formatter):L?Wd("day",[l,u,c+b*L],[l,u,c+E*L],a.date.formatter):T?Wd("hour",[l,u,c,0+b*T],[l,u,c,0+E*T],a.minute.formatter):O?Wd("minute",[l,u,c,0,0+b*O],[l,u,c,0,0+E*O],a.minute.formatter):Wd("second",[l,u,c,0,0,0+b*N],[l,u,c,0,0,0+E*N],a.second.formatter),C=ed(x.start),w.inner.push(x);const e=Math.floor(C);if(!(o||R||I||L)){const t={type:"day",start:Zc(e),end:Zc(e+1),formatter:a.date.formatter,qStart:e};w.outer[w.outer.length-1]&&w.outer[w.outer.length-1].qStart===t.qStart||w.outer.push(t)}b++}return w.min=i,w.max=r,Yd[[t,n,i,i,o]]=w,w}(n,e,d.min,l,u,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let i;i="start"===r?t.qStart:"end"===r?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(i),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:i,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"===r?ed(t.start):"end"===r?ed(t.end):(ed(t.start)+ed(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:ed(t.start),end:ed(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const Kd=/t+/i;const Gd={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 Jd(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 Zd="continuousPan";var Qd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:i=$c,viewCache:r,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Nc,snapshotFetcherFactory:u=Tc,cacheFetcherFactory:c=Oc,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=u({layoutService:t,viewCache:r}),p=c({cache:d}),f=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,i;({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])),r.set("continuousMin",v),r.set("continuousMax",y),r.set("minimiumZoomSpan",(n=v,i=y,Math.max(1e-6,(i-n)*Dc))),g=t.meta.isSnapshot?h:m,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=h.getSnapshotData()),o.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:i}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",i),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=Rc(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return i.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>wc(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 i=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,i=t[t.length-1][0].qNum,r=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?r.push(e[t]):a.qNum>i&&o.push(e[t])}return[...r,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),r=Rc(e.qArea,i);return{...e,qArea:r,qMatrix:i}})),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)),i=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),r=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}=i[a];for(let n=0,i=o.qTicks.length;n<i;n++){const i=o.qTicks[n];i.qStart<e?s.push(i):i.qStart>t&&l.push(i)}r[a].qTicks=[...s,...r[a].qTicks,...l]}}return{qAxis:r}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(i.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>wc(e,t,n))).catch(f),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>wc(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return re({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return re({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>zc(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=i.query.getShouldProcess()?[i.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:i}=e;function r(e,n,r){return i[e](n,r).then((e=>(i.updateLayout(e),t(),e)))}const o=N(((e,t)=>r("fetch",e,t)),50);return({min:e,max:t},{min:i,max:a})=>!n.meta.isContinuous||e===i&&t===a?Promise.resolve(null):r("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,i=NaN;return(r,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),i=e.get("minimiumZoomSpan"),Math.abs(r.max-r.min)<i?o:{min:Math.min(r.max,Math.max(t,r.min)),max:Math.max(r.min,Math.min(n,r.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:i=50,rtl:r=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return O(((e,i)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:i}=e;return i-=t.element.getBoundingClientRect().left,i-=n.rect.x,Math.max(0,Math.min(1,i/n.rect.width))}(e,n,l),u=r?1-o:o,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),h=m-(i>0?qc:kc)*m,p=c+h*u,f=d-h*(1-u),g=p<a?a-p:0,v=f>s?f-s:0;t.set("zoom",{min:Math.max(p-v,a),max:Math.min(f+g,s)})}}),i)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:i,viewCache:r}){return{type:"Pan",key:"continuous:pan",options:{event:Zd,pointers:1,threshold:10,enable(i,r){return this.started===Zd||!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))}},events:{[`${Zd}start`](n){n.preventDefault(),this.started=Zd;const{min:r,max:o}=i.get("zoom");this[Zd]={min:r,max:o,size:t.component(e).rect.computedInner.width,span:o-r}},[`${Zd}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[Zd],s=-e.deltaX/a;i.set("zoom",{min:Math.min(n+s*t,r.get("continuousMax")-t),max:Math.max(o+s*t,r.get("continuousMin")+t)})},[`${Zd}end`](e){e.preventDefault(),this.started=!1},[`${Zd}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:_c,timeAxis:Hc},picassoScales:{time:function e(t,n={}){const i=function(e,t,n){const i={};return Object.keys(t).forEach((r=>{const o=e[r],a=typeof o;"function"===a?i[r]=o(n):"object"!==a||Array.isArray(o)?i[r]="undefined"===a?t[r]:o:i[r]=re(!0,{},t[r],o)})),i}(t,Gd,n),{qAxis:r}=i,o=ui(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,i=+e.max;return Number.isNaN(n)&&Number.isNaN(i)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),i=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===i&&(n-=.5,i+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+i)?1:i}}(i,r);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[i.ticks.level];if(Number.isNaN(+o)||(d=c.transform(r[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(r[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=>(Jd(a,m),a.instance(e)),m.normInvert=e=>(Jd(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(i.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=i.invert;const h=function(e){const t={},{measureText:n,fn:i,localeInfo:r}=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 r&&Kd.test(r.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=r&&r.qDateFmt?r.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=i(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 i=Zc(t[0].data.start),r=Zc(t[n-1].data.start);return fd.count(i,r)/n>=1?o.date:hd.count(i,r)/n>0?o.minute:dd.count(i,r)/n>0?o.second:o.date},t}(i);return c=Xd(o.copy(),i,h),u=Jc({qAxis:r,measureText:i.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:i.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>`qHyperCube/${i.field}`,key:()=>i.field,raw:b(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>h.getFormatFromTicks(d).formatter,m}}};const em=e=>e.meta.seriesComponentKeys[0],tm=(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 nm({chart:e,models:t,actions:n,viewState:i,viewCache:r,environment:o}){const{event:{onZoom:a}}=Qd,{layoutService:s,seriesModel:l}=t,u=em(l),c=s.meta.isContinuous?a({chart:e,viewState:i,viewCache:r},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:u}):()=>{};return{type:"native",events:{wheel(t){const i={x:t.clientX,y:t.clientY},r=e.componentsFromPoint(i);if(n.interact.enabled()){const[e]=r.filter((e=>e.key===es.COMPONENT.LEGEND_CATEGORICAL));tm(t,e)}if(n.scroll.enabled()){const[e]=r.filter((e=>e.key===u));e&&(c(i,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const im="continuousPinchZoom";function rm({chart:e,models:t,environment:n,viewState:i,viewCache:r,actions:o,selectables:a}){const s=Qd.interactions.areaPan,{layoutService:l,dockService:u,discreteModel:c,colorService:d,tooltipService:m}=t,h="rtl"===n.options.direction,p=m.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...js({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Vs({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:i,viewCache:r,discrete:c,layoutService:l,dockService:u,rtl:h}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...p.gestures]},v=[nm({chart:e,models:t,actions:o,viewState:i,viewCache:r,environment:n}),f.native,p.native];return l.meta.isDiscrete&&(g.gestures.push(...c.interactions.gestures),v.push(c.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:em(t.seriesModel),chart:e,actions:o,viewState:i,viewCache:r}),function({targetKey:e,chart:t,actions:n,viewState:i,viewCache:r,rtl:o}){const a={last:0},s=Qd.event.onZoom({viewCache:r,viewState:i,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:im,pointers:2,threshold:0,enable:(i,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))},events:{[`${im}start`](e){a.last=e.scale,e.preventDefault()},[`${im}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:em(t.seriesModel),chart:e,actions:o,viewState:i,viewCache:r,rtl:h})),[g,...v]}const om=({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}}}),am="lasso",sm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:i},r)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:i,options:{event:am,enable(e,n){if(this.started===am||!n)return!0;if(!r.actions.select.enabled()||!r.actions.lasso.enabled()||!r.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!==am&&(r.actions.select.emit("start",am),this.chart.component(e).emit("lassoStart",t),this.started=am)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof r.updateOnMove&&r.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),r.actions.select.emit("end",am),"function"==typeof r.updateOnEnd&&r.updateOnEnd()}}});const lm=({targets:e,requireFailure:t,recognizeWith:n,components:i,eventName:r="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:r,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:{[r](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let i,r;return e.center?(({x:i}=e.center),({y:r}=e.center)):(i=e.clientX,r=e.clientY),{x:i-n.left,y:r-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"),h="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",r,e)),d.length&&i){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof i?i(t,d):i;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",r),(({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 h&&m.emit("hide")}}}};const um=({key:e,requireFailure:t,recognizeWith:n,eventName:i="tap"},r)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${i}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!r.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:{[`${i}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const cm=({eventName:e,key:t,fillTargets:n=[],requireFailure:i,recognizeWith:r},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:i,recognizeWith:r,options:{event:e,enable(i,r){if(this.started===e||!r)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:r.center.x,y:r.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}-`))}(r,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 dm(e,t){const n=function(e){const{key:t,targets:n,fillTargets:i,targetSelector:r,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:i,selector:r,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),i=cm(e,t,"range");return{interactions:[e.onEdited?um(e,t):null,i].filter(Boolean),components:[n]}}const mm=/axis|legend/,hm=e=>e.some((e=>mm.test(e.type)));function pm({actions:e,models:t}){const{seriesModel:n,layoutService:i,colorService:r,flags:o}=t,a=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,...n.query.series(ts.TYPE.MARKER).map((e=>$l(es.COMPONENT.MARKER,e))),...n.query.series(ts.TYPE.LINE).map((e=>$l(es.COMPONENT.POINT,e))),es.COMPONENT.AXIS.MAJOR,es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER,es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,es.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:i}=n,r={key:i,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[es.COMPONENT.AXIS.MAJOR,es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER,es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,es.COMPONENT.LEGEND_CATEGORICAL].indexOf(i)&&(r.data=["selectionDimension"]),[r]}},l={actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?r.isSelectionLocked({isMeasureSelectionLocked:i.meta.isDimensionLocked}):i.meta.isDimensionLocked,hitRadius:e=>hm(e)?0:3,debouncer:N,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[lm(e,t)],components:[]}}(s,l)}function fm({actions:e,models:t}){const{layoutService:n,dockService:i,seriesModel:r}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...r.meta.seriesComponentKeys,es.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:i,fillTargets:r,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:i},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:r,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[cm(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[es.COMPONENT.AXIS.MAJOR],dock:i.meta.major.dock},{actions:e})}const gm={components:[],interactions:[]};function vm({actions:e,chart:t,models:n,isUnsupportedFeature:i}){const r=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:i,seriesModel:r,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&dm({eventName:"minorRange",key:"minor-range-brush",targets:[es.COMPONENT.AXIS.MINOR.PRIMARY,`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,...r.query.series(ts.TYPE.MARKER).filter((e=>e.isPrimary)).map((e=>$l(es.COMPONENT.MARKER,e))),...r.query.series(ts.TYPE.LINE).filter((e=>e.isPrimary)).map((e=>$l(es.COMPONENT.POINT,e)))],fillTargets:[es.COMPONENT.AXIS.MINOR.PRIMARY],dock:i.meta.minor.dock,scale:es.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:i})||gm,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:i,seriesModel:r,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&dm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[es.COMPONENT.AXIS.MINOR.SECONDARY,`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,...r.query.series(ts.TYPE.MARKER).filter((e=>!e.isPrimary)).map((e=>$l(es.COMPONENT.MARKER,e))),...r.query.series(ts.TYPE.LINE).filter((e=>!e.isPrimary)).map((e=>$l(es.COMPONENT.POINT,e)))],fillTargets:[es.COMPONENT.AXIS.MINOR.SECONDARY],dock:i.meta.minorSecondary.dock,scale:es.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:i})||gm,a=fm({actions:e,models:n})||gm,s=function({actions:e,chart:t,models:n}){const{layoutService:i,dockService:r,seriesModel:o}=n,{isContinuous:a,isTime:s}=i.meta;if(!a)return!1;const l=s?[es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[es.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return dm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,...o.query.series(ts.TYPE.MARKER).map((e=>$l(es.COMPONENT.MARKER,e))),...o.query.series(ts.TYPE.LINE).map((e=>$l(es.COMPONENT.POINT,e))),...l],fillTargets:l,dock:r.meta.major.dock,scale:s?es.SCALE.MAJOR_INNER:es.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:i}){const r=s?i.formatter():t.formatter(es.FORMATTER.PRIMARY),o=t.scale(es.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${r(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||gm,l=function({actions:e,models:t}){const{colorService:n,layoutService:i}=t,[r]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=i.meta;if(a||!r)return!1;const s=`${es.SCALE.COLOR}Range`,{type:l,key:u}=r,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&dm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:r.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||gm;return{components:[...r.components,...o.components,...a.components,...s.components,...l.components],interactions:[...r.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function ym({actions:e,models:t}){const{layoutService:n,seriesModel:i}=t,{seriesComponentKeys:r}=i.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},i=om(n);return{interactions:[sm(n,t)],components:[i]}}({key:"lasso",componentTargetKey:r[0],components:r.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function Sm({chart:e,chartModel:t,colorService:n,context:i,resources:r,viewCache:o,scales:a,models:s}){const{layoutService:l,dockService:u,themeService:c,discreteModel:d,seriesModel:m}=s,h={...n,getMain:()=>({getPaletteColor:n.getPaletteColor.bind(n)})},p=[],f=l.getLayoutValue("plugins");if(!Array.isArray(f)||0===f.length)return p;const{allSeries:g,seriesComponentKeys:v}=m.meta,[y]=v;let S;const M=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=he.generateId)}))}(f);const x=[{key:es.COMPONENT.POINT,lines:!0,labels:!1,labelKeys:[es.COMPONENT.POINT_LABEL]},{key:es.COMPONENT.FORECAST_POINT,lines:!0,labels:!1,labelKeys:[es.COMPONENT.FORECAST_POINT_LABEL]}],b=function(e){const t=[];return e.forEach((e=>{const n=t[t.length-1],i=null==n?void 0:n[0],r=(null==e?void 0:e.type)===(null==i?void 0:i.type),o=(null==e?void 0:e.scale)===(null==i?void 0:i.scale);let a=!1;if("point"===(null==e?void 0:e.type))a=o&&r;else if("line"===(null==e?void 0:e.type)){const t=!(null!=e&&e.showPoints||null!=i&&i.showPoints);a=r&&o&&t}a?n.push(e):t.push([e])})),t}(M);return b.forEach(((n,r)=>{var o;const s=`points-addon-combo-chart-${r}`,m=`lines-addon-combo-chart-${r}`;var f,v,M,b,E;"point"===n[0].type?S=(null===(f=n[0])||void 0===f?void 0:f.scale)||(null===(v=g[0])||void 0===v?void 0:v.scale):S=null!==(M=null===(b=n[0])||void 0===b||null===(b=b.points[0])||void 0===b?void 0:b.scale)&&void 0!==M?M:null===(E=g[0])||void 0===E?void 0:E.scale;switch(null===(o=n[0])||void 0===o?void 0:o.type){case"point":p.push(za({chart:e,chartModel:t,discreteModel:d,colorService:h,themeService:c,layoutService:l,dockService:u,rtl:i.rtl,majorScale:es.SCALE.MAJOR,minorScale:S,mainComponentKey:y,data:n,key:s})),x.push({key:s,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":p.push(function({chart:e,chartModel:t,discreteModel:n,colorService:i,layoutService:r,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 h={resolveUIColor:i.getMain().getPaletteColor},p="horizontal"===o.meta.major.orientation,f=!(!p||!a),{canBeContinuous:g,isContinuous:v}=r.meta,y=r.getLayout(),S=Go.getDimensionValuesInfo({layout:y,canBeContinuous:g,discreteModel:n,layoutService:r}),M=[];c.forEach(((e,t)=>{var n;const i=(null!==(n=null==e?void 0:e.points)&&void 0!==n?n:[]).map(((n,i)=>({...n,lineId:t,style:0===i?e.style:void 0})));M.push(...i)}));const x={},b=[];c.forEach((e=>{var t;return b.push(...(null!==(t=null==e?void 0:e.points)&&void 0!==t?t:[]).map((e=>e.dimensionValue)))})),b.forEach((e=>{S[e]&&(x[e]?(x[e].innerValues=S[e].innerValues,x[e].minOrder=Math.min(x[e].minOrder,S[e].minOrder),x[e].maxOrder=Math.max(x[e].maxOrder,S[e].maxOrder),x[e].isMinOrderOk=x[e].isMinOrderOk||S[e].isMinOrderOk,x[e].isMaxOrderOk=x[e].isMaxOrderOk||S[e].isMaxOrderOk):x[e]={id:S[e].id,dataNode:S[e].dataNode,qText:S[e].qText,innerValues:S[e].innerValues,minOrder:S[e].minOrder,maxOrder:S[e].maxOrder,isMinOrderOk:S[e].isMinOrderOk,isMaxOrderOk:S[e].isMaxOrderOk},x[e].numInnerValues=(x[e].maxOrder||0)-(x[e].minOrder||0)+1)}));const E=M[0];M.forEach((t=>{var n,i,o;const a=ka({point:t,dimensionValueInfo:x,layoutService:r}),s=null==t?void 0:t.scale,l=null==E?void 0:E.scale,u=null==r||null===(n=r.meta)||void 0===n?void 0:n.isButterfly,c=null==r||null===(i=r.meta)||void 0===i?void 0:i.isStacked,d=null===(o=x[t.dimensionValue])||void 0===o?void 0:o.dataNode;let h=a;const p=l&&s&&l!==s,f=u&&1===t.measureIndex,g=c&&Array.isArray(d);if(p)h=function(e,t,n){const i=t.min(),r=t.max(),o=n.min(),a=n.max();return r===i?o:o+(e-i)/(r-i)*(a-o)}(a,m[s]||e.scale(s),m[l]||e.scale(l));else if(f)h=-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);h=e.reduce(((e,n)=>{const i=n.qNum;return"number"==typeof i&&Math.sign(i)===t?e+i:e}),0)}}t.validMeasureValue=h}));const C={scale:s,fn:({datum:t})=>{var n;const i=e.scale(s),o=t.value.dimensionValue;return v?i("string"==typeof o?""===o?void 0:+o:o):void 0!==x[o]?Go.getScaledPosition({scale:i,value:x[o].id,valueInfo:x[o],size:null===(n=e.component(u))||void 0===n?void 0:n.rect[p?"width":"height"],align:"center",invert:f,layoutService:r,isContinuous:v}):void 0}},A={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"line",data:M,settings:{connect:!0,coordinates:{major:p?C:A,minor:p?A: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:$a},stroke:({datum:e})=>{var t,n;return wa({colorModel:h,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:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:d,colorService:h,layoutService:l,dockService:u,rtl:i.rtl,majorScale:es.SCALE.MAJOR,minorScale:S,mainComponentKey:y,data:n,key:m,scales:a})),n.forEach((n=>{null!=n&&n.showPoints&&null!=n&&n.points?n.points.forEach(((n,r)=>{const o=`points-${r}-for-${m}`;p.push(za({chart:e,chartModel:t,discreteModel:d,colorService:h,themeService:c,layoutService:l,dockService:u,rtl:i.rtl,majorScale:es.SCALE.MAJOR,minorScale:n.scale,mainComponentKey:y,data:[n],key:o})),x.push({key:o,lines:!0,labels:!0,duplicates:!0})})):null!=n&&n.points&&x.push({key:m,lines:!0,labels:!1,duplicates:!0,points:n.points})}))}})),p.push(function({layoutService:e,dockService:t,chartModel:n,themeService:i,configs:r,flags:o,cache:a}){const s=e.getLayoutValue("plugins"),{rtl:l}=t.config,{orientation:u}=t.meta.major,{isOneDimensional:c,isStacked:d}=e.meta,m=i.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:Ra(o),settings:{all:!0,cache:a,configs:r,label:e=>{var t,n,i,r;return null!==(t=e.value)&&void 0!==t&&null!==(t=t.label)&&void 0!==t&&t.value?null===(r=e.value)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.value:d?null===(n=e.point)||void 0===n?void 0:n.label:null===(i=e.end)||void 0===i?void 0:i.label},lineId:({data:e})=>{var t,n,i;for(let n=0;n<s.length;n++){const i=s[n];switch(i.type){case"point":if(i.cId===(null===(t=e.value)||void 0===t?void 0:t.cId))return i.cId;break;case"line":if(i.points.some((t=>{var n;return t.cId===(null===(n=e.value)||void 0===n?void 0:n.cId)})))return i.cId}}return(null===(n=e.value)||void 0===n?void 0:n.cId)||(null===(i=e.line)||void 0===i?void 0:i.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=>{var t;return null===(t=e.value)||void 0===t?void 0:t.validMeasureValue},rtl:l},style:m.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}}({layoutService:l,dockService:u,chartModel:t,themeService:c,configs:x,flags:r.flags,cache:o})),p}function Mm({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:u,pluginService:c}=n,d=n.layoutService.getLayout(),{options:m}=i,h=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}),p=(f={logicalSize:h,minCenterRatio:0},{layoutModes:se.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:i,viewState:r,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:i}=e,{themeService:r,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=r.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:a.alignment},settings:{isRTL:"rtl"===i.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return d.getHasSuppressingDisclaimer()?[m]:[...Qu({models:t}),...Al({models:t,flags:i}),...Xu({chart:e,models:t,environment:n,flags:i,viewState:r,viewCache:o}),hc({models:t,environment:n}),...Rl({models:t,environment:n,flags:i}),...ic({models:t,environment:n,actions:a,viewCache:o,flags:i}),Co({viewState:r,viewCache:o,layoutService:l,dockService:u}),...uc({models:t}),...cc({chart:e,models:t,environment:n}),rc({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),dc(t),...lc({chart:e,models:t,viewState:r,viewCache:o,environment:n}),...c.getComponents(),m].filter(Boolean)}({chart:t,models:n,environment:i,flags:r,viewState:o,viewCache:a,actions:s}),v=function({actions:e,chart:t,models:n,isUnsupportedFeature:i}){const{layoutService:r}=n,o=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=pm({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=vm({actions:e,chart:t,models:n,isUnsupportedFeature:i}),l=ym({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:r},S=function({picasso:e,models:t,viewState:n,viewCache:i,environment:r}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Ml({picasso:e,models:t,viewState:n,viewCache:i,environment:r}),[es.SCALE.MINOR.PRIMARY]:xl({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:r}),[es.SCALE.MINOR.SECONDARY]:xl({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:r}),[es.SCALE.MINOR.REDUCED_PRIMARY]:bl({layoutService:o,tickModel:s,dockService:c,environment:r}),[es.SCALE.MINOR.REDUCED_SECONDARY]:bl({layoutService:o,tickModel:l,dockService:c,environment:r}),...u.custom.wrappedScales()}}({picasso:e,models:n,viewState:o,viewCache:a,environment:i}),M=r.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?Sm({chart:t,chartModel:{query:{animationsEnabled:n.animationsModel.enabled}},colorService:u,context:{},resources:y,viewCache:a,scales:S,models:n}):[],x=c.extendComponents([...g,...v.components,...M]);return{collections:dl({models:n}),scales:S,components:x,formatters:pc({models:n}),interactions:rm({chart:t,models:n,environment:i,viewState:o,viewCache:a,actions:s,selectables:v}),strategy:p,palettes:u.getPalettes()}}const xm=({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})=>{const{width:d,height:m}=r(),[,h]=o((async()=>{if(!(null!=t&&t.update&&n&&i&&s))return;const{colorService:r,discreteModel:o,dockService:h,layoutService:p,refLineModel:f,animationsModel:g,styleModel:v}=n;function y(){t.update({settings:Mm({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})})}h.update({width:d,height:m}),r.custom.updateLegend(v),f.update({picasso:e,chart:t,models:n,environment:i,viewState:s,viewCache:l,actions:u});const S=p.getDataPages();g.meta.isSizeChanging=!0,p.setDataPages([]),y(),p.setDataPages(S),p.meta.isContinuous||await o.command.initialize(),y()}),[d,m]);if(h)throw h},bm=[es.COMPONENT.AXIS_TITLE.MAJOR,es.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,es.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,es.COMPONENT.GRID_LINE,es.COMPONENT.ZERO_LINE],Em=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:es.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Cm=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:i}})=>e.meta.isContinuous?[{type:"q",key:es.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:i.qLocaleInfo}}]:[];const Am={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Nm(e){return Am[e]||e}function Om(e){return function(t,n,i){let r,o,a,s,l=[],u=!0;function c(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&(r.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=Nm(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(i),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))})),r.gestures.forEach((t=>{const n=Nm(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,r=e,o={chart:t,mediator:n,settings:r},r.gestures=r.gestures||[],void 0===r.enable&&(r.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,r=null}}}}function Tm(e,t,n,i){const r=function(t){const n=String(t);return e(n)};return r.ticks=()=>t.map((t=>{const o=r([t.data.value,i?n-1:0]),a=r([t.data.value,i?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),r.bandwidth=()=>e.bandwidth(),r.data=()=>e.data(),r.domain=()=>e.domain(),r.pxScale=function(i){const r=e.pxScale(i);return r===e?this:Tm(r,t,n)},r}function Lm(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},i={}){const r=t(e,n,i),o=r.domain(),a=r.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),r.domain(s),Tm(r,a,l,e.invert)}))}const Im={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:i,rendHeight:r,flipXY:o,symbol:a}){let s="x",l="y",u=i,c=r,d=t<.5?90:-90;return o&&(s="y",l="x",u=r,c=i,d=t<.5?180:0),a(re({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function Rm({i:e,width:t,height:n,resolved:i,keys:r,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==i.major.settings.binStart?(l=i.major.items[e].binStart,u=i.major.items[e].binEnd,s=i.major.settings.binStart.scale):(s=i.major.settings.major.scale,l=s?i.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=re({},{major:l,majorEnd:u},i.minor.items[e]);r.forEach((t=>{d[t]=i[t].items[e]}));const m=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:i,maxMajorWidth:r}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(i))?r:i/r);return a=Number.isNaN(Number(n))?a:Math.max(n/r,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),p=(c-h)/2,f=p+d.major+h/2;return{item:d,boxCenter:f,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function wm({keys:e,data:t,defaultSettings:n,style:i,settings:r,width:o,height:a,resolver:s}){const l=re(!0,{},n||{},i||{}),u={major:"horizontal"===r.orientation?a:o,minor:"horizontal"===r.orientation?o:a},c=r.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:re(!0,{},{binStart:{scale:r.major.scale,ref:r.major.ref.start},binEnd:{scale:r.major.scale,ref:r.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:re(!0,{},{binStart:{scale:r.major.scale,ref:"binStart"},binEnd:{scale:r.major.scale,ref:"binEnd"}},r.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:r.major}});const m=r.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:re(!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,i=e.length;n<i;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:r[h],scaled:u});return p}const km=["oob"];const qm={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,i="horizontal"===this.settings.settings.orientation,{data:r,style:o,resolver:a,symbol:s}=this,l=wm({keys:km,data:r,defaultSettings:{oob:Im.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:i,keys:r,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Rm}){const l=[],{items:u}=i.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:h,rendHeight:p}=s({i:c,width:e,height:t,resolved:i,keys:r,flipXY:n,calcKey:"oob"}),f=u[c].data,g=[];if(d.oob.show){g.push(Im.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:h,rendHeight:p,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:i,resolved:l,keys:km,symbol:s,dockValue:n});return d}},Dm={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Pm=["hat"];function zm(e,t=!0){let n="";for(let t=0;t<e.length;t++){const i=e[t];n+=0===t?`M${i.x} ${i.y}`:`L${i.x} ${i.y}`,n+=" "}return t&&(n+="Z"),n}function $m({item:e,boxWidth:t,boxPadding:n,rendWidth:i,rendHeight:r,flipXY:o}){let a="x",s="y",l=i,u=r,c=e.hat.alignment||0;o&&(a="y",s="x",l=r,u=i,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 h=re({},e.hat,{type:"path",d:zm(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[h,re({},e.hat,{type:"path",d:zm(m)})]}const _m={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:i,style:r,resolver:o}=this,a=wm({keys:Pm,data:i,defaultSettings:Dm,style:r,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,u=function({width:e,height:t,flipXY:n,resolved:i,keys:r,_calcItemRenderingOpts:o=Rm}){const a=[],{items:s}=i.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h}=o({i:l,width:e,height:t,resolved:i,keys:r,flipXY:n,calcKey:"hat"}),p=s[l].data,f=[];u.hat.show&&f.push(...$m({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Pm});return u}};var Fm={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var Bm={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:i,markerOffset:r,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 h=s.map((e=>e.ref)),p=l.map((e=>e.ref)),f=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:i=[],secondaryItems:r=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];return[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?i:r;s.push((({type:e,extremum:t,separateStacking:n,items:i})=>{const r="max"===e?e=>e>t:e=>e<t,o=n?e=>r(e.point.value<0?e.start.value:e.end.value):e=>r(e.end.value);return i.filter(o)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:i}=e.major;t[i]||(t[i]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>h.includes(e.end.source.field))),secondaryItems:e.filter((e=>p.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}}),S=("max"===t?90:-90)-(g?0:90)-(!g&&i?180:0),M=o/2*r,{fill:x}=this.settings.style,b=y.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:i,x:r,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:i,width:.7,x:r,y:o,data:a})}({symbol:this.symbol,size:o,fill:x,startAngle:S,x:g?v*e.major:M,y:g?M:v*e.major,data:e.data})));return b}};function jm({x:e,y:t,size:n,stroke:i,strokeWidth:r,fill:o}){return{type:"container",children:[{type:"line",stroke:i||o,strokeWidth:r,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 Vm({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},i=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>i.some((t=>t===e.key)))).reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const i=t?n.primary:n.secondary;if(!i.map[e]){const[t]=i.paths.filter((t=>t.data&&t.data.typeIndex.value===e));i.map[e]=t}return i.map[e]}}}function Hm({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function Um({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const i=t&&t.scale(es.SCALE.MAJOR),r=i&&i.max&&i.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===r?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function Ym({brush:e,selectionInfo:t,items:n,selectionValues:i,colorByData:r,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:i[d]].filter(Boolean);if(r&&l&&m.push((e=>e.color.value)),!r&&c&&(m=[e=>e.color.value]),!m.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?Hm:Um)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce(((e,t,n)=>(m.some((e=>h({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function Wm({chart:e,selected:t,connection:n,gradient:i,fallback:r}){const o=e.scale(es.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)))||r,offset:Math.min(1,Math.max(0,(e-s)/c))}))),m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:f}}function Xm({chart:e,selected:t,connection:n,gradient:i,fallback:r}){const o=e.scale(es.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)||r;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const i=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(i-s)/u))})}const m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:f}}function Km({property:e,chart:t,connection:n,attrs:i,colorSettings:r,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const m=i[e];if("gradient"!==m.type)return m;const{type:h,nil:p}=r;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:i,fallback:r,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(es.SCALE.MAJOR),d=e.scale(es.SCALE.COLOR),m=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),h=t.filter((e=>-1!==n.indexOf(e.index))),p=("vertical"===o&&u?h.reverse():h).map((e=>e.item)),f=p.map((e=>m(e.major.value))),g=Math.min(...f),v=Math.max(...f)-g,y=0===v?1:v,S=f.map(((e,t)=>0===t?0:t===f.length-1?1:(e-g)/y)),M=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:d(t.color.value)||r,i=S[e];M.push({color:n,offset:0===e?0:Math.max(0,M[M.length-1].offset)}),M.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((i+(S[e+1]-i)/2).toFixed(5)))})}return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:M}}({chart:t,selected:a,connection:n,gradient:m,fallback:p,orientation:c,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===h?Wm:Xm)({chart:t,selected:a,connection:n,gradient:m,fallback:p})}function Gm({chart:e,pathModel:t,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:m,count:h}){const p=t.getLine(l,u),{attrs:f}=p,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},i=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=i,[,n.y]=i):"C"===t&&([,,,,n.x]=i,[,,,,,n.y]=i),n}))}({d:f.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:r,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:Km({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:r,itemsPerGroup:o,orientation:a,rtl:d})}}({chart:e,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:g,attrs:f,rtl:m,count:h})))}function Jm({chart:e,pathModel:t,seriesInfo:n,brush:i,selectionInfo:r,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,rtl:h}){const p=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:i,minorRangePrimary:r}=t;return!i||(r?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:r,seriesInfo:n}),f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,i)=>{const r=n.typeIndex.value;var o;return e[r]||(e[r]={key:r,items:[],index:i,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===r))}),e[r].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:p,seriesInfo:n}),{lines:g}=f.reduce(((n,o)=>{const p=Ym({brush:i,selectionInfo:r,items:o.items,selectionValues:a,colorByData:l,chart:e});if(p.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:p});return f.length?(n.lines.push(...Gm({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:p,connections:f,rtl:h,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 Zm={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:Vm({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=Jm({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=Vm({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Jm({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 Qm=()=>{const e=B();return e.use(j),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Om(e))};e.interaction("hammer",Om(Hammer))}(F)),e.use(Lm),e.renderer("react-qcm",V),e.component("axis-title",H),e.component("disclaimer",U),e.component("scrollbar",ul),e.component("point-label",T),e.component("label-space",Fm),e.component("time-axis",Qd.picassoComponents.timeAxis),e.component("axis-overlay",Qd.picassoComponents.axisOverlay),e.component("reference-line-labels",va),e.component("box-sliced-hat",_m),e.component("box-out-of-bounds",qm),e.component("data-out-of-bounds-marker",Bm),e.component("scroll-hint",Eo),e.component("brush-highlighter",Zm),e.scale("time",Qd.picassoScales.time),e.symbol("line-point",jm),e},eh=e=>"[object Object]"===Object.prototype.toString.call(e),th=e=>Array.isArray(e);function nh(e,t){if(e===t)return!0;if(th(e)){if(!th(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!nh(e[n],t[n]))return!1;return!0}if(eh(e)){if(!eh(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i<n.length;i++){if(!Object.hasOwn(t,n[i]))return!1;if(!nh(e[n[i]],t[n[i]]))return!1}return!0}return e===t}function ih({enable:e=!0}={}){const t=a(),r=()=>Date.now().toString()+Math.random(),[o,s]=n(r()),l={properties:void 0};return i((()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then((e=>{const t=re(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){var n,i,r,o;const a={properties:!1,exclude:!1};if(e===t)return a;const s=re(!0,{},e),l=re(!0,{},t);return a.exclude=!nh(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(i=l.qHyperCubeDef)||void 0===i?void 0:i.qLayoutExclude),null===(r=s.qHyperCubeDef)||void 0===r||delete r.qLayoutExclude,null===(o=l.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,a.properties=!nh(s,l),a}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(r())}))};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}}),[e]),o}const rh={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},oh=e=>void 0===e.marker?rh.circle:rh[e.marker],ah=e=>void 0===e.markerFill||e.markerFill;function sh({series:e,layoutService:t}){switch(mc(e)){case ts.TYPE.MARKER:return(e=>({marker:oh(e),fill:ah(e)}))(e);case ts.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case ts.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function lh(e=ts.NOPE_SERIES,t=!0){return t?e.axis===ts.AXIS.PRIMARY:e.axis===ts.AXIS.PRIMARY||mc(e)===ts.TYPE.BAR}var uh={exports:{}};var ch={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 dh="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var mh=dh;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=ch,o=mh,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-]",h=[["\\s",1],["\\d",r],[m,i]],p=(e,t,n)=>{const i=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),r=d++;o(e,r,t),c[e]=r,l[r]=t,u[r]=i,a[r]=new RegExp(t,n?"g":void 0),s[r]=new RegExp(i,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${m}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?`+`(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(uh,uh.exports);var hh=uh.exports;const ph=Object.freeze({loose:!0}),fh=Object.freeze({});var gh=e=>e?"object"!=typeof e?ph:e:fh;const vh=/^[0-9]+$/,yh=(e,t)=>{const n=vh.test(e),i=vh.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1};var Sh={compareIdentifiers:yh,rcompareIdentifiers:(e,t)=>yh(t,e)};const Mh=mh,{MAX_LENGTH:xh,MAX_SAFE_INTEGER:bh}=ch,{safeRe:Eh,t:Ch}=hh,Ah=gh,{compareIdentifiers:Nh}=Sh;var Oh=class e{constructor(t,n){if(n=Ah(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>xh)throw new TypeError(`version is longer than ${xh} characters`);Mh("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const i=t.trim().match(n.loose?Eh[Ch.LOOSE]:Eh[Ch.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>bh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>bh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>bh||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<bh)return t}return e})):this.prerelease=[],this.build=i[5]?i[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(Mh("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)),Nh(this.major,t.major)||Nh(this.minor,t.minor)||Nh(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],i=t.prerelease[n];if(Mh("prerelease compare",n,e,i),void 0===e&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===e)return-1;if(e!==i)return Nh(e,i)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],i=t.build[n];if(Mh("build compare",n,e,i),void 0===e&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===e)return-1;if(e!==i)return Nh(e,i)}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?Eh[Ch.PRERELEASELOOSE]:Eh[Ch.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 i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===n&&(i=[t]),0===Nh(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const Th=Oh;var Lh=(e,t,n=!1)=>{if(e instanceof Th)return e;try{return new Th(e,t)}catch(e){if(!n)return null;throw e}};const Ih=Lh;var Rh=(e,t)=>{const n=Ih(e,t);return n?n.version:null};const wh=Lh;var kh=(e,t)=>{const n=wh(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const qh=Oh;var Dh=(e,t,n,i,r)=>{"string"==typeof n&&(r=i,i=n,n=void 0);try{return new qh(e instanceof qh?e.version:e,n).inc(t,i,r).version}catch(e){return null}};const Ph=Lh;var zh=(e,t)=>{const n=Ph(e,null,!0),i=Ph(t,null,!0),r=n.compare(i);if(0===r)return null;const o=r>0,a=o?n:i,s=o?i: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!==i.major?u+"major":n.minor!==i.minor?u+"minor":n.patch!==i.patch?u+"patch":"prerelease"};const $h=Oh;var _h=(e,t)=>new $h(e,t).major;const Fh=Oh;var Bh=(e,t)=>new Fh(e,t).minor;const jh=Oh;var Vh=(e,t)=>new jh(e,t).patch;const Hh=Lh;var Uh=(e,t)=>{const n=Hh(e,t);return n&&n.prerelease.length?n.prerelease:null};const Yh=Oh;var Wh=(e,t,n)=>new Yh(e,n).compare(new Yh(t,n));const Xh=Wh;var Kh=(e,t,n)=>Xh(t,e,n);const Gh=Wh;var Jh=(e,t)=>Gh(e,t,!0);const Zh=Oh;var Qh=(e,t,n)=>{const i=new Zh(e,n),r=new Zh(t,n);return i.compare(r)||i.compareBuild(r)};const ep=Qh;var tp=(e,t)=>e.sort(((e,n)=>ep(e,n,t)));const np=Qh;var ip=(e,t)=>e.sort(((e,n)=>np(n,e,t)));const rp=Wh;var op=(e,t,n)=>rp(e,t,n)>0;const ap=Wh;var sp=(e,t,n)=>ap(e,t,n)<0;const lp=Wh;var up=(e,t,n)=>0===lp(e,t,n);const cp=Wh;var dp=(e,t,n)=>0!==cp(e,t,n);const mp=Wh;var hp=(e,t,n)=>mp(e,t,n)>=0;const pp=Wh;var fp=(e,t,n)=>pp(e,t,n)<=0;const gp=up,vp=dp,yp=op,Sp=hp,Mp=sp,xp=fp;var bp=(e,t,n,i)=>{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 gp(e,n,i);case"!=":return vp(e,n,i);case">":return yp(e,n,i);case">=":return Sp(e,n,i);case"<":return Mp(e,n,i);case"<=":return xp(e,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};const Ep=Oh,Cp=Lh,{safeRe:Ap,t:Np}=hh;var Op,Tp,Lp,Ip,Rp,wp,kp=(e,t)=>{if(e instanceof Ep)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const i=t.includePrerelease?Ap[Np.COERCERTLFULL]:Ap[Np.COERCERTL];let r;for(;(r=i.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),i.lastIndex=r.index+r[1].length+r[2].length;i.lastIndex=-1}else n=e.match(t.includePrerelease?Ap[Np.COERCEFULL]:Ap[Np.COERCE]);if(null===n)return null;const i=n[2],r=n[3]||"0",o=n[4]||"0",a=t.includePrerelease&&n[5]?`-${n[5]}`:"",s=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Cp(`${i}.${r}.${o}${a}${s}`,t)};function qp(){if(Ip)return Lp;Ip=1;const e=/\s+/g;class t{constructor(n,o){if(o=i(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof r)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=>!p(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&&h))+":"+e,i=n.get(t);if(i)return i;const a=this.options.loose,f=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(f,O(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],u),o("comparator trim",e),e=e.replace(s[l.TILDETRIM],c),o("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),o("caret trim",e);let g=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>N(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 y=new Map,S=g.map((e=>new r(e,this.options)));for(const e of S){if(p(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const M=[...y.values()];return n.set(t,M),M}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(T(this.set[t],e,this.options))return!0;return!1}}Lp=t;const n=new(Tp?Op:(Tp=1,Op=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}})),i=gh,r=Dp(),o=mh,a=Oh,{safeRe:s,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:d}=hh,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:h}=ch,p=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const i=e.slice();let r=i.pop();for(;n&&i.length;)n=i.every((e=>r.intersects(e,t))),r=i.pop();return n},v=(e,t)=>(o("comp",e,t),e=x(e,t),o("caret",e),e=S(e,t),o("tildes",e),e=E(e,t),o("xrange",e),e=A(e,t),o("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>M(e,t))).join(" "),M=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,i,r,a)=>{let s;return o("tilde",e,t,n,i,r,a),y(n)?s="":y(i)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(r)?s=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${i}.${r}-${a} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${r} <${n}.${+i+1}.0-0`,o("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,((t,n,r,a,s)=>{let l;return o("caret",e,t,n,r,a,s),y(n)?l="":y(r)?l=`>=${n}.0.0${i} <${+n+1}.0.0-0`:y(a)?l="0"===n?`>=${n}.${r}.0${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.0${i} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===r?`>=${n}.${r}.${a}-${s} <${n}.${r}.${+a+1}-0`:`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===r?`>=${n}.${r}.${a}${i} <${n}.${r}.${+a+1}-0`:`>=${n}.${r}.${a}${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},E=(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,i,r,a,s,l)=>{o("xRange",e,n,i,r,a,s,l);const u=y(r),c=u||y(a),d=c||y(s),m=d;return"="===i&&m&&(i=""),l=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&m?(c&&(a=0),s=0,">"===i?(i=">=",c?(r=+r+1,a=0,s=0):(a=+a+1,s=0)):"<="===i&&(i="<",c?r=+r+1:a=+a+1),"<"===i&&(l="-0"),n=`${i+r}.${a}.${s}${l}`):c?n=`>=${r}.0.0${l} <${+r+1}.0.0-0`:d&&(n=`>=${r}.${a}.0${l} <${r}.${+a+1}.0-0`),o("xRange return",n),n}))},A=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),N=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,n,i,r,o,a,s,l,u,c,d,m)=>`${n=y(i)?"":y(r)?`>=${i}.0.0${e?"-0":""}`:y(o)?`>=${i}.${r}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=y(u)?"":y(c)?`<${+u+1}.0.0-0`:y(d)?`<${u}.${+c+1}.0-0`:m?`<=${u}.${c}.${d}-${m}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),T=(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!==r.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0};return Lp}function Dp(){if(wp)return Rp;wp=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(i,r){if(r=n(r),i instanceof t){if(i.loose===!!r.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),a("comparator",i,r),this.options=r,this.loose=!!r.loose,this.parse(i),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?i[r.COMPARATORLOOSE]:i[r.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,i){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,i).test(this.value):""===e.operator?""===e.value||new l(this.value,i).test(e.semver):(!(i=n(i)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!i.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,i)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,i)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}Rp=t;const n=gh,{safeRe:i,t:r}=hh,o=bp,a=mh,s=Oh,l=qp();return Rp}const Pp=qp();var zp=(e,t,n)=>{try{t=new Pp(t,n)}catch(e){return!1}return t.test(e)};const $p=qp();var _p=(e,t)=>new $p(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const Fp=Oh,Bp=qp();var jp=(e,t,n)=>{let i=null,r=null,o=null;try{o=new Bp(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(i&&-1!==r.compare(e)||(i=e,r=new Fp(i,n)))})),i};const Vp=Oh,Hp=qp();var Up=(e,t,n)=>{let i=null,r=null,o=null;try{o=new Hp(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(i&&1!==r.compare(e)||(i=e,r=new Vp(i,n)))})),i};const Yp=Oh,Wp=qp(),Xp=op;var Kp=(e,t)=>{e=new Wp(e,t);let n=new Yp("0.0.0");if(e.test(n))return n;if(n=new Yp("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let r=null;i.forEach((e=>{const t=new Yp(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!Xp(t,r)||(r=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!r||n&&!Xp(n,r)||(n=r)}return n&&e.test(n)?n:null};const Gp=qp();var Jp=(e,t)=>{try{return new Gp(e,t).range||"*"}catch(e){return null}};const Zp=Oh,Qp=Dp(),{ANY:ef}=Qp,tf=qp(),nf=zp,rf=op,of=sp,af=fp,sf=hp;var lf=(e,t,n,i)=>{let r,o,a,s,l;switch(e=new Zp(e,i),t=new tf(t,i),n){case">":r=rf,o=af,a=of,s=">",l=">=";break;case"<":r=of,o=sf,a=rf,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(nf(e,t,i))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===ef&&(e=new Qp(">=0.0.0")),c=c||e,d=d||e,r(e.semver,c.semver,i)?c=e:a(e.semver,d.semver,i)&&(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 uf=lf;var cf=(e,t,n)=>uf(e,t,">",n);const df=lf;var mf=(e,t,n)=>df(e,t,"<",n);const hf=qp();var pf=(e,t,n)=>(e=new hf(e,n),t=new hf(t,n),e.intersects(t,n));const ff=zp,gf=Wh;const vf=qp(),yf=Dp(),{ANY:Sf}=yf,Mf=zp,xf=Wh,bf=[new yf(">=0.0.0-0")],Ef=[new yf(">=0.0.0")],Cf=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===Sf){if(1===t.length&&t[0].semver===Sf)return!0;e=n.includePrerelease?bf:Ef}if(1===t.length&&t[0].semver===Sf){if(n.includePrerelease)return!0;t=Ef}const i=new Set;let r,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?r=Af(r,t,n):"<"===t.operator||"<="===t.operator?o=Nf(o,t,n):i.add(t.semver);if(i.size>1)return null;if(r&&o){if(a=xf(r.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==r.operator||"<="!==o.operator))return null}for(const e of i){if(r&&!Mf(e,String(r),n))return null;if(o&&!Mf(e,String(o),n))return null;for(const i of t)if(!Mf(e,String(i),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!r||n.includePrerelease||!r.semver.prerelease.length)&&r.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,r)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=Af(r,e,n),s===e&&s!==r)return!1}else if(">="===r.operator&&!Mf(r.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=Nf(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!Mf(o.semver,String(e),n))return!1;if(!e.operator&&(o||r)&&0!==a)return!1}return!(r&&u&&!o&&0!==a)&&(!(o&&c&&!r&&0!==a)&&(!m&&!d))},Af=(e,t,n)=>{if(!e)return t;const i=xf(e.semver,t.semver,n);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},Nf=(e,t,n)=>{if(!e)return t;const i=xf(e.semver,t.semver,n);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};var Of=(e,t,n={})=>{if(e===t)return!0;e=new vf(e,n),t=new vf(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=Cf(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0};const Tf=hh,Lf=ch,If=Oh,Rf=Sh,wf=(e,t,n)=>{const i=[];let r=null,o=null;const a=e.sort(((e,t)=>gf(e,t,n)));for(const e of a){ff(e,t,n)?(o=e,r||(r=e)):(o&&i.push([r,o]),o=null,r=null)}r&&i.push([r,null]);const s=[];for(const[e,t]of i)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 kf=X({parse:Lh,valid:Rh,clean:kh,inc:Dh,diff:zh,major:_h,minor:Bh,patch:Vh,prerelease:Uh,compare:Wh,rcompare:Kh,compareLoose:Jh,compareBuild:Qh,sort:tp,rsort:ip,gt:op,lt:sp,eq:up,neq:dp,gte:hp,lte:fp,cmp:bp,coerce:kp,Comparator:Dp(),Range:qp(),satisfies:zp,toComparators:_p,maxSatisfying:jp,minSatisfying:Up,minVersion:Kp,validRange:Jp,outside:lf,gtr:cf,ltr:mf,intersects:pf,simplifyRange:wf,subset:Of,SemVer:If,re:Tf.re,src:Tf.src,tokens:Tf.t,SEMVER_SPEC_VERSION:Lf.SEMVER_SPEC_VERSION,RELEASE_TYPES:Lf.RELEASE_TYPES,compareIdentifiers:Rf.compareIdentifiers,rcompareIdentifiers:Rf.rcompareIdentifiers}),qf={BAR_IN_SECONDARY_AXIS:"0.23.1"};const Df=e=>!e||kf.lt(kf.coerce(e),kf.coerce(qf.BAR_IN_SECONDARY_AXIS)),Pf=({layoutService:e})=>{const t=!Df(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[ts.TYPE.BAR]:0,[ts.TYPE.LINE]:0,[ts.TYPE.MARKER]:0};return({series:i=ts.NOPE_SERIES},r)=>{const o=lh(i,t),a=mc(i);return{id:r,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${r}`,refIndex:r,isPrimary:o,scale:o?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,collection:o?es.COLLECTION.PRIMARY:es.COLLECTION.SECONDARY,options:sh({series:i,layoutService:e})}}})(e,t)),i=(e,t)=>e.filter((e=>mc(e)===t)).length,r=n.filter((e=>e.isPrimary)),o=n.filter((e=>!e.isPrimary)),a=[!!r.length&&r[0],!!o.length&&o[0]].filter((e=>!!e)),s=i(n,ts.TYPE.BAR),l=i(r,ts.TYPE.BAR),u=i(o,ts.TYPE.BAR),c=e=>n.filter((t=>mc(t)===e)),d=c(ts.TYPE.LINE).map((e=>$l(es.COMPONENT.POINT,e))),m=c(ts.TYPE.MARKER).map((e=>({key:$l(es.COMPONENT.MARKER,e),type:e.options.marker}))),h=m.map((e=>e.key)),p=[];l>0&&p.push(`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`),u>0&&p.push(`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`);const f=[...p,...d,...h],{MINI_CHART:g}=es.COMPONENT,v=c(ts.TYPE.LINE).map((e=>$l(g.LINE,e))),y=c(ts.TYPE.MARKER).map((e=>$l(g.MARKER,e))),S=e.meta.isContinuous?[`${g.BAR}-${ts.AXIS.PRIMARY}`,`${g.BAR}-${ts.AXIS.SECONDARY}`,...v,...y]:[];return{meta:{allSeries:n,primarySeries:r,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:u,measureAxes:a,pointComponentKeys:d,markerComponentKeys:h,barComponentKeys:p,seriesComponentKeys:f,miniComponentKeys:S,markers:m},query:{all:()=>n,seriesByAxis:e=>e?r:o,series:c,isPrimary:lh}}};function zf({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 $f({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(Se).then((e=>{var n;const i=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),o="K"===i&&r.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:r.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:zf({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function _f({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:i}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):i?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):$f({genericObjectModel:e,layoutService:t})}const Ff=e=>"number"==typeof e&&!Number.isNaN(e);function Bf({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const i=t.getHyperCubeValue("qMeasureInfo"),r=n.query.seriesByAxis(e).map((e=>i[e.refIndex])),o=r.filter((e=>mc(e.series)===ts.TYPE.BAR)),a=r.filter((e=>mc(e.series)===ts.TYPE.LINE)),s=r.filter((e=>mc(e.series)===ts.TYPE.MARKER));return{min:Math.min(...r.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...r.filter((e=>Ff(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>Ff(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>Ff(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>Ff(e.qMax))).map((e=>e.qMax)))}}}}function jf({isPrimary:e,layoutService:t,seriesModel:n}){const i=Bf({isPrimary:e,layoutService:t,seriesModel:n}),r=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const i=e.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:r}=n,o={min:NaN,max:NaN};return r.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>i.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=i({dataPage:e});return t.bar=r({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 Vf({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:i,seriesModel:r}){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:i}=t.meta,r=n.query.series(ts.TYPE.BAR).filter((t=>t.isPrimary===e)).length;return!i||r<2?Bf({isPrimary:e,layoutService:t,seriesModel:n}):jf({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:r});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:i}=t,r=i("measureAxes."+(e?0:1),{});if(r.autoMinMax)return n;const{minMax:o,min:a,max:s}=r;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:i}=t.meta;if(i){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:i}).then((({dataPage:t})=>{const{min:n,max:i,bar:s,line:l,marker:u}=a({dataPage:t}),c=r.query.seriesByAxis(e).some((e=>mc(e)===ts.TYPE.BAR)),d=Number((c?Math.min(n,0):n).toFixed(13)),m=Number((c?Math.max(i,0):i).toFixed(13)),h=Number((c?Math.min(s.min,0):s.min).toFixed(13)),p=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(h)?h:0,o.implicit.bar.max=Number.isFinite(p)?p: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 Hf({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 Uf({min:e,max:t,count:n,threshold:i,disable:r}){const o=function(e,t,n){const i=ui().domain([e,t]);return i.nice(n),i}(e,t,n),a={start:!0,stop:!0};if(!a.start||!a.stop){const[e,t]=o.domain(),i=o.ticks(n),r=i.length>=4?i[1]-i[0]:.1*e,s=i.length>=4?i[i.length-1]-i[i.length-2]:.1*t;o.domain([a.start?e:e-r,a.stop?t:t+s]),o.nice(n)}return o}const Yf=50,Wf=100,Xf=200,Kf=125;function Gf({config:{measureAxesRef:e},layoutService:t,size:n}){const i=(e=>{switch(e){case.5:return Yf;case 1:return Wf;case 2:return Xf;default:return e*Kf}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/i))}function Jf({config:e,chart:t,layoutService:n,dockService:i,measureText:r,size:o,min:a,max:s}){const l=Gf({config:e,layoutService:n,size:o}),u=Uf({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"===i.meta.major.orientation?"height":"width",h=e=>r(e)[m],p=t.formatter(e.formatter),f=()=>{const e=d.ticks.map(p);return!e.some(((t,n)=>e.indexOf(t)!==n))&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(h))<=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 Zf({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function Qf({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function eg({config:e,chart:t,extrema:n,min:i,max:r}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=Uf({min:i,max:r,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,i=e.length-t;return e.slice(n,i).some((e=>0===e))}({ticks:s}),u=l?Zf:Qf;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);return d.some(((e,t)=>d.indexOf(e)!==t))&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function tg({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 ng({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}){if("SPARK"===i.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=Jf({config:e,chart:t,layoutService:n,dockService:i,measureText:o,size:a,min:s,max:l});return Hf({extrema:r,ticks:u.ticks})?u:eg({config:e,chart:t,extrema:r,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const n=[];for(let i=0;i<e.length-1;i++){const r=e[i],o=(e[i+1]-r)/(t+1);for(let e=1;e<=t;e++)n.push(r+o*e)}return n}({ticks:u,count:1});return{min:c,max:d,values:[...tg({ticks:u,extrema:r}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function ig({config:e,chart:t,layoutService:n,dockService:i,measureText:r,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 ng({config:e,chart:t,layoutService:n,dockService:i,extrema:o,measureText:r,size:a,min:s,max:l})}function rg({config:e,chart:t,layoutService:n,extremumModel:i,dockService:r,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=i.query,u=function({chart:e,config:t,dockService:n,extremumModel:i,layoutService:r,seriesModel:o,themeService:a}){const{measureText:s}=B.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var i;const r=n.component(t.meta.seriesComponentKeys[0]),o=null!==(i=null==r?void 0:r.rect)&&void 0!==i?i:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=i.query.getExtrema();return ig({config:t,chart:e,layoutService:r,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:i,dockService:r,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 og({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return ve.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 ag({layoutService:e,seriesModel:t,colorService:n}){const{type:i,mode:r,fieldType:o}=n.getSettings();if("categorical"!==i)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===r?"measure"===o?()=>({type:ts.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===ts.TYPE.LINE?2:t!==ts.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:i}=s(e);return n!==ts.TYPE.MARKER||"bar"===i.marker||i.fill?t(e.value):"none"}}}}}}function sg({layout:e,defaultAuto:t}){const n=t(e),i=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:i?"measure":n.useBaseColors}}function lg({actions:e,appLayoutModel:t,appModel:n,chart:i,environment:r,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:u}){let c;const{theme:d,translator:m}=r,h={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return c=L({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:es.SCALE.COLOR}},config:{auto:sg,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>h.wrappedScales,legendComponents:()=>h.legendComponents,legendInteractions:()=>h.legendInteractions,updateLegend:t=>{const{components:n,interactions:o,scales:s}=function({viewState:e,chart:t,layoutService:n,seriesModel:i,environment:r,colorService:o,actions:a,styleModel:s}){const{options:l}=r,u={eventName:"legend-c",key:es.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:ag({layoutService:n,seriesModel:i,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,i=m[`${es.SCALE.COLOR}Range`];return!i||"right"!==n&&"left"!==n||(i.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:i,environment:r,colorService:c,seriesModel:l,layoutService:a,actions:e,styleModel:t});h.wrappedScales=s,h.legendComponents=n,h.legendInteractions=o}}}),c}const ug="REJECTED",cg=()=>{},dg=2,mg=20,hg=200,pg=10;var fg={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)),i=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),r=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,r-e.qArea.qTop),s=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+i-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:r,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 i=n.qTop-pg<=t.qTop,r=n.qLeft+n.qWidth+pg>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+pg>=t.qTop+t.qHeight,a=n.qLeft-pg<=t.qLeft;return i&&t.qTop>0||r&&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 gg={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)),i=Math.max(t.qTop,e.qArea.qTop),r=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,i-e.qArea.qTop),a=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-i-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:i,qLeft:r},qData:[{...e.qData[0],qUp:i,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 i=n.qTop-pg<=t.qTop,r=n.qTop+n.qHeight+pg>=t.qTop+t.qHeight;return i&&t.qTop>0||r&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var vg={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 yg="pages";const Sg="discretePan";function Mg({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:Sg,pointers:1,threshold:10,enable(i,r){return this.started===Sg||!r||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>e.key===n))}},events:{[`${Sg}start`](e){e.preventDefault(),this.started=Sg;const t="horizontal"===i.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${Sg}move`](e){e.preventDefault();const t="horizontal"===i.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&r?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${Sg}end`](e){e.preventDefault(),this.started=!1},[`${Sg}cancel`](e){e.preventDefault(),this.started=!1}}}}function xg({chart:e,componentKey:t,actions:n,scroller:i}){return function(r){if(!n.scroll.enabled()||!i.enabled())return;const[o]=e.componentsFromPoint({x:r.clientX,y:r.clientY}).filter((e=>e.key===t));if(!o)return;r.preventDefault();const a=Math.abs(r.deltaY)>Math.abs(r.deltaX)?r.deltaY:r.deltaX,s=100*Math.sign(-a);i.scroll(s)}}function bg({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 i=Math.min(t,Math.max(hg,n));return{width:e,height:Math.max(mg,Math.min(n*dg,i))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:i,height:r}=t({width:e.qWidth,height:e.qHeight}),o=r?Math.ceil((r-e.qHeight)/2):0,a=i?Math.ceil((i-e.qWidth)/2):0;return{qHeight:r?Math.min(r,n.height):e.qHeight,qWidth:i?Math.min(i,n.width):e.qWidth,qTop:r?Math.max(0,Math.min(e.qTop-o,n.height-r)):e.qTop,qLeft:i?Math.max(0,Math.min(e.qLeft-a,n.width-i)):e.qLeft}}}function Eg(e){let t,n;const i=r=>{t=r;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(ug),t=null,void(n&&(i(n),n=null));t.resolve(e[0]),t=null}))},r=e=>new Promise(((r,o)=>{const a={request:e,resolve:r,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(ug),n=e})(a):i(a)}));return r.isProcessing=()=>!!t,r.hasQueued=()=>!!n,r.cancel=()=>{r.isProcessing()&&t.cancel(),r.hasQueued()&&(n.reject(ug),n=null)},r}const Cg={command:{update:()=>{}}};function Ag({dataStore:e,composition:t,enigmaModel:n,layoutService:i,trendLineModel:r=Cg,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:u}=t,c=function({dataStore:e,slice:t,warden:n,expand:i,request:r,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const i=e.getCurrent();if(a)return Promise.resolve(t(i,l));const r=n.release(i.qArea,l),s=o.isProcessing();if(!r&&s&&o.cancel(),!r||s)return Promise.resolve(t(i,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=i(l);return o(r(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:i.meta.size.x,height:i.meta.size.y}}),expand:bg({layoutService:i}),request:u({definitionPath:o}),process:Eg(n),connectionless:i.meta.isSnapshot,processDataPage:a}),d=O(((e,{onProcessing:t,onData:n})=>{c(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==ug)throw e}))}),50);return function(e,{onProcessing:t=cg,onDataPage:n=cg}={}){d(e,{onProcessing:t,onData:e=>{i.setDataPages(e?[e]:[]),r.command.update(),n(e)}})}}var Ng={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:i}){const{pixel:r}=t,o=e.getDataPages()[0],a=r/i;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var Og={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:i}){const r=void 0===i?4:i,o=Math.max(0,Math.floor(t)-r/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+r))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const{pixel:r}=t,o=e.getDataPages()[0],a=i/n.inView,s=(r+o.qArea.qTop*a)/i;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function Tg(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function Lg(e,t){const n=[];for(let i=0;i<e.length;i++){const r=t(e[i]);-1===n.indexOf(r)&&n.push(r)}return n.length}function Ig(e){return Lg(e.qMatrix,(e=>e[0].qElemNumber))-1}var Rg={inTotal:function({layoutService:e}){const t=Tg(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:i}){const r=Tg(e),o=void 0===i?r:i,a=t/(r+1),s=Math.max(0,Math.floor((t-a-o/2)/r));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/r+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const r=Tg(e),o=e.getDataPages()[0],a=i/n.inView,{pixel:s}=t,l=Ig(o),u=o.qArea.qHeight*r+l,c=(s+(o.qArea.qTop*r+o.qArea.qTop)*a)/i;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const wg=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function kg(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return wg(e,n);const i=((e,t)=>{const n={successful:!0,count:0};let i=Math.abs(Math.floor(t));const r=[];for(let t=0;t<=i;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===r.indexOf(o)&&(r.push(o),i--)}return n.count=r.length-1,n})(t.qMatrix,n);return i.successful?i.count:wg(e,n)},area(t,n,i){if(0!==t.qArea.qTop)return wg(e,n);return Lg(t.qMatrix.slice(0,i.qTop+1),(e=>e[0].qElemNumber))-1}}}var qg={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:i}){const r=kg(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-r));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(i+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:i,viewSize:r,upperBound:o}){const a=t.getDataPages()[0],s=r/i.inView,{item:l,pixel:u}=n,c=kg(t).area(e(),l,a.qArea),d=Ig(a),m=a.qArea.qHeight+d,h=u===o?(i.inView-m)*s/r:(u+(a.qArea.qTop+c)*s)/r;return[h,i.inView>=i.inTotal?h+1:h+m/i.inView]}};function Dg({chart:e,rect:t,dockService:n,itemWidths:i,axisKey:r,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:u,maxDataRows:c}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:h}=i[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:v}=s,y=p?t.width:t.height,S=y/l>=m;switch(f){case"max":return Math.min(l,c);case"custom":return Math.min(g,c);default:return u?y/h:S?function({chart:e,isHorizontal:t,axisKey:n,renderer:i={},isGrouped:r,itemSize:o,label:a}){if(r||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=i;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 h=(90-d)*(Math.PI/180);return m>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:r,renderer:o,isGrouped:a,itemSize:m,label:v})?y/d:l:y/d}}function Pg({chart:e,getRect:t,getDataPages:n,layoutService:i,dockService:r,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:i}=e.meta;return t?Ng:n?i?Rg:qg:Og}({layoutService:i}),h=()=>"horizontal"===r.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,f=(e,t)=>-(e-t)*p(t);return{getItems(){const n=i.getLayoutValue("dimensionAxis"),l=c({layoutService:i});return{inTotal:l,inView:Dg({chart:e,rect:t(),dockService:r,itemWidths:o(),axisKey:a,renderer:s,isGrouped:i.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(i.meta.dimensionCount+i.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t,r=Math.min(0,Math.max(e,f(n,i))),o=i?Math.abs(i*r/h()):0;return{start:{pixel:r,item:o},end:{item:Math.min(o+(i||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return f(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:i}){const r=e/n*t,o=Math.abs(i)/r;return[o,Math.min(1,o+e/r)]}({viewSize:h(),inTotal:n,inView:i,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:i,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=m({getDataPages:n,layoutService:i,offsets:e,items:t,viewSize:h(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===r.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:i}=t;return e<=0&&e>=f(n,i)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,i=e*p(n);return Number.isFinite(i)?-i:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:i}=t;return-e*(p(i)*n)}}}}function zg({chart:e,componentKey:t,state:n,dataStore:i,pageData:r,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,renderer:c,areaBuffer:d,viewState:m,rtl:h}){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 p=Pg({chart:e,getRect:()=>n.get("rect"),getDataPages:i.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,renderer:c,areaBuffer:d,rtl:h}),f=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const i=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",i),i},v=e=>{const t=Date.now(),i=f(),a=g({pixelOffset:e,items:i}),s=p.getArea({itemOffset:a.start.item,items:i});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((p.validate.offset({pixelOffset:e,items:i})||m.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:i})),m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:i})),m.set("scrollOffset",{start:a.start.item,end:a.end.item})));m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:i}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:i})),m.set("scrollOffset",{start:a.start.item,end:a.end.item}))};r(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 i=e.component(t);if(!i)return Promise.resolve();n.set("rect","function"==typeof l?l():i.rect),n.set("itemWidths","function"==typeof s?s():s);const a=f();n.set("itemSize",p.getItemSize({items:a}));const u=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:i,end:r}=n,a=1===t&&r?r-e.inView:i;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),c=g({pixelOffset:u,items:a});m.preventSet("viewRange",p.getViewRange({pixelOffset:c.start.pixel,items:a}));const d=p.getArea({itemOffset:c.start.item,items:a});return new Promise((e=>{r(d,{onDataPage:()=>{n.set("scaleRange",p.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"),i=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});v(i)}}}function $g({chart:e,actions:t,componentKey:n,enigmaModel:i,layoutService:r,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:m,renderer:h,areaBuffer:p,processDataPage:f=()=>{}}={}}){const g=A(),v=function({qMode:e}){switch(e){case"K":return gg;case"T":return vg;default:return fg}}({qMode:r.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(yg,[]),{add:t=>{const n=e.get(yg);n.length=0,n.push(t)},getCurrent:()=>e.get(yg)[0],getAll:()=>e.get(yg),contains:n=>t(e.get(yg)[0],n)}}({state:g,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const i=e.getDataPages()[0];if(!i)return;const r=n.patcher({layoutService:e});r.should(i)&&r(i),t.add(i)}({layoutService:r,dataStore:y,composition:v});const S=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),M=Ag({dataStore:y,composition:v,enigmaModel:i,layoutService:r,trendLineModel:a,definitionPath:c,processDataPage:f}),x=zg({chart:e,componentKey:n,state:g,dataStore:y,pageData:M,layoutService:r,dockService:o,itemWidths:s,getRect:d,axisKey:m,renderer:h,areaBuffer:S,viewState:l,rtl:u}),E=function({layoutService:e,dataStore:t}){return function(n){const i=b(n,`${e.refs.dataPages}`);i.length=0,i.push(t.getCurrent())}}({layoutService:r,dataStore:y}),C=function({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o}){return{gestures:[Mg({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o})],native:{type:"native",events:{wheel:xg({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:x});return{interactions:C,query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>y.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>E(e)}}}var _g={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 Fg({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 Bg({layoutService:e,dockService:t,themeService:n,colorService:i,flags:r}){const{BAR:o,LINE:a,POINT:s}=Kl,l=n.getStyles(),u=Fg({layoutService:e,key:"bar"}),c=Fg({layoutService:e,key:"line"}),d=()=>{const e=u({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},m=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0,h=(e,t)=>{const n=i.getPaletteColor;if(null!=e&&e.color&&n){const i=n(e);var r;return"none"===i&&e.index>0?null!==(r=null==e?void 0:e.color)&&void 0!==r?r:t:null!=i?i:t}return 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:()=>h(u({property:"strokeColor"}),o.STROKE.COLOR),label:{getStyle:()=>{var e,t,n,i;const r=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:h(null==r?void 0:r.color,l.label.value.color),useContrastColor:null===(t=null==r?void 0:r.useContrastColor)||void 0===t||t,fontSize:null!==(n=null==r?void 0:r.fontSize)&&void 0!==n?n:12,fontFamily:null!==(i=null==r?void 0:r.fontFamily)&&void 0!==i?i: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 i=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:h(null==i?void 0:i.color,l.label.value.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:l.label.value.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:l.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{var e,t,n;const i=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:h(null==i?void 0:i.color,l.label.value.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:l.label.value.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:l.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n;const i=null===(e=m("axis"))||void 0===e||null===(e=e.axis)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:l.axis.title.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:l.axis.title.fontSize,color:h(null==i?void 0:i.color,l.axis.title.color)}}},label:{getStyle:()=>{var e,t,n;const i=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:h(null==i?void 0:i.color,l.axis.label.name.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:l.axis.label.name.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:l.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n;const i=null===(e=m("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:l.legend.title.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:l.legend.title.fontSize,color:h(null==i?void 0:i.color,l.legend.title.color)}}},label:{getStyle:()=>{var e,t,n;const i=null===(e=m("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.label;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:l.legend.label.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:l.legend.label.fontSize,color:h(null==i?void 0:i.color,l.legend.label.color)}}}}}}}function jg({layoutService:e}){return I({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function Vg({dataset:e,data:t,valueData:n}){var i;const{source:r,label:o,value:a}=n,s=e(r.key).field(r.field);return he.shouldUseFormat(s.raw())?"-"===o||""===a||Number.isNaN(a)||"NaN"===a||null!==(i=t.null)&&void 0!==i&&i.value?"-":s.formatter()(a):o}function Hg({chart:e,actions:t,translator:n,rtl:i,dockService:r,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:h}=es.COMPONENT,{PRIMARY:p,SECONDARY:f}=ts.AXIS,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:i,DATA_OOB_MARKER:r,SLICED_HAT:o}=es.COMPONENT,{PRIMARY:a,SECONDARY:s}=ts.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,h=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===h&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const p=e.findShapes("path").find((e=>(e.key===`${i}-max-${a}`||e.key===`${i}-max-${s}`||e.key===`${r}-max`)&&e.data.major.value===h));if(u&&p)return{key:p.key,bounds:p.bounds};const f=e.findShapes("path").find((e=>(e.key===`${i}-min-${a}`||e.key===`${i}-min-${s}`||e.key===`${r}-min`)&&e.data.major.value===h)),g=e.findShapes("*").filter((e=>c.indexOf(e.key)>-1&&e.data&&e.data.major.value===h));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=p||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:r,seriesModel:o});return R({chart:e,translator:n,config:{rtl:i,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:c.fontFamily},main:{key:es.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:[es.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:m},placement:g},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${h}-max-${p}`,`${h}-max-${f}`,`${h}-min-${p}`,`${h}-min-${f}`,`${es.COMPONENT.BAR_OOB}-max-${p}`,`${es.COMPONENT.BAR_OOB}-max-${f}`,`${es.COMPONENT.BAR_OOB}-min-${p}`,`${es.COMPONENT.BAR_OOB}-min-${f}`,`${es.COMPONENT.DATA_OOB_MARKER}-max`,`${es.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:i,util:r})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(i.text({value:a,style:{bold:!0}})),s&&c.push(i.text({value:s}));const d=u.hideBasic();d&&!l.length&&(a||s)||c.push(i.text({value:o.data.label,style:{bold:!0}})),d||(c.push(i.color({nodes:t,property:es.SCALE.COLOR})),c.push(...t.map((e=>{const{segment:t,end:o}=e.data,a=t||o,{key:s,field:l}=a.source;return i.measure({label:r.dataset.title(s,l),value:Vg({dataset:n,data:e.data,valueData:a})})})))),l&&c.push(...l.map((e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(i.raw({value:u.chart.createLimitationRow()}))):c.push(i.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:m}=o.data;return u.isEnabled()&&m&&c.push(...m.map((t=>i.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:es.COMPONENT.LEGEND_TOOLTIP,component:es.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:Ug}=Qd,Yg=({picasso:e,chart:t,environment:m,flags:h,viewState:p,viewCache:f,actions:g,selectionService:v})=>{var y;const S=s(),{width:M,height:x}=r(),[E,C]=n(),[A,N]=n(),O=a(),T=l(),L=u(),I=c(),R=d(),z=ih({enable:!1===(null==E||null===(y=E.layoutService)||void 0===y||null===(y=y.meta)||void 0===y?void 0:y.isSnapshot)});i((()=>{if(!(S&&null!=t&&t.update&&m&&p&&v))return;const n=w({source:S,metaAdditionsFn:function({layout:e}){var t;const n=b(e,"qHyperCube.qMeasureInfo",[]),i=n.some((({series:e=ts.NOPE_SERIES})=>mc(e)===ts.TYPE.LINE)),r=ve.continuous(e,(()=>i&&ce.isTime(!0,e))),o=!Df(b(e,"version","")),a=n.filter((({series:e=ts.NOPE_SERIES})=>mc(e)===ts.TYPE.BAR)),s=a.length,l=a.filter((({series:e=ts.NOPE_SERIES})=>e.axis!==ts.AXIS.SECONDARY)).length,u=a.filter((({series:e=ts.NOPE_SERIES})=>e.axis===ts.AXIS.SECONDARY)).length,c=o?l>1||u>1:s>1,d=("grouped"!==b(e,"barGrouping.grouping")||r)&&c,m=!d&&s>1,h=o&&d&&(l>0&&u>1||l>1&&u>0),p=!(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:ce.canBeContinuous(e),isDiscrete:!r,isContinuous:r,isTime:ce.isTime(r,e),isSnapshot:ve.snapshot(e),isBarSeriesStacked:d,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:h,isGrouped:m||h,isGroupedByMeasure:m||h,isDimensionLocked:p,groupSize:h?2:s,hasLineSeries:i}}}),{options:i,translator:r}=m,{direction:o}=i,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},i=_f({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>i().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:O,layoutService:n}),l=k({app:T,translator:r}),u=q({chart:t,layoutService:n,config:{logicalSize:{width:M,height:x},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),c=Pf({layoutService:n}),d=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:i,seriesModel:r,viewState:o,rtl:a,actions:s,picasso:l}){return $g({chart:e,actions:s,componentKey:em(r),enigmaModel:t,layoutService:n,dockService:i,viewState:o,rtl:a,itemWidths:_g,options:{axisKey:es.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:O,layoutService:n,dockService:u,seriesModel:c,viewState:p,rtl:"rtl"===m.options.direction,actions:g,picasso:e}):void 0,y=n.meta.isContinuous?Ug({model:O,layoutService:n,viewState:p,viewCache:f}):void 0,E=D({theme:m.theme,config:{id:"comboChart",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),A=lg({actions:g,appLayoutModel:L,appModel:T,chart:t,environment:m,genericObjectModel:O,layoutService:n,picasso:e,seriesModel:c,viewState:p}),N=Bg({layoutService:n,dockService:u,themeService:E,colorService:A,flags:h}),z=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,i="qDimensionInfo/0",r=`${i}:numeric`;return{main:{major:i,majorNumeric:r,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:n?[{key:r,from:i,override:{value:e=>e.qNum}}]:void 0}}({layoutService:n,seriesModel:c}),$=Vf({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:c,continuousModel:y}),_=Vf({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:c,continuousModel:y}),F=jg({layoutService:n}),B=rg({config:{measureAxesRef:"measureAxes.0",formatter:es.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:$,dockService:u,seriesModel:c,themeService:E}),j=rg({config:{measureAxesRef:"measureAxes.1",formatter:es.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:_,dockService:u,seriesModel:c,themeService:E}),V=og({genericObjectModel:O,layoutService:n}),H=xs({flags:h,layout:S,app:T,model:O,picasso:e,chart:t,translator:r,localeInfo:L.qLocaleInfo,embed:R,options:i}),U=Hg({chart:t,actions:g,translator:r,rtl:a,dockService:u,seriesModel:c,colorService:A,themeService:E,propertiesModel:V,custom:H}),Y=Ia({layoutService:n,discreteModel:d}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:es.SCALE.MAJOR,MAJOR_INNER:es.SCALE.MAJOR_INNER,MINOR:{PRIMARY:es.SCALE.MINOR.PRIMARY,SECONDARY:es.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,BAR_SECONDARY:`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,AXIS:{MAJOR:es.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:es.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:es.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:es.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:es.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:es.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:es.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:es.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:es.COLLECTION.MAIN}}}}(n),X=P({picassoInstance:e,plugins:I,pluginArgs:W}),K=function({options:e,viewCache:t,layoutService:n}){const i={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||i.hasSlicedHats||i.isPartialUpdating||i.isSizeChanging||Ma.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:i}}({options:i,viewCache:f,layoutService:n});C({alternativeService:l,selectionService:v,genericObjectModel:O,appModel:T,dockService:u,styleModel:N,layoutService:n,fieldModel:z,seriesModel:c,reducedModel:s,primaryExtremumModel:$,secondaryExtremumModel:_,primaryTickModel:B,secondaryTickModel:j,propertiesModel:V,colorService:A,themeService:E,appLayoutModel:L,tooltipService:U,disclaimerService:F,flags:h,...d&&{discreteModel:d},...y&&{continuousModel:y},refLineModel:Y,pluginService:X,animationsModel:K})}),[S,O,T,L,m,null==t?void 0:t.update,p,v]);const[,$]=o((()=>{if(!E)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:i,primaryExtremumModel:r,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:u,disclaimerService:c,styleModel:d}=E,h=s?()=>{var e;s.update(t.getLayout());const n=s.initialFetch(),i=!t.meta.isSnapshot&&(null==m||null===(e=m.options)||void 0===e||null===(e=e.viewState)||void 0===e?void 0:e.zoom);return i&&p.preventSet("zoom",i),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(),i.command.initialize(),O?a.command.initialize():Promise.resolve(),f,h(),g.scroll.attachDiscreteModel(l)]).then((()=>Promise.all([r.command.initialize(),o.command.initialize()]).then((async()=>{await e.initialize({properties:a.query.getProperties()||{}}),c.initialize(),N({...E})}))))}),[E,z]);if($)throw $;return A};const Wg={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 Xg={query:{getCanScroll:()=>!0}};function Kg({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function Gg({setSelectionInfo:e,event:t,components:n,clear:i}){const r=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:r,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&r[0]===es.COMPONENT.LEGEND_CATEGORICAL}),i()}function Jg({chart:e,actions:t}){const r=S(),o=s(),[a,l]=n();return i((()=>{if(null==e||!e.update||!e.scale)return null;const n=e.scale(es.SCALE.MAJOR),i=$({chart:e,actions:t,selections:r,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:Kg},selectionEvents:{start:Gg}}});i.setLayout(o);const{destroy:a}=i;return l(i),()=>{a()}}),[r,null==e?void 0:e.update,null==e?void 0:e.scale]),i((()=>{null!=a&&a.setLayout&&o&&a.setLayout(o)}),[o]),a}const Zg={version:"1.33.5",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 Qg=e=>t=>{const n=t.qHyperCubeDef.qMeasures,i=[0,0,0];let r;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)r=mc(n[e].qDef.series),r===ts.TYPE.BAR?i[0]=1:r===ts.TYPE.LINE?i[1]=1:i[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(i.join(""),2)-1];return e.get(o)},ev=e=>(t,n)=>{let i;const r=t.qHyperCubeDef.qMeasures[n];if(r){const{type:e}=r.qDef.series;i=e===ts.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===ts.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else i=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(i)};function tv(e){var t,n;const i=e.qHyperCubeDef.qMeasures,r=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===r&&1===i.length&&mc(null===(n=i[0].qDef)||void 0===n?void 0:n.series)===ts.TYPE.LINE?e.color.mode="primary":"byDimension"===r&&i.length>1&&(e.color.mode="byMultiple")}function nv(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:Qg(t),added(e,t){fs.addCallbackCustomTooltip(t)},moved(e,t){fs.moveCallbackCustomTooltip(t,e)},removed(e,t){fs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,i){fs.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:15,description:ev(t),added({qDef:e},t){var n;tv(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:ts.TYPE.LINE,axis:ts.AXIS.SECONDARY}:e.series={type:ts.TYPE.BAR,axis:ts.AXIS.PRIMARY})},moved(e,t){tv(t)}}}}function iv(e){const t=nv(e);return{properties:Zg,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:i})=>{const r=Y.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:i}),o="linechart"===e.properties.visualization,a=[];r.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 r.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&re(!0,r.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),r},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const rv=({models:e,chart:t,viewState:n})=>{M((i=>{if(!e)return;const{layoutService:r,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=e,{width:c,height:d}=o.meta.chart.size;return i.snapshotData=i.snapshotData||{},i.snapshotData.content={size:{w:c,h:d}},r.meta.isSnapshot?Promise.resolve():(i.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,es.COMPONENT.LEGEND_CATEGORICAL)},r.meta.isDiscrete?(s.command.setSnapshotData(i),u.command.setSnapshotData(i)):l.setSnapshotData(i),a.getSnapshotData().then((e=>{i.snapshotData.content.chartData={...i.snapshotData.content.chartData,...e}})).catch((()=>{})))})),x((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,es.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])};const ov=e=>{const t=b(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=ts.NOPE_SERIES})=>mc(e)===ts.TYPE.LINE));return ve.continuous(e,(()=>t&&ce.isTime(!0,e)))},av=(e,t,n)=>{let i;const r=n||0;var o,a;"function"==typeof(null==e?void 0:e.getMeasureLayouts)?i=e.getMeasureLayouts():i=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 i.filter((e=>{const{series:t}=e||{};return 0===r?lh(t,!0):!lh(t,!0)}))},sv=(e,t)=>{const n=av(e,t,0).filter((e=>e.series.type===ts.TYPE.BAR)),i=av(e,t,1).filter((e=>e.series.type===ts.TYPE.BAR)),r="stacked"===b(t.layout,"barGrouping.grouping");return!ve.continuous(t.layout)&&r&&(n.length>1||i.length>1)},lv=(e,t,n,i,r=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!=r?r:n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:i.getStyle("object.comboChart",t,"color")})}}}}};function uv(e,t,n){const i=_({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)=>!ov(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:{...lv("bar.label.value","label.value",i,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:lv("line.label.value","label.value",i,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:lv("marker.label.value","label.value",i,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:lv("axis.title","axis.title",i,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:lv("axis.label.name","axis.label.name",i,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:lv("legend.title","legend.title",i,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:lv("legend.label","legend.label",i,t)}}}:void 0}}}const cv={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)=>!ov(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 dv(e){var t;return!(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t||!t.on)}function mv(e){var t,n;return dv(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 hv(e){var t;return dv(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.mode)}function pv(e){var t,n,i,r,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===(i=e.color)||void 0===i?void 0:i.colorExpression,s=null!==(r=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==r?r:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function fv(e){return hv(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function gv(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?[...pv(n),...fv(e)]:fv(e)}(t,n,e)))}function vv(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||ov(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"}]},i={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 mc(null===(t=e.qDef)||void 0===t?void 0:t.series)===ts.TYPE.MARKER}},r={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return mc(null===(t=e.qDef)||void 0===t?void 0:t.series)===ts.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)=>dv(...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 i;return null===(i=n.measureTitle)||void 0===i?void 0:i.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:i,seriesMarkerFill:r}},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,i=n.indexOf(t);return{index:-1===i?Math.min(6,n.length-1):i}},show:mv},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:hv}}}}}}}}}}}}const yv=10,Sv=!0;function Mv(e){return e.qHyperCube.qMeasureInfo.filter((e=>mc(e.series)===ts.TYPE.LINE)).length>0}function xv(e,t){const n=e.qHyperCube.qMeasureInfo.filter((e=>mc(e.series)===ts.TYPE.BAR));return n.filter((e=>e.series.axis!==ts.AXIS.SECONDARY)).length>t||n.filter((e=>e.series.axis===ts.AXIS.SECONDARY)).length>t}function bv(e){return e.qHyperCube.qMeasureInfo.filter((e=>mc(e.series)===ts.TYPE.MARKER)).length>0}const Ev=(e,t,n,i)=>{const r="vertical"===e.layout.orientation||ov(e.layout)?"y":"x",o=av(e,t,i).map((e=>e.qFallbackTitle));let a;return a=o.length?n.get(`properties.${r}AxisWithInfo`,[o.join(",")]):n.get(`properties.${r}Axis`),a};function Cv(e){var t,n,i;const{translator:r,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===(i=n.isUnsupportedFeature)||void 0===i?void 0:i.call(n,"continuousData"),u={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>gv(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>dv(e)))}}},c=e=>e.qHyperCubeDef.qMeasures.some((e=>dv(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;b(t=e,"qDef.color.on",void 0)&&E(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!c(e)}}},h={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&&xv(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&&Mv(n.layout),convertFunctions:{get:(e,t,n,i)=>i.dataPoint.show&&i.dataPoint.showLineLabels,set(e,t,n,i,r){r.dataPoint.showLineLabels=e,r.dataPoint.show=e}},reset(e){E(e,"dataPoint.show",!1),E(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,i)=>"labels"===i.dimensionAxis.show||"none"===i.dimensionAxis.show,set(e,t,n,i,r){r.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t,n)=>r.get(av(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&&av(e,t,0).length>0,convertFunctions:{get:(e,t,n,i)=>"labels"===i.measureAxes[0].show||"none"===i.measureAxes[0].show,set(e,t,n,i,r){r.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&&av(e,t,1).length>0,convertFunctions:{get:(e,t,n,i)=>"labels"===i.measureAxes[1].show||"none"===i.measureAxes[1].show,set(e,t,n,i,r){r.measureAxes[1].show=e?"labels":"all"}}}}}}},p={uses:"settings",items:{simpleStyling:cv,simpleLabels:h,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:uv(o,s,r),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)=>xv(n.layout,1)&&!ov(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)=>ov(n.layout),convertFunctions:(f="vertical",{get:(e,t,n)=>ov(n.layout)?f:e(t.type),set(e,t,n,i){t(n.type,ov(i.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)=>!ov(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)=>Mv(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>Mv(e)},show:(e,t,n)=>Mv(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=>xv(e,0)},show:(e,t,n)=>xv(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>xv(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&&sv(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&&sv(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>bv(e)},show:(e,t,n)=>bv(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 i=[],r=n.layout.qHyperCube.qMeasureInfo,o=d(r,0),a=d(r,1);return o&&i.push({translation:"properties.axis.primary",value:0}),a&&i.push({translation:"properties.axis.secondary",value:1}),i},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,i){var r;const o=null!==(r=i.gridLine.axis)&&void 0!==r?r:0,a=n.layout.qHyperCube.qMeasureInfo,s=d(a,0),l=d(a,1);return 0===o&&!s&&l?(E(i,"gridLine.axis",1),1):1===o&&s&&!l?(E(i,"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||ov(t.layout)?"x":"y",i=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=i?r.get(`properties.${n}AxisWithInfo`,[i]):r.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",i="Common.Top";return"vertical"===t.layout.orientation||ov(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!ov(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:yv,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:i}=e.dimensionAxis;return i<0||i>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:i}=e.dimensionAxis;i<1?e.dimensionAxis.maxVisibleItems=yv:i>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,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)=>Ev(t,n,r,0),show:(e,t,n)=>av(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>Ev(t,n,r,0),show:(e,t,n)=>av(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)&&lh(null==e?void 0:e.series,Sv)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&av(t,n,0).length>0,options(e,t){let n="Common.Bottom",i="Common.Top";return("vertical"===t.layout.orientation||ov(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&av(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)=>av(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,i){const{autoMinMax:r,minMax:o,min:a}=(null==i?void 0:i.measureAxes[0])||{};return!0===r?"lowest":r||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,i,r){"zero"===e?(E(r,"measureAxes.0.autoMinMax",!1),E(r,"measureAxes.0.minMax","min"),E(r,"measureAxes.0.min",0)):E(r,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t,n)=>Ev(t,n,r,1),show:(e,t,n)=>av(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>Ev(t,n,r,1),show:(e,t,n)=>av(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)&&!lh(null==e?void 0:e.series,Sv)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&av(t,n,1).length>0,options(e,t){let n="Common.Bottom",i="Common.Top";return("vertical"===t.layout.orientation||ov(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&av(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)=>av(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,i){const{autoMinMax:r,minMax:o,min:a}=(null==i?void 0:i.measureAxes[1])||{};return!0===r?"lowest":r||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,i,r){"zero"===e?(E(r,"measureAxes.1.autoMinMax",!1),E(r,"measureAxes.1.minMax","min"),E(r,"measureAxes.1.min",0)):E(r,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var f;o.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(p.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 i,r;if(null!=a&&null!==(i=a.sense)&&void 0!==i&&null!==(r=i.isUnsupportedFeature)&&void 0!==r&&r.call(i,"includeZeroValues"))return!1;return!ov(n.layout)}}}},measures:vv(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=>lh(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,Sv)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!lh(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,Sv)},dimRefLines:{uses:"dimReflines"},plugins:null!=o&&o.isEnabled("CLIENT_TLV_694_PLUGINS_UI")&&null!=o&&o.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?Ga({translator:r,pluginOptions:[{value:"point",translation:r.get("Visualizations.Descriptions.Point")},{value:"line",translation:r.get("Visualizations.Descriptions.Line")}]}):void 0}};return e})(),settings:p}}}function Av(e){return e.qHyperCubeDef.qMeasures.filter((e=>mc(e.qDef.series)===ts.TYPE.LINE)).length>0}function Nv(){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)=>Av(e)||!ov(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=>mc(e.qDef.series)===ts.TYPE.BAR));return t?n.filter((e=>e.qDef.series.axis===ts.AXIS.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===ts.AXIS.SECONDARY)).length>1:n.length>1}(e,!Df(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!ov(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)=>!ov(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=>Av(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>Av(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>dv(e)))}}}}}}const Ov={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 Tv(e,t,n,i,r){const{axis:o,icon:a,tid:s,translation:l}=Ov[r];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await i.addLibraryMeasure(e.id):await i.addExpressionMeasure(e.name,""),t.qDef.series.type=r,t.qDef.series.axis=o,i.updateGlobalChangeListeners(),n.setProperties(i.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function Lv(e,t,n,i,r){!function(e,t,n){const{item:i}=e,r=["contextMenu.add",i.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:r,tid:"add-as"});Tv(i,o,t,n,"bar"),Tv(i,o,t,n,"line"),Tv(i,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,r),e.ColorBy(n,t,r),i()}function Iv(e){const t={},{tooltip:n}=e;if(n){var i;t.chart_tooltip_custom=!n.auto;const e=null===(i=n.chart)||void 0===i||null===(i=i.object)||void 0===i?void 0:i.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const Rv=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function wv(e){return{definition:Cv(e),softDefinition:Nv(),support:{snapshot:Rv,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:Lv,extendMetrics:Iv,importProperties:(t,n,i,r)=>{const o={layout:{templateId:n.templateId}};i.mapProperties(o);const a={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()},s=Y.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:nv(e),defaultPropertyValues:a,hypercubePath:r,extension:i});return function(e,t,n){const i="linechart"===n.properties.visualization,r=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:i?"line":"bar",axis:0,marker:"circle",markerFill:!0}),r.indexOf(e.qDef.series.axis)<0&&r.push(e.qDef.series.axis)}));const o=r.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&re(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),gv(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:(function(e){var t;e.qHyperCubeDef.qDimensions.forEach(Tt),null!==(t=e.qHyperCubeDef.qLayoutExclude)&&void 0!==t&&null!==(t=t.qHyperCubeDef)&&void 0!==t&&t.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(Tt)}(e),function(e){return Df(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=ts.NOPE_SERIES),void 0===t.series.type&&(t.series.type=ts.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===ts.TYPE.BAR?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY),t.series.type===ts.TYPE.BAR&&t.series.axis===ts.AXIS.SECONDARY&&(t.series.axis=ts.AXIS.PRIMARY)})),e.version=qf.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}}));
7
+ System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","qlik-chart-modules/react","qlik-object-conversion"],(function(e){"use strict";var t,n,i,r,o,a,s,l,u,c,d,m,h,p,f,g,v,y,S,M,x,b,E,C,A,N,O,T,L,I,R,w,k,q,D,P,z,$,_,F,B,j,V,H,U,Y;return{setters:[function(e){t=e.useElement,n=e.useState,i=e.useEffect,r=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,h=e.useTranslator,p=e.useTheme,f=e.useDeviceType,g=e.useConstraints,v=e.useLayout,y=e.useAction,S=e.useSelections,M=e.onTakeSnapshot,x=e.useImperativeHandle},function(e){b=e.getValue,E=e.setValue,C=e.createColor,A=e.cache,N=e.debouncer,O=e.throttler,T=e.pointLabelComponent,L=e.colorService,I=e.disclaimerService,R=e.tooltipService,w=e.layoutService,k=e.alternativeService,q=e.dockService,D=e.themeService,P=e.pluginService,z=e.storage,$=e.selectionService,_=e.fontResolver},function(e){F=e.default},function(e){B=e.default},function(e){j=e.default},function(e){V=e.reactRenderer,H=e.axisTitleComponent,U=e.disclaimerComponent},function(e){Y=e.default}],execute:function(){e("default",(function(e){var r;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(W).forEach((t=>{e.add(W[t])}))}}(e.translator);const{flags:a}=e,s=null===(r=e.anything)||void 0===r||null===(r=r.sense)||void 0===r?void 0:r.isUnsupportedFeature,l=Qm();return{qae:iv(e),ext:wv(e),component(){const e=function(){const[e,t]=n();return i((()=>t(A())),[]),e}(),r=function(){const[e,t]=n();return i((()=>{t(z({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),u=function(){const e=m(),t=h(),r=d(),o=p(),[a,s]=n(),l=f();return i((()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:r,deviceType:l})}),[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),c=function(){const e=g(),[t,r]=n(!1),[o,a]=n(!1),[s,l]=n(!1),u=function(){const e=g(),[t,r]=n(!1),[o,a]=n({}),[s,l]=n();return i((()=>()=>{a({})}),[]),i((()=>{e&&r(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const i=null===(n=o[e])||void 0===n?void 0:n.indexOf(t);i>-1&&o[e].splice(i,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(),[r,o]=n(!1),[a,s]=n(!1),l=v(),u=h(),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);i((()=>{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:Wg,hidden:!r||!c||d,active:a,action:m})),[c,d,a,r,u.language()]),{action:m,enabled:()=>r,active:()=>a}}();let d=Xg;i((()=>{e&&(r(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=n({});return m.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||Xg}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=c,m.select=u,m}(),S=function({picasso:e,environment:r}){const o=t(),[a,s]=n();return i((()=>{if(!r)return;o.style.overflow="hidden";const t=e({renderer:{prio:[r.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[r]),a}({picasso:l,environment:u}),M=Jg({chart:S,actions:c}),x=Yg({picasso:l,chart:S,environment:u,flags:a,viewState:r,viewCache:e,actions:c,selectionService:M});!function({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:u,onZoomChange:c}}=Qd,[,d]=o((async()=>{if(!(null!=t&&t.update&&n&&i&&a&&s))return;const{layoutService:o,colorService:d,continuousModel:m,discreteModel:h,refLineModel:p,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:v}=f.meta,{options:y}=i,{viewState:S={}}=y,{legendScrollOffset:M,scrollOffset:x}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):S;a.preventSet("scrollOffset",x),a.preventSet("legendScrollOffset",M),a.preventSet("title",o.getLayoutValue("title"));const b=()=>{p&&p.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...bm,...v]}),g.meta.isPartialUpdating=!1};function E(o=!1){const u=Mm({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:a,viewCache:s,actions:l}),c=o&&[Em({models:n}),...Cm({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",b),o.meta.isContinuous&&(a.onChanged("zoom",c({layoutService:o,continuousDataModel:m},b)),a.intercept("zoom",u({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),E(!0),o.setDataPages(C),o.meta.isContinuous||await h.command.initialize(),E(!1),Ma.cacheProperties({viewCache:s,layout:o.getLayout()})}),[null==t?void 0:t.update,n,i]);if(d)throw d}({picasso:l,chart:S,models:x,environment:u,flags:a,viewState:r,viewCache:e,actions:c}),xm({picasso:l,chart:S,models:x,environment:u,flags:a,viewState:r,viewCache:e,actions:c,isUnsupportedFeature:s}),rv({models:x,chart:S,viewState:r})}}}));var W={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 X(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K=Object.prototype.hasOwnProperty,G=Object.prototype.toString,J=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,Q=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===G.call(e)},ee=function(e){if(!e||"[object Object]"!==G.call(e))return!1;var t,n=K.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&K.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||K.call(e,t)},te=function(e,t){J&&"__proto__"===t.name?J(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ne=function(e,t){if("__proto__"===t){if(!K.call(e,t))return;if(Z)return Z(e,t).value}return e[t]},ie=function e(){var t,n,i,r,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)i=ne(s,n),s!==(r=ne(t,n))&&(c&&r&&(ee(r)||(o=Q(r)))?(o?(o=!1,a=i&&Q(i)?i:[]):a=i&&ee(i)?i:{},te(s,{name:n,newValue:e(c,a,r)})):void 0!==r&&te(s,{name:n,newValue:r}));return s},re=X(ie);const oe=[["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}]],ae={};oe.forEach((([e,{width:t,height:n}])=>{ae[e]={width:t,height:n}}));const se={getLayoutModes:()=>ae,getLayoutMode(e,t){let n;for(n=0;n<oe.length;++n)if(e>=oe[n][1].width&&t>=oe[n][1].height)return oe[n][0];return"SPARK"}};const le=["$date","$timestamp","$time"],ue=["D","TS","T"],ce={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>le.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&ue.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(ce.hasTimeTag(t)&&ce.hasUnknownFormat(t)||ce.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&ce.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 i=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==i?void 0:i.length)&&void 0!==n?n:0)<1)&&ce.canBeContinuousDimension(i[0])},maxNumberOfLines:12},de=/^[A-Z][A-z0-9_]*$/i,me={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,"")}},he={setValue:(e,t,n)=>{if(!t)return!1;const i=t.split("."),r=i[i.length-1];let o,a=e;for(o=0;o<i.length-1;++o)void 0===a[i[o]]&&(a[i[o]]=Number.isNaN(+i[o+1])?{}:[]),a=a[i[o]];if(void 0!==n){const e=a[r];return a[r]=n,{updated:n,previous:e}}return delete a[r],!1},getValue:(e,t,n)=>{const i=t.split(".");let r,o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}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||de.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))},generateId:()=>me.id(),shouldUseFormat:e=>!e.isCustomFormatted&&(e.qIsAutoFormat||"U"===e.qNumFormat.qType)},pe=e=>he.getValue(e,"qHyperCube.qDimensionInfo",[]),fe=e=>he.getValue(e,"qHyperCube.qMeasureInfo",[]),ge=e=>he.getValue(e,"barGrouping.grouping"),ve={continuous:(e,t=!1)=>!!ce.canBeContinuous(e)&&(he.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!pe(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ge(e)&&(pe(e).length>1||fe(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&pe(e).length>1&&1===fe(e).length},groupedByMeasure(e){return this.grouped(e)&&1===pe(e).length&&fe(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ge(e)&&"butterfly"!==ge(e)||this.continuous(e))&&(pe(e).length>1||fe(e).length>1)},stackedByDimension(e){return this.stacked(e)&&pe(e).length>1&&1===fe(e).length},stackedByMeasure(e){return this.stacked(e)&&1===pe(e).length&&fe(e).length>1},simple:e=>0===pe(e).length||1===pe(e).length&&1===fe(e).length,snapshot:e=>!!he.getValue(e,"snapshotData")};function ye(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const Se=e=>{throw e.isHandled=!0,e};const Me={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?Me.getVerticalDock(t):n?Me.getOppositeDock(Me.getHorizontalDock(t)):Me.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},xe=166/26,be=12/11,Ee={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*xe)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),i=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,i=i?i.length:0;const r=t+n+i;return{latin:e.length-r,cjk:r}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const i={latin:0,cjk:0};let r;void 0===t?e.forEach((e=>{r=Ee.getCharacterRatios(e[n]),i.latin+=r.latin,i.cjk+=r.cjk})):e.forEach((e=>{r=Ee.getCharacterRatios(e[t][n]),i.latin+=r.latin,i.cjk+=r.cjk}));const o=Math.max(1,i.latin+i.cjk);return i.latinRatio=i.latin/o,i.cjkRatio=i.cjk/o,i},getAdjustedMaxGlyphCount(e,t,n,i="qText"){const r=Ee.getTotalCharacterRatios(t,n,i),o=r.latinRatio*e,a=r.cjkRatio*e;return Math.ceil(Ee.stringWidthOverMWidth(o)+a*be)}},Ce=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ae=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Ne=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Oe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Ce.test(e),isRtlChar:e=>Ae.test(e)||Ne.test(e),detectTextDirection(e){const t=e?e.length:0;let n,i;for(n=0;n<t;n++){if(i=e[n],Oe.isLtrChar(i))return"ltr";if(Oe.isRtlChar(i))return"rtl"}return"ltr"}},Te={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 i=t.data,r=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&i.fillTooltip){const e=r("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(i.fillTooltip.value):i.fillTooltip.label?i.fillTooltip.label:i.fillTooltip.value,!n.coloring.label){const e=o(i.fillTooltip.source.key).field(i.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===i._fillColor?Te.getNodeFillColor(t):i._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=Oe.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=Oe.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 i=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:i,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Oe.detectTextDirection(i)},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 i=Oe.detectTextDirection(t.color.label),r=n?[":",t.color.label]:[t.color.label,":"],o=Oe.detectTextDirection(t.color.value);return[{content:r,style:{"text-align":n?"right":"left",direction:i}},{content:n?[t.color.value,Te.getColorSymbol(e,t)]:[Te.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,i,r=!1){const o=Oe.detectTextDirection(e.label),a=i?[":",e.label]:[e.label,":"],s=Oe.detectTextDirection(e.value);let l;return l=r?i?[e.value,Te.getColorSymbol(t,n)]:[Te.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":i?"right":"left",direction:o}},{content:l,style:{"text-align":i?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Le(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ie(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Re(){}var we=.7,ke=1/we,qe="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ze=/^#([0-9a-f]{3,8})$/,$e=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),_e=new RegExp(`^rgb\\(${Pe},${Pe},${Pe}\\)$`),Fe=new RegExp(`^rgba\\(${qe},${qe},${qe},${De}\\)$`),Be=new RegExp(`^rgba\\(${Pe},${Pe},${Pe},${De}\\)$`),je=new RegExp(`^hsl\\(${De},${Pe},${Pe}\\)$`),Ve=new RegExp(`^hsla\\(${De},${Pe},${Pe},${De}\\)$`),He={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 Ue(){return this.rgb().formatHex()}function Ye(){return this.rgb().formatRgb()}function We(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ze.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xe(t):3===n?new Ze(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ke(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=$e.exec(e))?new Ze(t[1],t[2],t[3],1):(t=_e.exec(e))?new Ze(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Fe.exec(e))?Ke(t[1],t[2],t[3],t[4]):(t=Be.exec(e))?Ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=je.exec(e))?rt(t[1],t[2]/100,t[3]/100,1):(t=Ve.exec(e))?rt(t[1],t[2]/100,t[3]/100,t[4]):He.hasOwnProperty(e)?Xe(He[e]):"transparent"===e?new Ze(NaN,NaN,NaN,0):null}function Xe(e){return new Ze(e>>16&255,e>>8&255,255&e,1)}function Ke(e,t,n,i){return i<=0&&(e=t=n=NaN),new Ze(e,t,n,i)}function Ge(e){return e instanceof Re||(e=We(e)),e?new Ze((e=e.rgb()).r,e.g,e.b,e.opacity):new Ze}function Je(e,t,n,i){return 1===arguments.length?Ge(e):new Ze(e,t,n,null==i?1:i)}function Ze(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function Qe(){return`#${it(this.r)}${it(this.g)}${it(this.b)}`}function et(){const e=tt(this.opacity);return`${1===e?"rgb(":"rgba("}${nt(this.r)}, ${nt(this.g)}, ${nt(this.b)}${1===e?")":`, ${e})`}`}function tt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function it(e){return((e=nt(e))<16?"0":"")+e.toString(16)}function rt(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new at(e,t,n,i)}function ot(e){if(e instanceof at)return new at(e.h,e.s,e.l,e.opacity);if(e instanceof Re||(e=We(e)),!e)return new at;if(e instanceof at)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=t===o?(n-i)/s+6*(n<i):n===o?(i-t)/s+2:(t-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new at(a,s,l,e.opacity)}function at(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function st(e){return(e=(e||0)%360)<0?e+360:e}function lt(e){return Math.max(0,Math.min(1,e||0))}function ut(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Le(Re,We,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ue,formatHex:Ue,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ot(this).formatHsl()},formatRgb:Ye,toString:Ye}),Le(Ze,Je,Ie(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?we:Math.pow(we,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ze(nt(this.r),nt(this.g),nt(this.b),tt(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:Qe,formatHex:Qe,formatHex8:function(){return`#${it(this.r)}${it(this.g)}${it(this.b)}${it(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:et,toString:et})),Le(at,(function(e,t,n,i){return 1===arguments.length?ot(e):new at(e,t,n,null==i?1:i)}),Ie(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new at(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?we:Math.pow(we,e),new at(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new Ze(ut(e>=240?e-240:e+120,r,i),ut(e,r,i),ut(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new at(st(this.h),lt(this.s),lt(this.l),tt(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=tt(this.opacity);return`${1===e?"hsl(":"hsla("}${st(this.h)}, ${100*lt(this.s)}%, ${100*lt(this.l)}%${1===e?")":`, ${e})`}`}}));const ct=Math.PI/180,dt=180/Math.PI,mt=.96422,ht=.82521,pt=4/29,ft=6/29,gt=3*ft*ft,vt=ft*ft*ft;function yt(e){if(e instanceof St)return new St(e.l,e.a,e.b,e.opacity);if(e instanceof At)return Nt(e);e instanceof Ze||(e=Ge(e));var t,n,i=Et(e.r),r=Et(e.g),o=Et(e.b),a=Mt((.2225045*i+.7168786*r+.0606169*o)/1);return i===r&&r===o?t=n=a:(t=Mt((.4360747*i+.3850649*r+.1430804*o)/mt),n=Mt((.0139322*i+.0971045*r+.7141733*o)/ht)),new St(116*a-16,500*(t-a),200*(a-n),e.opacity)}function St(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function Mt(e){return e>vt?Math.pow(e,1/3):e/gt+pt}function xt(e){return e>ft?e*e*e:gt*(e-pt)}function bt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Et(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ct(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof At)return new At(e.h,e.c,e.l,e.opacity);if(e instanceof St||(e=yt(e)),0===e.a&&0===e.b)return new At(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*dt;return new At(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new At(e,t,n,null==i?1:i)}function At(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function Nt(e){if(isNaN(e.h))return new St(e.l,0,0,e.opacity);var t=e.h*ct;return new St(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Le(St,(function(e,t,n,i){return 1===arguments.length?yt(e):new St(e,t,n,null==i?1:i)}),Ie(Re,{brighter(e){return new St(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new St(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 Ze(bt(3.1338561*(t=mt*xt(t))-1.6168667*(e=1*xt(e))-.4906146*(n=ht*xt(n))),bt(-.9787684*t+1.9161415*e+.033454*n),bt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Le(At,Ct,Ie(Re,{brighter(e){return new At(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new At(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Nt(this).rgb()}}));var Ot={isDark:function(e){return Ct(e).l<70}};function Tt(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach((e=>{e.qSortByNumeric=1,e.qSortByAscii=1}))}function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function It(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Lt(t(e),n)}),{left:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)<0?i=o+1:r=o}return i},right:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;e(t[o],n)>0?r=o:i=o+1}return i}}}var Rt=It(Lt).right,wt=Math.sqrt(50),kt=Math.sqrt(10),qt=Math.sqrt(2);function Dt(e,t,n){var i=(t-e)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=wt?10:o>=kt?5:o>=qt?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=wt?10:o>=kt?5:o>=qt?2:1)}function Pt(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=wt?r*=10:o>=kt?r*=5:o>=qt&&(r*=2),t<e?-r:r}function zt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var $t="$";function _t(){}function Ft(e,t){var n=new _t;if(e instanceof _t)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var i,r=-1,o=e.length;if(null==t)for(;++r<o;)n.set(r,e[r]);else for(;++r<o;)n.set(t(i=e[r],r,e),i)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Bt(){}_t.prototype=Ft.prototype={constructor:_t,has:function(e){return $t+e in this},get:function(e){return this[$t+e]},set:function(e,t){return this[$t+e]=t,this},remove:function(e){var t=$t+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===$t&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===$t&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===$t&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===$t&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===$t&&++e;return e},empty:function(){for(var e in this)if(e[0]===$t)return!1;return!0},each:function(e){for(var t in this)t[0]===$t&&e(this[t],t.slice(1),this)}};var jt=Ft.prototype;Bt.prototype={constructor:Bt,has:jt.has,add:function(e){return this[$t+(e+="")]=e,this},remove:jt.remove,clear:jt.clear,values:jt.keys,size:jt.size,empty:jt.empty,each:jt.each};var Vt=Array.prototype,Ht=Vt.map,Ut=Vt.slice;function Yt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Wt(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Xt(){}var Kt=.7,Gt=1/Kt,Jt="\\s*([+-]?\\d+)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",en=/^#([0-9a-f]{3,8})$/,tn=new RegExp("^rgb\\("+[Jt,Jt,Jt]+"\\)$"),nn=new RegExp("^rgb\\("+[Qt,Qt,Qt]+"\\)$"),rn=new RegExp("^rgba\\("+[Jt,Jt,Jt,Zt]+"\\)$"),on=new RegExp("^rgba\\("+[Qt,Qt,Qt,Zt]+"\\)$"),an=new RegExp("^hsl\\("+[Zt,Qt,Qt]+"\\)$"),sn=new RegExp("^hsla\\("+[Zt,Qt,Qt,Zt]+"\\)$"),ln={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 un(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function dn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=en.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?mn(t):3===n?new fn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?hn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?hn(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=tn.exec(e))?new fn(t[1],t[2],t[3],1):(t=nn.exec(e))?new fn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=rn.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=on.exec(e))?hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=an.exec(e))?Sn(t[1],t[2]/100,t[3]/100,1):(t=sn.exec(e))?Sn(t[1],t[2]/100,t[3]/100,t[4]):ln.hasOwnProperty(e)?mn(ln[e]):"transparent"===e?new fn(NaN,NaN,NaN,0):null}function mn(e){return new fn(e>>16&255,e>>8&255,255&e,1)}function hn(e,t,n,i){return i<=0&&(e=t=n=NaN),new fn(e,t,n,i)}function pn(e,t,n,i){return 1===arguments.length?((r=e)instanceof Xt||(r=dn(r)),r?new fn((r=r.rgb()).r,r.g,r.b,r.opacity):new fn):new fn(e,t,n,null==i?1:i);var r}function fn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function gn(){return"#"+yn(this.r)+yn(this.g)+yn(this.b)}function vn(){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 yn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Sn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xn(e,t,n,i)}function Mn(e){if(e instanceof xn)return new xn(e.h,e.s,e.l,e.opacity);if(e instanceof Xt||(e=dn(e)),!e)return new xn;if(e instanceof xn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),o=Math.max(t,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=t===o?(n-i)/s+6*(n<i):n===o?(i-t)/s+2:(t-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new xn(a,s,l,e.opacity)}function xn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function bn(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 En(e){return function(){return e}}function Cn(e){return 1==(e=+e)?An: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(i){return Math.pow(e+i*t,n)}}(t,n,e):En(isNaN(t)?n:t)}}function An(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):En(isNaN(e)?t:e)}Yt(Xt,dn,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:un,formatHex:un,formatHsl:function(){return Mn(this).formatHsl()},formatRgb:cn,toString:cn}),Yt(fn,pn,Wt(Xt,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Kt:Math.pow(Kt,e),new fn(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:gn,formatHex:gn,formatRgb:vn,toString:vn})),Yt(xn,(function(e,t,n,i){return 1===arguments.length?Mn(e):new xn(e,t,n,null==i?1:i)}),Wt(Xt,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new xn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Kt:Math.pow(Kt,e),new xn(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new fn(bn(e>=240?e-240:e+120,r,i),bn(e,r,i),bn(e<120?e+240:e-120,r,i),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 Nn=function e(t){var n=Cn(t);function i(e,t){var i=n((e=pn(e)).r,(t=pn(t)).r),r=n(e.g,t.g),o=n(e.b,t.b),a=An(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=o(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function On(e,t){t||(t=[]);var n,i=e?Math.min(t.length,e.length):0,r=t.slice();return function(o){for(n=0;n<i;++n)r[n]=e[n]*(1-o)+t[n]*o;return r}}function Tn(e,t){var n,i=t?t.length:0,r=e?Math.min(i,e.length):0,o=new Array(r),a=new Array(i);for(n=0;n<r;++n)o[n]=Dn(e[n],t[n]);for(;n<i;++n)a[n]=t[n];return function(e){for(n=0;n<r;++n)a[n]=o[n](e);return a}}function Ln(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function In(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Rn(e,t){var n,i={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=Dn(e[n],t[n]):r[n]=t[n];return function(e){for(n in i)r[n]=i[n](e);return r}}var wn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kn=new RegExp(wn.source,"g");function qn(e,t){var n,i,r,o=wn.lastIndex=kn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=wn.exec(e))&&(i=kn.exec(t));)(r=i.index)>o&&(r=t.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:In(n,i)})),o=kn.lastIndex;return o<t.length&&(r=t.slice(o),s[a]?s[a]+=r:s[++a]=r),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,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function Dn(e,t){var n,i,r=typeof t;return null==t||"boolean"===r?En(t):("number"===r?In:"string"===r?(n=dn(t))?(t=n,Nn):qn:t instanceof dn?Nn:t instanceof Date?Ln:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?Tn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Rn:In:On))(e,t)}function Pn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function zn(e){return+e}var $n=[0,1];function _n(e){return e}function Fn(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function Bn(e){var t,n=e[0],i=e[e.length-1];return n>i&&(t=n,n=i,i=t),function(e){return Math.max(n,Math.min(i,e))}}function jn(e,t,n){var i=e[0],r=e[1],o=t[0],a=t[1];return r<i?(i=Fn(r,i),o=n(a,o)):(i=Fn(i,r),o=n(o,a)),function(e){return o(i(e))}}function Vn(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),o=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)r[a]=Fn(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Rt(e,t,1,i)-1;return o[n](r[n](t))}}function Hn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Un(e,t){return function(){var e,t,n,i,r,o,a=$n,s=$n,l=Dn,u=_n;function c(){return i=Math.min(a.length,s.length)>2?Vn:jn,r=o=null,d}function d(t){return isNaN(t=+t)?n:(r||(r=i(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=i(s,a.map(e),In)))(n)))},d.domain=function(e){return arguments.length?(a=Ht.call(e,zn),u===_n||(u=Bn(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Ut.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Ut.call(e),l=Pn,c()},d.clamp=function(e){return arguments.length?(u=e?Bn(a):_n,d):u!==_n},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,i){return e=n,t=i,c()}}()(e,t)}function Yn(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Wn(e){return(e=Yn(Math.abs(e)))?e[1]:NaN}var Xn,Kn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gn(e){if(!(t=Kn.exec(e)))throw new Error("invalid format: "+e);var t;return new Jn({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 Jn(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 Zn(e,t){var n=Yn(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Gn.prototype=Jn.prototype,Jn.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 Qn={"%":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 Zn(100*e,t)},r:Zn,s:function(e,t){var n=Yn(e,t);if(!n)return e+"";var i=n[0],r=n[1],o=r-(Xn=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Yn(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 ei(e){return e}var ti,ni,ii,ri=Array.prototype.map,oi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ai(e){var t=void 0===e.grouping||void 0===e.thousands?ei:function(e,t){return function(n,i){for(var r=n.length,o=[],a=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(n.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(ri.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",r=e.decimal+"",o=void 0===e.numerals?ei:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(ri.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=Gn(e)).fill,c=e.align,d=e.sign,m=e.symbol,h=e.zero,p=e.width,f=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(f=!0,y="g"):Qn[y]||(void 0===g&&(g=12),v=!0,y="g"),(h||"0"===u&&"="===c)&&(h=!0,u="0",c="=");var S="$"===m?n:"#"===m&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",M="$"===m?i:/[%p]/.test(y)?a:"",x=Qn[y],b=/[defgprs%]/.test(y);function E(e){var n,i,a,m=S,E=M;if("c"===y)E=x(e)+E,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,i=1,r=-1;i<n;++i)switch(e[i]){case".":r=t=i;break;case"0":0===r&&(r=i),t=i;break;default:if(!+e[i])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),C&&0==+e&&"+"!==d&&(C=!1),m=(C?"("===d?d:s:"-"===d||"("===d?"":d)+m,E=("s"===y?oi[8+Xn/3]:"")+E+(C&&"("===d?")":""),b)for(n=-1,i=e.length;++n<i;)if(48>(a=e.charCodeAt(n))||a>57){E=(46===a?r+e.slice(n+1):e.slice(n))+E,e=e.slice(0,n);break}}f&&!h&&(e=t(e,1/0));var A=m.length+e.length+E.length,N=A<p?new Array(p-A+1).join(u):"";switch(f&&h&&(e=t(N+e,N.length?p-E.length:1/0),N=""),c){case"<":e=m+e+E+N;break;case"=":e=m+N+e+E;break;case"^":e=N.slice(0,A=N.length>>1)+m+e+E+N.slice(A);break;default:e=N+m+e+E}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)),E.toString=function(){return e+""},E}return{format:u,formatPrefix:function(e,t){var n=u(((e=Gn(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(Wn(t)/3))),r=Math.pow(10,-i),o=oi[8+i/3];return function(e){return n(r*e)+o}}}}function si(e,t,n,i){var r,o=Pt(e,t,n);switch((i=Gn(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(r=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Wn(t)/3)))-Wn(Math.abs(e)))}(o,a))||(i.precision=r),ii(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wn(t)-Wn(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(e){return Math.max(0,-Wn(Math.abs(e)))}(o))||(i.precision=r-2*("%"===i.type))}return ni(i)}function li(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var i,r,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((i=t<e)&&(r=e,e=t,t=r),0===(a=Dt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(r=Math.ceil(t-e+1));++s<r;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(r=Math.ceil(e-t+1));++s<r;)o[s]=(e-s)/a;return i&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var i=t();return si(i[0],i[i.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var i,r=t(),o=0,a=r.length-1,s=r[o],l=r[a];return l<s&&(i=s,s=l,l=i,i=o,o=a,a=i),(i=Dt(s,l,n))>0?i=Dt(s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i,n):i<0&&(i=Dt(s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i,n)),i>0?(r[o]=Math.floor(s/i)*i,r[a]=Math.ceil(l/i)*i,t(r)):i<0&&(r[o]=Math.ceil(s*i)/i,r[a]=Math.floor(l*i)/i,t(r)),e},e}function ui(){var e=Un(_n,_n);return e.copy=function(){return Hn(e,ui())},zt.apply(e,arguments),li(e)}ti=ai({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),ni=ti.format,ii=ti.formatPrefix;var ci=new Date,di=new Date;function mi(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},r.range=function(n,i,o){var a,s=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<i);return s},r.filter=function(n){return mi((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,i){if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););}))},n&&(r.count=function(t,i){return ci.setTime(+t),di.setTime(+i),e(ci),e(di),Math.floor(n(ci,di))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?function(t){return i(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}var hi=mi((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));hi.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mi((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):hi:null},hi.range;var pi=6e4,fi=36e5,gi=864e5,vi=6048e5,yi=mi((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()}));yi.range;var Si=mi((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())*pi)/gi}),(function(e){return e.getDate()-1}));function Mi(e){return mi((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())*pi)/vi}))}Si.range;var xi=Mi(0),bi=Mi(1),Ei=Mi(2),Ci=Mi(3),Ai=Mi(4),Ni=Mi(5),Oi=Mi(6);xi.range,bi.range,Ei.range,Ci.range,Ai.range,Ni.range,Oi.range;var Ti=mi((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()}));Ti.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mi((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},Ti.range;var Li=mi((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*pi)}),(function(e,t){return(t-e)/pi}),(function(e){return e.getUTCMinutes()}));Li.range;var Ii=mi((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*fi)}),(function(e,t){return(t-e)/fi}),(function(e){return e.getUTCHours()}));Ii.range;var Ri=mi((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/gi}),(function(e){return e.getUTCDate()-1}));function wi(e){return mi((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)/vi}))}Ri.range;var ki=wi(0),qi=wi(1),Di=wi(2),Pi=wi(3),zi=wi(4),$i=wi(5),_i=wi(6);ki.range,qi.range,Di.range,Pi.range,zi.range,$i.range,_i.range;var Fi=mi((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()}));Fi.range;var Bi=mi((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 ji(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 Vi(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 Hi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Bi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mi((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},Bi.range;var Ui,Yi,Wi={"-":"",_:" ",0:"0"},Xi=/^\s*\d+/,Ki=/^%/,Gi=/[\\^$*+?|[\]().{}]/g;function Ji(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(t)+r:r)}function Zi(e){return e.replace(Gi,"\\$&")}function Qi(e){return new RegExp("^(?:"+e.map(Zi).join("|")+")","i")}function er(e){for(var t={},n=-1,i=e.length;++n<i;)t[e[n].toLowerCase()]=n;return t}function tr(e,t,n){var i=Xi.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function nr(e,t,n){var i=Xi.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function ir(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function rr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function or(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function ar(e,t,n){var i=Xi.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function sr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function lr(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ur(e,t,n){var i=Xi.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function cr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function dr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function mr(e,t,n){var i=Xi.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function hr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function pr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function fr(e,t,n){var i=Xi.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function gr(e,t,n){var i=Xi.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function vr(e,t,n){var i=Xi.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function yr(e,t,n){var i=Ki.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function Sr(e,t,n){var i=Xi.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Mr(e,t,n){var i=Xi.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function xr(e,t){return Ji(e.getDate(),t,2)}function br(e,t){return Ji(e.getHours(),t,2)}function Er(e,t){return Ji(e.getHours()%12||12,t,2)}function Cr(e,t){return Ji(1+Si.count(Ti(e),e),t,3)}function Ar(e,t){return Ji(e.getMilliseconds(),t,3)}function Nr(e,t){return Ar(e,t)+"000"}function Or(e,t){return Ji(e.getMonth()+1,t,2)}function Tr(e,t){return Ji(e.getMinutes(),t,2)}function Lr(e,t){return Ji(e.getSeconds(),t,2)}function Ir(e){var t=e.getDay();return 0===t?7:t}function Rr(e,t){return Ji(xi.count(Ti(e)-1,e),t,2)}function wr(e){var t=e.getDay();return t>=4||0===t?Ai(e):Ai.ceil(e)}function kr(e,t){return e=wr(e),Ji(Ai.count(Ti(e),e)+(4===Ti(e).getDay()),t,2)}function qr(e){return e.getDay()}function Dr(e,t){return Ji(bi.count(Ti(e)-1,e),t,2)}function Pr(e,t){return Ji(e.getFullYear()%100,t,2)}function zr(e,t){return Ji((e=wr(e)).getFullYear()%100,t,2)}function $r(e,t){return Ji(e.getFullYear()%1e4,t,4)}function _r(e,t){var n=e.getDay();return Ji((e=n>=4||0===n?Ai(e):Ai.ceil(e)).getFullYear()%1e4,t,4)}function Fr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ji(t/60|0,"0",2)+Ji(t%60,"0",2)}function Br(e,t){return Ji(e.getUTCDate(),t,2)}function jr(e,t){return Ji(e.getUTCHours(),t,2)}function Vr(e,t){return Ji(e.getUTCHours()%12||12,t,2)}function Hr(e,t){return Ji(1+Ri.count(Bi(e),e),t,3)}function Ur(e,t){return Ji(e.getUTCMilliseconds(),t,3)}function Yr(e,t){return Ur(e,t)+"000"}function Wr(e,t){return Ji(e.getUTCMonth()+1,t,2)}function Xr(e,t){return Ji(e.getUTCMinutes(),t,2)}function Kr(e,t){return Ji(e.getUTCSeconds(),t,2)}function Gr(e){var t=e.getUTCDay();return 0===t?7:t}function Jr(e,t){return Ji(ki.count(Bi(e)-1,e),t,2)}function Zr(e){var t=e.getUTCDay();return t>=4||0===t?zi(e):zi.ceil(e)}function Qr(e,t){return e=Zr(e),Ji(zi.count(Bi(e),e)+(4===Bi(e).getUTCDay()),t,2)}function eo(e){return e.getUTCDay()}function to(e,t){return Ji(qi.count(Bi(e)-1,e),t,2)}function no(e,t){return Ji(e.getUTCFullYear()%100,t,2)}function io(e,t){return Ji((e=Zr(e)).getUTCFullYear()%100,t,2)}function ro(e,t){return Ji(e.getUTCFullYear()%1e4,t,4)}function oo(e,t){var n=e.getUTCDay();return Ji((e=n>=4||0===n?zi(e):zi.ceil(e)).getUTCFullYear()%1e4,t,4)}function ao(){return"+0000"}function so(){return"%"}function lo(e){return+e}function uo(e){return Math.floor(+e/1e3)}!function(e){Ui=function(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Qi(r),c=er(r),d=Qi(o),m=er(o),h=Qi(a),p=er(a),f=Qi(s),g=er(s),v=Qi(l),y=er(l),S={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:xr,e:xr,f:Nr,g:zr,G:_r,H:br,I:Er,j:Cr,L:Ar,m:Or,M:Tr,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:lo,s:uo,S:Lr,u:Ir,U:Rr,V:kr,w:qr,W:Dr,x:null,X:null,y:Pr,Y:$r,Z:Fr,"%":so},M={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:Br,e:Br,f:Yr,g:io,G:oo,H:jr,I:Vr,j:Hr,L:Ur,m:Wr,M:Xr,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:lo,s:uo,S:Kr,u:Gr,U:Jr,V:Qr,w:eo,W:to,x:null,X:null,y:no,Y:ro,Z:ao,"%":so},x={a:function(e,t,n){var i=h.exec(t.slice(n));return i?(e.w=p[i[0].toLowerCase()],n+i[0].length):-1},A:function(e,t,n){var i=d.exec(t.slice(n));return i?(e.w=m[i[0].toLowerCase()],n+i[0].length):-1},b:function(e,t,n){var i=v.exec(t.slice(n));return i?(e.m=y[i[0].toLowerCase()],n+i[0].length):-1},B:function(e,t,n){var i=f.exec(t.slice(n));return i?(e.m=g[i[0].toLowerCase()],n+i[0].length):-1},c:function(e,n,i){return C(e,t,n,i)},d:dr,e:dr,f:vr,g:sr,G:ar,H:hr,I:hr,j:mr,L:gr,m:cr,M:pr,p:function(e,t,n){var i=u.exec(t.slice(n));return i?(e.p=c[i[0].toLowerCase()],n+i[0].length):-1},q:ur,Q:Sr,s:Mr,S:fr,u:nr,U:ir,V:rr,w:tr,W:or,x:function(e,t,i){return C(e,n,t,i)},X:function(e,t,n){return C(e,i,t,n)},y:sr,Y:ar,Z:lr,"%":yr};function b(e,t){return function(n){var i,r,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!=(r=Wi[i=e.charAt(++s)])?i=e.charAt(++s):r="e"===i?" ":"0",(o=t[i])&&(i=o(n,r)),a.push(i),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function E(e,t){return function(n){var i,r,o=Hi(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?(r=(i=Vi(Hi(o.y,0,1))).getUTCDay(),i=r>4||0===r?qi.ceil(i):qi(i),i=Ri.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=ji(Hi(o.y,0,1))).getDay(),i=r>4||0===r?bi.ceil(i):bi(i),i=Si.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.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),r="Z"in o?Vi(Hi(o.y,0,1)).getUTCDay():ji(Hi(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Vi(o)):ji(o)}}function C(e,t,n,i){for(var r,o,a=0,s=t.length,l=n.length;a<s;){if(i>=l)return-1;if(37===(r=t.charCodeAt(a++))){if(r=t.charAt(a++),!(o=x[r in Wi?t.charAt(a++):r])||(i=o(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return S.x=b(n,S),S.X=b(i,S),S.c=b(t,S),M.x=b(n,M),M.X=b(i,M),M.c=b(t,M),{format:function(e){var t=b(e+="",S);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=b(e+="",M);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}(e),Ui.format,Ui.parse,Yi=Ui.utcFormat,Ui.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 co=1e3,mo=6e4,ho=36e5,po=864e5,fo=2592e6,go=31536e6;function vo(e){return new Date(e)}function yo(e){return e instanceof Date?+e:+new Date(+e)}function So(e,t,n,i,r,o,a,s,l){var u=Un(_n,_n),c=u.invert,d=u.domain,m=l(".%L"),h=l(":%S"),p=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),S=l("%Y"),M=[[a,1,co],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,mo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,ho],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,po],[i,2,1728e5],[n,1,6048e5],[t,1,fo],[t,3,7776e6],[e,1,go]];function x(s){return(a(s)<s?m:o(s)<s?h:r(s)<s?p:i(s)<s?f:t(s)<s?n(s)<s?g:v:e(s)<s?y:S)(s)}function b(t,n,i,r){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(i-n)/t,a=It((function(e){return e[2]})).right(M,o);a===M.length?(r=Pt(n/go,i/go,t),t=e):a?(r=(a=M[o/M[a-1][2]<M[a][2]/o?a-1:a])[1],t=a[0]):(r=Math.max(Pt(n,i,t),1),t=s)}return null==r?t:t.every(r)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(Ht.call(e,yo)):d().map(vo)},u.ticks=function(e,t){var n,i=d(),r=i[0],o=i[i.length-1],a=o<r;return a&&(n=r,r=o,o=n),n=(n=b(e,r,o,t))?n.range(r,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?x:l(t)},u.nice=function(e,t){var n=d();return(e=b(e,n[0],n[n.length-1],t))?d(function(e,t){var n,i=0,r=(e=e.slice()).length-1,o=e[i],a=e[r];return a<o&&(n=i,i=r,r=n,n=o,o=a,a=n),e[i]=t.floor(o),e[r]=t.ceil(a),e}(n,e)):u},u.copy=function(){return Hn(u,So(e,t,n,i,r,o,a,s,l))},u}function Mo(){return zt.apply(So(Bi,Fi,ki,Ri,Ii,Li,yi,hi,Yi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const xo={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"}}},bo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var Eo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:i}=this.settings.settings,[r,o]=t(),a=Math.abs(r)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=xo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:bo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:bo(t.shadow.endOffset)}}})(n),u="horizontal"===n&&i,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 Co({viewState:e,viewCache:t,layoutService:n,dockService:i,rtl:r}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:i.meta.major.orientation,rtl:r,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-i)/(r-i),(n.max-i)/(r-i)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Ao;function No(){Ao=Ao||document.createElement("canvas").getContext("2d")}const Oo={measureTextWidth(e){No();const{width:t}=Ao.measureText(e);return t},lineWrap(e,t,n,i){let r,o;No();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof i&&a.length>=i)return a.slice(0,i);for(n&&(Ao.font=n),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[h]=m,c="",r=1;r<m.length;r++)if(l=`${h} ${m[r]}`,u=Oo.measureTextWidth(l),u>t&&("number"!=typeof i||i>s.length)?(s.push(h),h=m[r]):h=l,"number"==typeof i&&s.length>=i){c=m.slice(r+1).join(" ");break}"number"!=typeof i||s.length<i?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${c}`}return s},wordWrap(e,t,n,i,r){if(No(),!e||!e.length)return[];n&&(Ao.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||Oo.measureTextWidth(u)<=t?o.push(u):(s=Oo.splitWord(u,t,void 0,i-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?Oo.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=i?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>i?(o=o.splice(0,i),o[o.length-1]=Oo.truncate(o[o.length-1],t,n,r).text):(u=o[o.length-1],u&&u.length>1&&Oo.measureTextWidth(u)>t&&(o[o.length-1]=Oo.truncate(u,t,n,r).text)),o},truncate(e,t,n,i="…"){No();let r,o,a,s,l=e;const u=Oo.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Ao.font=n),e&&t){if(Oo.measureTextWidth(l)>t){for(r=Math.min(c,l.length);r>0;r--)if(o=l.substring(0,r-1),a=o.trim()+i,Oo.measureTextWidth(a)<=t){s=l.substring(r-1),l=a;break}r||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,i){let r;No();let o,a=e,s="",l=[];if(Oo.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/i);for(r=Math.min(e.length,u);r>0&&(a=e.substring(0,r),o=e.substring(r-1,r)," "===o?a=e.substring(0,r-1):a+="-",s=e.substring(r),!(Oo.measureTextWidth(a)<=t));r--);return(!r&&!a||Oo.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Oo.measureTextWidth(s)>t?(s=Oo.explodeWord(s,t,n-1,i),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,i)=>(No(),e&&t?(n&&(Ao.font=n),Oo.explodeWord(e,t,i,Math.max(1,Oo.measureTextWidth("i")))):[]),wrapText(e,t,n,i,r){let o;return Number.isNaN(t)?[e]:(o=i>1?Oo.lineWrap(e,t,n,i):[e],o=Oo.wordWrap(o,t,n,i,r),o)},getFontHeight:e=>(No(),e&&(Ao.font=e),1.5*Oo.measureTextWidth("m")),tokenize(e,t,n,i,r,o,a=1){No(),t&&(Ao.font=t);const s=Oo.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):i||1;return Array.isArray(i)?(i.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),i.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(i)||i<=0?m:Math.min(m,i)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(Oo.wrapText(e,r,t,u[n])))})):d=Oo.wrapText(e,r,t,u[0],n),d}},To={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:i,rendHeight:r,flipXY:o,symbol:a}){let s="x",l="y",u=i,c=r,d=t<.5?90:-90;return o&&(s="y",l="x",u=r,c=i,d=t<.5?180:0),a(re({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};re.bind(null,!0);const Lo=Math.log(10);function Io(e){return 10**e}const Ro={pow10:Io,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/Lo,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))/Lo),i=e/Io(n);return t=i<=1?1:i<=2?2:i<=5?5:10,t*Io(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/Lo);const i=e/Io(t);return i<1?(n=5,t--):n=i<2?1:i<5?2:5,n*Io(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return Io(Math.floor(Math.log(Math.abs(e))/Lo))},getFraction(e){if(0===e)return 0;return e/Io(Math.floor(Math.log(Math.abs(e))/Lo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/Lo),i=e/Io(n);return t=Math.ceil(i),7!==t&&9!==t||t++,i>1&&i<=1.5?t=1.5:i>2&&i<=2.5&&(t=2.5),t*Io(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},wo=[[2,4,6],[2,4],[3]],ko=[,[,,[[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 qo(e,t,n){const i=e?e.length:0;let r,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(r=1;r<i;r++)o=Math.min(o,e[r]/e[r-1]);void 0!==n&&(o=Math.min(o,n/e[i-1])),e.splice(0,0,o)}function Do(e,t,n){let i;const r=e?e.length:0;for(i=0;i<r;i++)qo(e[i],t,n)}!function(){let e,t;for(Do(wo,1,10),e=0;e<ko.length;e++)if(ko[e])for(t=0;t<ko[e].length;t++)Array.isArray(ko[e][t])&&Do(ko[e][t])}();const Po={isInside(e,t,n,i){if(!i)return!0;const r=e.position-e.radius,o=e.position+e.radius;return r>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,i=e.position<t.position?t:e;return i.position-i.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 i=Po.findSegmentPositionMeetMin(e,t);return Po.findSegmentPositionMeetMax({center:i,max:i+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const i=Po.findSegmentPositionMeetMax(e,n);return Po.findSegmentPositionMeetMin({center:i,min:i-e.radius},t)},layoutPositionFromMin(e,t,n,i=0){const r=e.length-1;let o,a,s=t;for(let t=0;t<r;t++)o=e[t],a=e[t+1],o.position=Po.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-i)/2),s=o.position+o.radius+i/2;a.position=Po.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,i=0){const r=e.length-1;let o,a,s;const l=Math.max(0,e[r].position+e[r].radius-n);if(0===l)return;let u,c=0;for(o=r;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,Po.getGap(s,a)-i),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<=r;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,i=0){const r=e.length-1;if(!(r<0))if(0!==r)Po.layoutPositionFromMin(e,t,n,i),Po.adjustPositionFromMax(e,t,n,i);else{const i=e[0];i.position=Po.findSegmentPositionMeetMaxThenMin(i,t,n)}}},zo=(e,t,n,i=1)=>{const r=e.bandwidth();return n?"start"===t?r:"end"===t?r*(1-i):r*(2-i)/2:"start"===t?0:"end"===t?r*i:r*i/2},$o=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,_o=e=>e.filter($o),Fo=(e,t)=>_o(he.getValue(e,t,[])),Bo=e=>$o(e)&&(!1!==e.showValue||!1!==e.showLabel),jo=e=>e.filter(Bo),Vo=(e,t)=>jo(he.getValue(e,t,[])),Ho=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,Uo=(e,t,n)=>{const{dimensionRefLineInfo:i}=t;if(i[e])return i[e][n]},Yo=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:r}=n;return void 0!==i&&void 0!==r&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<i},Wo=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:i,qHeight:r}=n;return void 0!==i&&void 0!==r&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=i+r},Xo=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ko=({value:e,qMax:t})=>"NaN"!==t&&e>t,Go={isRefLineVisible:$o,getVisibleRefLines:_o,getRefLines:Fo,getMeasureRefLines:e=>Fo(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:Fo(e,"refLine.dimRefLines"),isRefLineLabelVisible:Bo,getVisibleRefLineLabels:jo,getRefLineLabels:Vo,getMeasureRefLineLabels:e=>Vo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:Vo(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:i,align:r,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let u;var l;if(a.meta.isGroupedByMeasure)return u=zo(s,r,o,null!==(l=a.meta.groupSize)&&void 0!==l?l:a.meta.measureCount),s([n,0])+u;if(a.meta.isGroupedByDimension){if(!i)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=i;let l;return u=zo(s,r,o,t),e&&e.length&&(l=(({pxScale:e,value:t,innerValues:n,invert:i,minOrder:r})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:i});for(let i=0;i<n.length;i++){const{id:a,order:s}=n[i],l=e([t,a]);if(void 0!==l)return l-o*(s-r)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===l?s(n):l)+u}return u=zo(s,r,o),s(n)+u}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:i})=>{var r;const{isGroupedByDimension:o}=i.meta,a={},s=he.getValue(e,"qHyperCube"),l="K"===s.qMode,u=n?n.query.getCurrentDataPage():he.getValue(s,"S"===s.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=l?"qData.0.qSubNodes":"qMatrix",d=he.getValue(u,c,[]),m=((e,t)=>e?t?"qValue":"qNum":"qText")(t,l);if(void 0===(null==u||null===(r=u.qArea)||void 0===r?void 0:r.qTop))return a;const h=(e=>e.qArea.qTop)(u);return l?(()=>{for(let e=0;e<d.length;e++){const t=d[e],n=e+h,i=t[m];a[i]||(a[i]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:d[e]})}})():o?(()=>{let e;for(let t=0;t<d.length;t++){const n=d[t][0],i=d[t][1],r=t+h,o=n[m];a[o]?(a[o].minOrder=Math.min(a[o].minOrder,r),a[o].maxOrder=Math.max(a[o].maxOrder,r),a[o].innerValues[a[o].innerValues.length]={id:i.qElemNumber,order:r}):a[o]={id:n.qElemNumber,qText:n.qText,minOrder:r,maxOrder:r,innerValues:[{id:i.qElemNumber,order:r}],dataNode:d[t]},0===t?0===r&&(a[o].isMinOrderOk=!0):o!==e&&(a[o].isMinOrderOk=!0,a[e].isMaxOrderOk=!0),e=o}})():(()=>{for(let e=0;e<d.length;e++){const t=d[e][0],n=e+h,i=t[m];a[i]||(a[i]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:d[e]})}})(),a},getInputValue:Ho,extractInfoFromInputValue:Uo,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=Ho({refLineLayout:e,layoutService:n});return Uo(i,t,"id")},isDiscreteMinOutOfBounds:Yo,isDiscreteMaxOutOfBounds:Wo,isContinuousMinOutOfBounds:Xo,isContinuousMaxOutOfBounds:Ko,isOutOfRange:({value:e,qMin:t,qMax:n})=>Xo({value:e,qMin:t})||Ko({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&Wo({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&Yo({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Jo=({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 Zo(e){return e.showValue?`… ${e.valueString}`:"…"}function Qo(e,t,n=70){for(let i=0;i<e.length;i++){const r=e[i],o=Jo({label:r,labelStyle:t});r.lines=Oo.tokenize(r.title,o,Zo(r),3,n),r.maxNumLines=r.lines.length}}function ea({title:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:r=200}){const o=Oo.tokenize(e,t,n,i,r),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function ta({oobs:e,font:t,ellipsis:n,maxNumLines:i=5,maxWidth:r=200}){const o=e.map((e=>ea({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:i,maxWidth:r}))),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 na(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const ia=3,ra=2;function oa({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const i=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${i}]`,"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 aa=({label:e,dataPages:t,qMin:n,qMax:i})=>{if(void 0!==n&&void 0!==i){const{inputValue:t}=e;if(Go.isContinuousMaxOutOfBounds({value:t,qMax:i}))return 1;if(Go.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Go.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Go.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},sa={hasEngineFormat:oa,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:i,orientation:r,rtl:o,isContinuous:a,isDimension:s}){const l=Go.getInvert({orientation:r,rtl:o,isContinuous:a}),u="S"===i.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=i.getHyperCubeValue(u),{canBeContinuous:d}=i.meta;let m,h;if(s&&d){const e=i.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,h=e.qMax}for(let r=0;r<e.length;r++){const o=e[r],{value:s,align:u,valueInfo:d}=o,p=aa({label:o,dataPages:c,qMin:m,qMax:h});o.scaledValue=1===p?l?-.1:1.1:-1===p?l?1.1:-.1:Go.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:i,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:i,localeInfo:r}){let o;if(n)for(let n=0;n<e.length;n++){const i=e[n],{value:a,inputValue:s,inputValueLabel:l}=i;o=oa({inputValue:s,inputValueLabel:l,localeInfo:r})?l:t?t(a):a,i.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,i.title=sa.getTitle(i)}else if(i)for(let t=0;t<e.length;t++){const n=e[t],{valueText:i,inputValue:a,inputValueLabel:s}=n;o=oa({inputValue:a,inputValueLabel:s,localeInfo:r})?s:i,n.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,n.title=sa.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,n.title=sa.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const i=e[n];i.totalWidth=t(i.title,i).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,i=0){const r=e.length-1;if(r<0)return;let o,a;if([o]=e,o.cMin=t,0!==r){for(let t=0;t<r;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-i)/2,a.cMin=o.cMax+i;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 i=t-1,r=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,r.length);for(let e=r.length-1;e>=r.length-o;e--)r[e].maxNumLines=i},reduceTotalMaxNumLines(e,t,n){const i=Math.floor(n/t);let r=3;do{const t=sa.getTotalNumLines(e)-i;if(t<=0)return;sa.reduceLabelsHavingMaxNumLines(e,r,t),r--}while(r>1)},reduceMaxNumLines(e,t,n=0){for(let i=0;i<e.length;i++){const r=e[i];r.maxNumLines=Math.max(1,Math.min(r.maxNumLines,Math.floor((Math.max(0,r.cMax-r.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,i){for(let r=0;r<e.length;r++){const o=e[r];o.width=Math.min(t,sa.measureLabelMaxLineWidth(o,i)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const i=e[n],{center:r}=i,o=i[t],a=o/2;i.segment={center:r,range:o,min:r-a,max:r+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:i,upperLimit:r,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:h,isContinuous:p,isDimension:f}){const g=e.map((e=>e)),v=n;sa.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:h,orientation:c,rtl:m,isContinuous:p,isDimension:f}),na(e,"center"),sa.addLabelsNeighborInfo(e,i,r,o),Qo(e,a,s),sa.reduceTotalMaxNumLines(g,l,r-(g.length-1)*o),"vertical"===c&&(sa.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let i=0;i<e.length;i++){const r=e[i],o=Jo({label:r,labelStyle:t});r.lines.length>r.maxNumLines&&(r.lines=Oo.tokenize(r.title,o,Zo(r),r.maxNumLines,n))}}(e,a,s)),sa.addLabelsSize(e,s,l,d),sa.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:i,area:r,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:u}=i,{minorCenter:c}=r,{fontSize:d,fontFamily:m,fontStyle:h,fontWeight:p,textDecoration:f,background:g}=t;let v=[];return e.forEach((e=>{const{lines:t}=e,i=t.length,r=t.map(((t,r)=>{const g={type:"text",text:t,title:ea({title:e.title,font:a,ellipsis:Zo(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||d,fontFamily:e.fontFamily||m,fontStyle:e.fontStyle||h,fontWeight:e.fontWeight||p,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+=(r-(i-1)/2)*o,g}));e.background&&v.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:i,label:r,lineHeight:o,background:a}){const{lines:s}=r,{borderRadius:l=ia,padding:u={}}=a,{top:c=ra,bottom:d=ra,left:m=ra,right:h=ra}=u,p=s.length,f={type:"rect",rx:l,ry:l,fill:r.background.fill,width:r.width+(m+h),height:r.height+(c+d),value:r.value,dock:i};return f[n]=e,f[t]=r.segment.position,f.x-=r.width/2+m,f.y-=p*o/2+c,f}({minorCenter:c,majorAxis:s,minorAxis:l,dock:u,label:e,lineHeight:o,background:g})),v=v.concat(r)})),v}};function la(e,t,n){let i;const r=typeof t;if("string"===r||"object"===r)i=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;i=e&&e[0]?e[0].formatter():null}return i}function ua(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:i,bottom:r,maxLabelWidth:o}=t;let a=1;return sa.getMaxTextWidth(e)>o&&(Qo(e,t,o),a=Math.max(...e.map((e=>e.lines.length)))),a*n+i+r}(t,n):function(e,t){const{left:n,right:i,maxLabelWidth:r}=t;return Math.min(r,sa.getMaxTextWidth(e))+n+i}(t,n)}function ca(e,t){return t?e.domain():[0,1]}function da(e,t,n,i="value"){let r=e.filter((e=>e[i]>=t));r=r.filter((e=>e[i]<=n));const o=e.filter((e=>e[i]<t)),a=e.filter((e=>e[i]>n));return{filteredLabels:r,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function ma(e){let t,n=0;for(let i=1;i<10;i++)t=e(i),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 ha(e,t){return e>9?t[1]:t[0]}function pa({alignment:e,dockValue:t,oobs:n,style:i,rect:r,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:h,minorDimension:p,dock:f}=s,g=r[p],v=To.createOob({oob:To.getDefaultSettings({size:i.size,fill:i.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:r.width,rendHeight:r.height,flipXY:d,symbol:o});v.dock=f;const y=`c${m}`,S=`c${h}`,M={type:"circle",r:l,stroke:"transparent",fill:i.text.background.fill,strokeWidth:0,dock:f};M[S]=g/2,M[y]=a;const x={type:"text",text:c>9?"9+":c,title:ta({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:i.text.fontSize,fontFamily:i.text.fontFamily,fill:i.text.fill,baseline:"central",anchor:"middle",dock:f};return x[h]=g/2,x[m]=a,[v,M,x]}const fa=e=>{const t=Jo({labelStyle:e}),n=Oo.getFontHeight(t)*(e.lineHeightMultiplicator||1),i=e.gap||12,r=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:i,maxLabelWidth:r,top:o,bottom:a,left:s,right:l}},ga=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 va={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:i,localeInfo:r}=this.settings,o=!!i||n.meta.canBeContinuous,a=ga(this.settings.labels),s=la(this.chart,this.settings.formatter,e);sa.addLabelTitles({labels:a,formatter:s,isContinuous:i,canBeContinuous:o,localeInfo:r});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:i,layoutService:r})=>{if(n){const[i,r]=ca(t,n);return da(e,i,r)}if(i){const t=r.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:i}=t;if("NaN"!==n&&"NaN"!==i)return da(e,n,i,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:i,canBeContinuous:o,layoutService:n});let d;if(this.measureText=(e,n)=>{const{fontSize:i,fontFamily:r,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:i||t.label.fontSize,fontFamily:r||t.label.fontFamily})},c&&c.length){const e=fa(t.label),{dock:n}=this.settings.layout;return sa.measureLabelsWidth(c,this.measureText),d=ua(n,c,e),d}const m=ma(this.measureText),h=l?ha(l,m):0,p=u?ha(u,m):0;return d=Math.max(h,p),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:i,theme:r,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||i.meta.canBeContinuous,u=ga(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=n.label,h=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),p=function(e,t,n){const i=e[t.minorDimension];return{minorSize:i,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(i-n.right-n.left)/2+n.left:(i-n.top-n.bottom)/2+n.top}}(this.rect,h,m),{orientation:f,majorDimension:g}=h,{majorSize:v}=p,y=fa(n.label),{font:S,lineHeight:M,gap:x,maxLabelWidth:b}=y,E=la(this.chart,this.settings.formatter,e),C=v;sa.addLabelTitles({labels:u,formatter:E,isContinuous:o,canBeContinuous:l,localeInfo:s}),sa.calculateLabelPositions({labels:u,scale:e,size:C,layoutService:i,orientation:f,rtl:d,isContinuous:o,isDimension:a});const[A,N]=ca(e,o),{filteredLabels:O,lowerOobs:T,upperOobs:L,lowerCircleSize:I,upperCircleSize:R,lowerOobSpace:w,upperOobSpace:k}=function({labels:e,minValue:t,maxValue:n,orientation:i,rtl:r,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=da(e,t,n,u),h="scaledValue"!==u&&Go.getInvert({orientation:i,rtl:r,isContinuous:o}),p=function(e,t,n){return n?t:e}(d,c,h),f=function(e,t,n){return n?e:t}(d,c,h),g=p.length,v=f.length,y=ma(l),S=ha(g,y),M=ha(v,y),x=function(e,t,n,i,r){return("vertical"===i?r.top:r.left)+(e>0?t+n:0)}(g,a.oob.size,S,i,s),b=function(e,t,n,i,r){return("vertical"===i?r.bottom:r.right)+(e>0?t+n:0)}(v,a.oob.size,M,i,s);return{filteredLabels:m,lowerOobs:p,upperOobs:f,lowerCircleSize:S,upperCircleSize:M,lowerOobSpace:x,upperOobSpace:b}}({labels:u,minValue:A,maxValue:N,orientation:f,rtl:d,isContinuous:o,style:n,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),q=w,D=v-k;na(T),na(L);const P=pa({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+I/2,areaProps:h,radius:I/2,font:S}),z=pa({alignment:1,dockValue:1,oobs:L,style:n.oob,rect:this.rect,symbol:t,position:v-(n.oob.size+R/2),areaProps:h,radius:R/2,font:S});sa.addLabelsInfo({labels:O,scale:e,majorSize:v,lowerLimit:q,upperLimit:D,labelStyle:y,lineHeight:M,gap:x,maxLabelWidth:b,majorDimension:g,orientation:f,measureText:this.measureText,rtl:d,layoutService:i,isContinuous:o,isDimension:a}),Po.layout(O.map((e=>e.segment)),q,D,n.label.gap);const $=O.filter((e=>Po.isInside(e.segment,q,D,o)));return sa.createLabels({labels:$,style:n.label,maxLabelWidth:b,areaProps:h,area:p,lineHeight:M,font:S,theme:r}).concat([...P,...z])}};var ya={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 Sa(e){const{qHyperCube:t,...n}=e,{qAxisData:i,qDataPages:r,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=re(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=ya;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==b(l,e)&&E(l,e,null);else{const e=t[0],n=t[1].split("].")[1];b(l,e,[]).forEach((e=>{void 0!==b(e,n)&&E(e,n,null)}))}})),l}var Ma={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:i}){return r=>{if(e||t||n){var o;if("line"===r.type)return null!==(o=r.tickValue)&&void 0!==o?o:"axis";if("text"===r.type)return`${r.tickValue} ${r.text}`;if("container"===r.type){const e=r.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${r.data.value} ${e.join("")}`}return Math.random()}if(i){if("line"===r.type&&void 0===r.tickValue)return"axis";const e=r.transform&&r.transform.match(/rotate/gi)?"rotated":"horizontal";return`${r.data.group?`${r.data.group.value} `:""}${r.data.value} ${r.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:i,dock:r}){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"===r&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==r&&"right"!==r||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"!==r&&"bottom"!==r||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||i?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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=i,e.y-=r):e.transform=`translate(${-i}, ${-r})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const i=t.x-n.x;0===t.y-n.y&&0===i||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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=r,e.y-=i):(e.x-=i,e.y-=r)}))},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 i=t.x-n.x,r=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-=r,e.y2-=r):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=i,e.x2-=i);else{const t="x"===e.major.p?i/e.major.size:r/e.major.size,n="y"===e.minor.p?r/e.minor.size:i/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 i=t.x-n.x;0===t.y-n.y&&0===i||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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{switch(e.type){case"circle":e.cx-=i,e.cy-=r;break;case"rect":e.x-=i,e.y-=r;break;case"path":e.transform=`translate(${-i}, ${-r})`}}))}},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 i=t.x-n.x,r=t.y-n.y;0===i&&0===r||e.forEach((e=>{"image"===e.type?(e.x-=i,e.y-=r):(e.cx-=i,e.cy-=r)}))}},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 i=t.x-n.x,r=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-i,l=-r;e.forEach((e=>{switch(e.dock){case"right":i>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":r>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=Sa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Sa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:xa,extractInfoFromInputValue:ba,resolveValue:Ea}=Go;var Ca={resolveValue:Ea,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const i=xa({refLineLayout:e,layoutService:n});return ba(i,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const i=xa({refLineLayout:e,layoutService:n});return ba(i,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:i}=t,{canBeContinuous:r}=n.meta,o=xa({refLineLayout:e,layoutService:n});return i[o]&&r?i[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const i=xa({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:r}=t;return r[i]}};const Aa=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:i,colorModel:r,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,h;const p={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(h=t.style)||void 0===h?void 0:h.lineType,stroke:r.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||i.meta.isContinuous?(p.scale=s,p.value=t.refLineExpr.value):(p.valueInfo=Ca.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:i}),p.value=()=>{var e;const r=Go.getScaledPosition({scale:a.scale(s),value:Ca.resolveValue({refLineLayout:t,refLineModel:n,layoutService:i}),valueInfo:p.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:i,isContinuous:d});return Number.isNaN(r)?void 0:r}),p};function Na({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,dockService:r,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:u,key:c,mainComponentKey:d,path:m,minimumLayoutMode:h}){const p=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!p.length)return!1;const f={key:c,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==r.meta.major.orientation||!u),v=!e||n.meta.isContinuous;return p.forEach((o=>{f.lines[l].push(Aa({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:i,dockService:r,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:v}))})),f}const Oa=({isDimension:e,layoutService:t,animationsEnabled:n,style:i,labels:r,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:r,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:u},theme:c,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:i.referenceLine.label.name.fontFamily,fontSize:i.referenceLine.label.name.fontSize,fontStyle:i.referenceLine.label.name.fontStyle,fontWeight:i.referenceLine.label.name.fontWeight,textDecoration:i.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:i.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:i.referenceLine.outOfBounds.fontFamily,fontSize:i.referenceLine.outOfBounds.fontSize,fill:i.referenceLine.outOfBounds.color,background:{fill:i.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Ma.refLineLabels.trackBy,compensateForLayoutChanges:Ma.refLineLabels.compensateForLayoutChanges}}),Ta=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:r,theme:o,isContinuous:a})=>{const s=i.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:u}=e,{fontSize:c,fontFamily:d,fontStyle:m,fontWeight:h,textDecoration:p}=u||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:c,fontFamily:d,fontStyle:m,fontWeight:h,textDecoration:p,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=r,f.value=e.refLineExpr.value):(f.value=()=>Ca.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>Ca.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>Ca.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function La({isDimension:e,refLineModel:t={},layoutService:n,colorModel:i,animationsEnabled:r,dock:o,scale:a,style:s,formatter:l,theme:u,localeInfo:c,rtl:d,key:m,path:h}){const p=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!p.length)return[];const f=[],g=!e||n.meta.isContinuous,v=p.map((e=>Ta({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:i,scale:a,theme:u,isContinuous:g})));return f.push(Oa({isDimension:e,rtl:d,style:s,dock:o,key:m,labels:v,scale:a,formatter:l,layoutService:n,animationsEnabled:r,theme:u,isContinuous:g,localeInfo:c})),f}function Ia({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:i,isGroupedByDimension:r}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=ve.dimensionless(o),l=Go.getMeasureRefLines(o),u=Go.getDimensionRefLines(o,s),c=Go.getMeasureRefLineLabels(o),d=Go.getDimensionRefLineLabels(o,s);let m={},h={};const p=()=>!(!u||!u.length)&&!u.every((t=>{const o=Go.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(i){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:i,qMax:r}=n;return Go.isOutOfRange({value:t,qMin:i,qMax:r})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&r){const n={valueInfo:h[t]},i="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",r=e.getHyperCubeValue(i);return Go.isOutOfDataPages({label:n,dataPages:r})}return!0})(o)})),f={isKMode:a,canBeContinuous:i,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:m,query:{getRefLines:e=>Go.getRefLines(o,e),getRefLineLabels:e=>Go.getRefLineLabels(o,e)},update:()=>{h=f.dimensionRefLineInfo,p()&&(m=Go.getDimensionValuesInfo({layout:o,canBeContinuous:i,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=m,u.forEach((t=>{const n=Go.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(h[n]?(h[n].innerValues=m[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,m[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,m[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||m[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||m[n].isMaxOrderOk):h[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},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)})))}};return f.update(),f}function Ra(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 wa({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const i=C(n);return i.setAlpha((null==e?void 0:e.alpha)>=0?e.alpha:1),i.isInvalid()?void 0:i.getRGBA()}function ka({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:i}=e,r=""===e.measureValue?void 0:+e.measureValue;if(Ro.isNumber(r))return r;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;var l;if(Ro.isNumber(s)&&(!(s>=a||0===o)&&1===o))return null===(l=t[i])||void 0===l||null===(l=l.dataNode[s+1])||void 0===l?void 0:l.qNum}const qa=3,Da=10,Pa={index:-1,color:"#595959"};function za({chart:e,chartModel:t,discreteModel:n,colorService:i,themeService:r,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:u,mainComponentKey:c,data:d,key:m}){var h;if(!Array.isArray(d)||0===d.length)return!1;const p={resolveUIColor:i.getMain().getPaletteColor},f=r.getTheme(),g="horizontal"===a.meta.major.orientation,v=!(!g||!s),{canBeContinuous:y,isContinuous:S,isButterfly:M}=o.meta,x=o.getLayout(),b=null!==(h=function({layout:e,colorModel:t}){var n,i,r;const o=null==e||null===(n=e.components)||void 0===n?void 0:n.find((e=>"general"===e.key));if(null!=o&&null!==(i=o.bgColor)&&void 0!==i&&i.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 wa({color:null==o||null===(r=o.bgColor)||void 0===r?void 0:r.color,colorModel:t})}({layout:x,colorModel:p}))&&void 0!==h?h:f.getStyle("object","","backgroundColor"),E=Go.getDimensionValuesInfo({layout:x,canBeContinuous:y,discreteModel:n,layoutService:o}),A=S?d:d.filter((e=>!!E[e.dimensionValue])),N={};A.map((e=>e.dimensionValue)).forEach((e=>{E[e]&&(N[e]?(N[e].innerValues=E[e].innerValues,N[e].minOrder=Math.min(N[e].minOrder,E[e].minOrder),N[e].maxOrder=Math.max(N[e].maxOrder,E[e].maxOrder),N[e].isMinOrderOk=N[e].isMinOrderOk||E[e].isMinOrderOk,N[e].isMaxOrderOk=N[e].isMaxOrderOk||E[e].isMaxOrderOk):N[e]={id:E[e].id,dataNode:E[e].dataNode,qText:E[e].qText,innerValues:E[e].innerValues,minOrder:E[e].minOrder,maxOrder:E[e].maxOrder,isMinOrderOk:E[e].isMinOrderOk,isMaxOrderOk:E[e].isMaxOrderOk},N[e].numInnerValues=(N[e].maxOrder||0)-(N[e].minOrder||0)+1)})),A.forEach((e=>{var t,n,i;const a=ka({point:e,dimensionValueInfo:N,layoutService:o});if(e.validMeasureValue=M&&1===e.measureIndex?-a:a,null!=o&&null!==(t=o.meta)&&void 0!==t&&t.isStacked){var s;const t=null===(s=N[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),i=null===(l=t[e.measureIndex+1])||void 0===l?void 0:l.qNum;if("number"==typeof i&&0!==i){const t=Math.sign(i);e.validMeasureValue=n.reduce(((e,n)=>{const i=n.qNum;return"number"==typeof i&&Math.sign(i)===t?e+i:e}),0)}}}const u=wa({colorModel:p,color:(null===(n=e.style)||void 0===n||null===(n=n.label)||void 0===n?void 0:n.color)||Pa}),c=!(null===(i=e.style)||void 0===i||null===(i=i.label)||void 0===i||!i.coloredBackground);e.labelBackgroundColor=c?u:void 0,e.labelColor=c?r.getTheme().getContrastingColorTo(u):u,e.hasBackground=c,e.maxLabelWidth=100}));const O={scale:l,fn:({datum:t})=>{var n;const i=e.scale(l),r=t.value.dimensionValue;if(S)return i("string"==typeof r?""===r?void 0:+r:r);if(void 0===N[r])return;return Go.getScaledPosition({scale:i,value:N[r].id,valueInfo:N[r],size:null===(n=e.component(c))||void 0===n?void 0:n.rect[g?"width":"height"],align:"center",invert:v,layoutService:o,isContinuous:S})}},T={scale:u,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:m,type:"point",data:A,settings:{x:g?O:T,y:g?T:O,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:qa},stroke:({datum:e})=>{var t,n;return wa({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"}})},fill:({datum:e})=>{var t,n;return null!==(t=e.value.style)&&void 0!==t&&null!==(t=t.fill)&&void 0!==t&&t.color?wa({colorModel:p,color:null===(n=e.value.style)||void 0===n?void 0:n.fill}):b},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:Da}px`},shape:({datum:e})=>{var t;return(null===(t=e.value.style)||void 0===t?void 0:t.symbol)||"circle"}},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:Ma.points.compensateForLayoutChanges}}}const $a=2;const _a=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},Fa=!0,Ba=!1,ja={index:0,color:"none"},Va={index:-1,color:"#595959"},Ha={index:-1,color:"#595959"},Ua=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)},Ya=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)},Wa=e=>{var t,n,i,r,o,a,s,l,u,c,d;switch(e.type){case"image":break;case"point":delete e.points,null===(t=e.style)||void 0===t||delete t.lineType,delete e.showPoints,null===(n=e.style)||void 0===n||delete n.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,null===(i=e.style)||void 0===i||delete i.dataPointSize,null===(r=e.style)||void 0===r||delete r.fill,null===(o=e.style)||void 0===o||delete o.symbol,null===(a=e.style)||void 0===a||delete a.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,null===(s=e.style)||void 0===s||delete s.lineType,null===(l=e.style)||void 0===l||delete l.lineThickness,null===(u=e.style)||void 0===u||delete u.lineColor,null===(c=e.style)||void 0===c||delete c.dataPointSize,null===(d=e.style)||void 0===d||delete d.fill}},Xa=({translator:e})=>({label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},dimensionNumberValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:(e,t,n)=>ce.canBeContinuous(n.layout)},dimensionStringValue:{ref:"dimensionValue",translation:"properties.dimensionReferenceLines.dimensionValue",component:"string",expression:"optional",defaultValue:"",show:(e,t,n)=>!ce.canBeContinuous(n.layout)},measureInputType:{type:"number",component:"dropdown",translation:"properties.plugins.measureInputType",show:(e,t,n)=>1===_a(n.layout),convertFunctions:{get:(e,t,n,i)=>void 0===i.measureValue?1:0,set(e,t,n,i,r){0===e?(r.measureValue=0,delete r.measureIndex):(r.measureIndex=0,delete r.measureValue)}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.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===_a(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===_a(n.layout),invalid:(e,t,n)=>{return e.measureIndex<0||e.measureIndex>=((null==(i=n.layout)||null===(r=i.qHyperCube)||void 0===r||null===(r=r.qMeasureInfo)||void 0===r?void 0:r.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)})).length)||0);var i,r}}}),Ka=()=>({symbol:{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"}]},labelPlacement:{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"}]},fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:ja},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:Va},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:Ha},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!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}}),Ga=({translator:e,pluginOptions:t})=>{const n={type:"array",ref:"plugins",filter:e=>e.filter((e=>["point","line"].includes(e.type))),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 n;return t.filter((t=>t.value===e.type))[0].translation+(null!==(n=e.label)&&void 0!==n&&n.value?`: ${e.label.value}`:"")},allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},add(e,t){void 0===t.plugins&&(t.plugins=[]),Wa(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(Wa),ce.canBeContinuous(n.layout)?e.plugins.forEach((e=>{switch(e.type){case"point":Ua(e);break;case"line":null===(t=e.points)||void 0===t||t.forEach(Ua)}var t})):e.plugins.forEach((e=>{switch(e.type){case"point":Ya(e);break;case"line":null===(t=e.points)||void 0===t||t.forEach(Ya)}var t})))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:Xa({translator:e})},styleSection:{component:"items",items:Ka()}}},line:{type:"items",show:e=>"line"===e.type,items:{dataSection:{component:"items",items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},points:{type:"array",ref:"points",titleTranslation:"properties.plugins.Points",itemTitleRef:(t,n)=>{var i;return e.get("properties.plugins.Points.Point",n+1)+(null!==(i=t.label)&&void 0!==i&&i.value?`: ${t.label.value}`:"")},allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:Xa({translator:e})},styleSection:{component:"items",items:Ka(),show:(e,t,n)=>{const i=((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==i?void 0:i.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:Ba,showAlpha:Fa,defaultValue:Va},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 n};var Ja=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,i=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=i.length):(n=arguments[1],t=arguments[2]),t&&i?(i.length>n&&(i=i.substr(0,n)),new e(i,t)):null}},Za=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,i){let r,o;if(t.length===n)return o=this._value,this.setValue(i),o;const a=t.charAt(n);return this._nextMap?(r=this._nextMap[a],r||(r=new e,this._nextMap[a]=r)):(this._nextMap={},r=new e,this._nextMap[a]=r),r.put(t,n+1,i)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return Ja.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return Ja.newInstanceIfNeeded(e,t,this._value);const i=n.getLongestMatch(e,t+1);return i||Ja.newInstanceIfNeeded(e,t,this._value)}},Qa=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new Za);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};(()=>{const e=[],t=[],n=new Qa;let i,r,o;for(i in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[i]&&e.hasOwnProperty(i)&&(t[e[i]]=i);for(r in t)"function"!=typeof t[r]&&t.hasOwnProperty(r)&&(o=t[r].toLowerCase().substr(1),n.put(o,String.fromCharCode(r)))})(),"undefined"!=typeof document&&document.createElement("div");for(let e=0;e<255;e++)e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e.toString(16);var es={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"}},ts={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const ns={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 is(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const rs={getImageSize(e,t){let n;function i(){n&&(clearTimeout(n),n=null)}function r(e){const t=e;t.onload=null,t.onerror=null,i()}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},r(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},i()):(e={height:u,width:c},i()),a(e)},s.onerror=()=>{r(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{r(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function os(e,t,n){let i=e.ref.qStaticContentUrl.qUrl;const r=function(e){var t,n,i;let r,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!==(i=e.session)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.url)){var c;if(r=e.session.options||(null===(c=e.enigmaModel)||void 0===c?void 0:c.session.sessionConfig),!r){var d;r=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(r.url);r.host=t.hostname,r.port=t.port,r.isSecure="wss:"===t.protocol}return u=void 0!==r.secure?r.secure:r.isSecure,o=u?"https://":"http://",a=r.host||"localhost",s=r.port?`:${r.port}`:"",l=r.prefix?r.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}return""}(n);r&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(i,r),i=i.replace(/"/g,'\\"'),i=i.replace(/'/g,"\\'"),i=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(i,r));const{height:o,width:a,imageError:s}=await rs.getImageSize(i,t);return{src:i,size:t,height:o,width:a,imageError:s}}async function as(e,t,n,i){var r,o,a;const{app:s,flags:l}=t,u=null===(r=e.layout)||void 0===r||null===(r=r.tooltip)||void 0===r?void 0:r.imageComponents;if(!u)return[];const[c]=u,d=c.size||"small",m=c.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===c.cId){h=e;break}const p=(null===(o=i.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let f;if(-1!==h&&p[h]&&(f=p[h]),"media"===m&&null!==(a=c.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return os(c,d,s);if("url"===m)return async function(e,t,n,i,r){let o,a=n.ref;if(r&&r.label&&(a=r.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&is(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:r,imageError:s}=await rs.getImageSize(t,i);o={src:t,size:i,height:n,width:r,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await rs.getImageSize(a,i);o={src:a,size:i,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,i){let r;const o=i.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(is(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:i,width:o,imageError:a}=await rs.getImageSize(e,n);r={src:e,size:n,height:i,width:o,imageError:a}}}catch(e){}return r}(s,n[h],d,f)}return[]}const ss={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){const r=t,o=[];for(let t=0;t<r.length;t++)o.push(as(e,i,n,r[t]));const a=await Promise.all(o);for(let e=0;e<r.length;e++)r[e].data.customTooltipImages=[a[e]];return r},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}},ls={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:i}){let r=t;return r=await ss.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:i}),r},checkIfPromisesExist:({customTooltipModel:e})=>ss.checkIfPromisesExist({customTooltipModel:e})};const us=(e,t)=>{var n,i,r;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qMeasures,s=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qInterColumnSortOrder,l=t;return{qInfo:{qType:ns.CHART.CHART_PARENT_TYPE,qId:ns.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},cs=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:ns.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const ds={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,i;const r=null!==(n=null===(i=t.tooltip)||void 0===i||null===(i=i.chart)||void 0===i||null===(i=i.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",o=ns.CHART.STYLE[r];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:ns.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:i,customTooltipModel:r,rtl:o})=>{var a;const s=r,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 ds.hide({app:e,customTooltipModel:r});try{await async function({app:e,properties:t,customTooltipModel:n}){const i=n,r=ns.CHART.STATE,o=t.qStateName;i.miniChartToken.alternateState||(i.miniChartToken.alternateState=r,await e.addSessionAlternateState(r,o),i.miniChartToken.alternateState=r)}({app:e,properties:t,customTooltipModel:r});const a=await async function({app:e,properties:t,customTooltipModel:n}){var i;const r=n;null!==(i=r.miniChartToken.sessionObj)&&void 0!==i&&i.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const o=ns.CHART.STATE,a=us(t,o),s=await e.createSessionObject(a),l=cs(t);if(s.id!==ns.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);r.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===s.id)return r.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:r});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!==i?i:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===i&&n.length>0){var h,p;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(p=e.source)&&void 0!==p&&p.field){var f;const t=null==e||null===(f=e.source)||void 0===f?void 0:f.field.split("/"),n=t[t.length-1],i=void 0!==e.value?[e.value]:[];i.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),i,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(ns.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await r.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 ds.hide({app:e,customTooltipModel:r})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ds.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ns.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,i=ns.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(i)}({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 ms(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function hs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:i}=ns.CUSTOM,r={};return r[e]=!0,r[t]=!0,r[n]=!0,r[i]=!0,r}function ps(e){const t=hs();return e.filter((e=>t[e.id]))}const fs={getNodes(e,t){const n=function(e,t){let n=0,i=0;e.center?(n+=e.center.x,i+=e.center.y):(n+=e.clientX,i+=e.clientY);const r=t.element.getBoundingClientRect();return{cx:n-r.left,cy:i-r.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,i=[];const r={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||r[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],i.push(e)}}else{n||(n=[],Object.keys(r).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&r[t][e.key])))})));const t=n.filter((e=>{var t,n;const i=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return i&&i.value===u.value&&i.label===u.label}));t.length>0&&(i=i.concat(t[0]))}})),i},displayTooltip(e,t,{nodes:n,opts:i={},customTooltipModel:r,extractedNodes:o=[],hide:a}){if(r&&!a){const{layout:a,chart:s}=r,{attrExps:l}=fs.getAttrExprData(a);o.length||n.length?ls.handlePromises({customTooltipModel:r,nodes:fs.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:i}).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!=r&&null!==(s=r.miniChartToken)&&void 0!==s&&s.alternateState&&ds.hide({app:i.app,customTooltipModel:r}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>ls.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const i=t,r=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return i[r]||(i[r]=[]),i[r]},getAttrExprData(e){var t;let n=[],i="";const r=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(r.length>0){var o;const t=r.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)||[],i=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:i}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[ns.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let i=n.qLayoutExclude;i||(n.qLayoutExclude={quarantine:{}},i=n.qLayoutExclude),i.quarantine||(i.quarantine={}),i.quarantine[ns.CUSTOM.QUARANTINE]=[],e.forEach((e=>{i.quarantine[ns.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=i}(ps(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[ns.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[ns.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ms(e);if(!n)return;const i=void 0!==t?t:n.length-1;if(!n[i])return;const r=this.getAttrExps(e,n[i]);if(0===ps(r).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...r,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[i].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[i].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let i=[];const r=ms(e)||[];[...r,t].forEach((e=>{const t=ps(e.qAttributeExpressions||[]);t.length>0&&(i=t)}));const o=hs(),a=r.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(i));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:Oe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Oe.detectTextDirection(e.src),i=[],r={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){i.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;i.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),r.style["text-align"]="center",r.style["white-space"]="nowrap"}else r.style["background-size"]="contain",r.style["background-repeat"]="no-repeat",r.style["background-position"]="center",r.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",r,i),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function gs(e,t,n,i){var r;const o=(null===(r=t.qHyperCube)||void 0===r||null===(r=r[n])||void 0===r||null===(r=r[i])||void 0===r?void 0:r.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[i]?e.qSubNodes[i].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const r=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===r?"NaN":function(e,t){let n;switch(e.id){case ns.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ns.CUSTOM.TITLE:case ns.CUSTOM.DESCRIPTION:case ns.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,r);a.push({source:{key:"qHyperCube",field:`${n}/${i}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const vs={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,i="qDimensionInfo";return{field:`${i}/${n}`,value:t=>gs(t,e,i,n)}}};const ys={getCustomAttrExps(e,t,n){var i;const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(i=t.data)||void 0===i||null===(i=i.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(o))return r;return function(e,t,n,i){const r={[ns.CUSTOM.TITLE]:!0,[ns.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=fs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===ns.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,r="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);i.customTooltipAttrExpsArr.push({label:t,value:r})}else if(r[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&i.customTooltipInfoAttrExpsArr.push({...e.id===ns.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),i}(n,o.map((t=>Te.getMeasure(e,t))),e,r)}};function Ss({nodes:e,layout:t,dataset:n}){const i=function(e,t,n){const i=[];return e.forEach((e=>{i.push(ys.getCustomAttrExps(n,e,t))})),i}(e,t,n);return i.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Ms}=ns;function xs({flags:e,layout:t,app:n,model:i,picasso:r,chart:o,translator:a,localeInfo:s,embed:l,options:u}){const c={properties:void 0},d=function({layout:e,app:t,picasso:n,model:i,chart:r,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:i,chart:r,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:fs,miniChartToken:{},embed:s}}({layout:t,app:n,model:i,picasso:r,chart:o,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=()=>{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:()=>h(),hideBasic:()=>h()&&b(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var i,r;const o=Ss({dataset:e,nodes:n,layout:t});return{title:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Ms.TITLE)))||void 0===i?void 0:i.title,description:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Ms.DESCRIPTION)))||void 0===r?void 0:r.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>fs.checkIfPromisesExist({customTooltipModel:d}),createImageRow:({value:e,h:t})=>fs.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:i})=>{const r=fs.getDataNodes(o,i),{attrExps:a}=fs.getAttrExprData(t);return ls.handlePromises({customTooltipModel:d,nodes:r,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(h()&&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==i?void 0:i.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>ds.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>fs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>ds.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:()=>ds.hide({app:n,customTooltipModel:d}),destroy:()=>ds.destroyVisualization({customTooltipModel:d})}}}function bs({key:e,source:t,layoutService:n,fieldModel:i,colorService:r,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=i.main,l=o.filter((e=>e.type===ts.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:i,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:i,...r.getDatumProps(o),customTooltipAttrExps:vs.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 Es({key:e,series:t,source:n,fieldModel:i,colorService:r,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=i.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:i,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:i,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:vs.getNode(o.getLayout(),o.meta),...r.getDatumProps(t)}})))}}]}return[]}function Cs({key:e,layoutService:t,fieldModel:n,series:i}){const{meta:r}=t;if(r.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=i.filter((e=>e.type===ts.TYPE.BAR)),s=r.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:r.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:r.isContinuous?e=>e.qNum:void 0}}}]}return[]}const As={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var Ns={OPTIONS:As,DEFAULT:As.MINI_CHART};function Os({layoutService:e,discrete:t}){return({h:n,rect:i,orientation:r,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===r,u=i[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 Ts({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),i=t.get("continuousMin"),r=t.get("continuousMax");return[(n.min-i)/(r-i),(n.max-i)/(r-i)]}(t,n):function(e){return e.get("viewRange")}(t)}const Ls=e=>({miniChart:e===Ns.OPTIONS.MINI_CHART.value,bar:e===Ns.OPTIONS.BAR.value,none:e===Ns.OPTIONS.NONE.value}),Is=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Ls(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Ls(Ns.DEFAULT.value);const i=e.getLayoutValue("dimensionAxis.continuousAuto"),r=e.getLayoutValue("preferContinuousAxis");return Ls(!n&&(i||!i&&r)?Ns.OPTIONS.NONE.value:Ns.OPTIONS.MINI_CHART.value)};function Rs({layoutService:e,override:t}){const n=Is({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ns.OPTIONS.MINI_CHART.value,n.bar=t.value===Ns.OPTIONS.BAR.value,n.none=t.value===Ns.OPTIONS.NONE.value),n}function ws({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:r,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,h=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,p=m?d.rect.computedInner.width:d.rect.computedInner.height,f=m&&a?p-h:h,g=Math.max(0,Math.min(f/p,1)),[v,y]=Ts({layoutService:r,viewState:n,viewCache:i}),S=g<v,M=g>y,x=!S&&!M;return{pixel:f,relative:g,thumb:x?f-v*p:0,beforeThumb:S,afterThumb:M,onThumb:x}}}function ks({componentKey:e,chart:t,viewState:n,viewCache:i,layoutService:r,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]=Ts({layoutService:r,viewState:n,viewCache:i});return{size:c,thumbSize:(m-d)*c}}}function qs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ws({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),c=ks({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(i,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(o.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),o=r.get("continuousMax"),s=n+(o-n)*a.relative;i.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 Ds="data-scrollbar-handle";function Ps({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ds)||""}const zs="scrollbarResize",$s=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function _s({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:s}){const l=ws({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${zs}`,options:{event:zs,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[zs]=this[zs]||{},$s(t)&&Ps({e:t})&&(this[zs].panningEvent=t.srcEvent),!!this[zs].panningEvent))}},events:{[`${zs}start`](n){n.preventDefault(),this[zs]=this[zs]||{},this[zs].panningEvent&&t.component(e).emit("dragStart",this[zs].panningEvent)},[`${zs}move`](n){if(n.preventDefault(),this[zs]=this[zs]||{},!this[zs].panningEvent)return;const o=i.get("zoom"),a=r.get("continuousMin"),s=r.get("continuousMax"),u=r.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Ps({e:this[zs].panningEvent});let m="start"===d?Math.min(c,o.max):o.min,h="end"===d?Math.max(c,o.min):o.max;m===h&&(m-="start"===d?u:0,h+="end"===d?u:0),i.set("zoom",{min:m,max:h}),t.component(e).emit("render")},[`${zs}end`](n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")},[`${zs}cancel`](n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")}}}}const Fs="scrollbarPan";function Bs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=ws({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),c=ks({componentKey:e,chart:t,viewState:i,viewCache:r,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Fs}`,options:{event:Fs,threshold:0,enable(i,r){return this[Fs]=this[Fs]||{},!(r&&!this[Fs].isPanning)||!!n.scroll.enabled()&&((!r||r.target===t.element)&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e)))}},events:{[`${Fs}start`](n){n.preventDefault();const a=u(n);if(this[Fs]=this[Fs]||{},this[Fs].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=i.get("zoom"),t=e.max-e.min,n=r.get("continuousMin"),o=r.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?i.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&i.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Fs].relative=a.relative,this[Fs].zoom=i.get("zoom"),this[Fs].zoom.span=this[Fs].zoom.max-this[Fs].zoom.min,this[Fs].zoom.fullSpan=o-n}else if(a.onThumb)this[Fs].offset=a.thumb;else{const e=c();this[Fs].offset=a.beforeThumb?0:e.thumbSize}},[`${Fs}move`](n){n.preventDefault();const a=u(n);if(this[Fs]=this[Fs]||{},o.meta.isContinuous){const e=a.relative-this[Fs].relative,{fullSpan:t,span:n,min:o,max:s}=this[Fs].zoom,l=r.get("continuousMin"),u=r.get("continuousMax");i.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Fs].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Fs}end`](n){n.preventDefault(),this[Fs]=this[Fs]||{},this[Fs].isPanning=!1,t.component(e).emit("unlockState")},[`${Fs}cancel`](n){n.preventDefault(),this[Fs]=this[Fs]||{},this[Fs].isPanning=!1,t.component(e).emit("unlockState")}}}}function js({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){return[qs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}),_s({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,rtl:l}),Bs({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Vs({componentKey:e,chart:t,actions:n,layoutService:i}){const r=(r,o)=>{if(!i.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(r,o)};return{type:"native",events:{mousemove:e=>r("hover",e),mouseleave:()=>r("leave")}}}const Hs={background:"rgba(0, 0, 0, 0.1)"},Us={top:-1,bottom:-1,width:6},Ys={width:2,background:"#595959"};var Ws={before:Hs,after:Hs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Us,endHandle:Us,startHandleBorder:Ys,endHandleBorder:Ys};const Xs={background:"rgba(0, 0, 0, 0.1)"},Ks={top:-1,bottom:-1,width:6},Gs={width:2,background:"#595959"};var Js={before:Xs,after:Xs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Ks,endHandle:Ks,startHandleBorder:Gs,endHandleBorder:Gs};const Zs={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Qs={pointerEvents:"initial"},el={pointerEvents:"none"};const tl="ew-resize",nl="default";function il(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,i=n?e.computedInner.width:e.computedInner.height,r=t.range(),o=n&&t.rtl;return{size:i,start:(o?1-r[1]:r[0])*i,end:(o?1-r[0]:r[1])*i}}function rl(){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?tl:nl}function ol(e,t,n){const{min:i}=this.settings.settings.size.thumb;if(n-t<i){const r=(i-(n-t))/2,o=Math.max(0,0-(t-r))-Math.max(0,n+r-e);return{size:e,start:t-r+o,end:n+r+o}}return{size:e,start:t,end:n}}function al(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function sl(){const{size:e,start:t,end:n}=il.call(this);this.renderer.render(this.elements(this.h,ol.call(this,e,t,n)))}function ll(){const{state:e,settings:t,style:n}=this,i=t.settings.style;return e.style[i]||(e.style[i]=function({id:e,style:t}){const n="slim"===e?Js:Ws;return{container:{...Zs},before:{...Zs,...n.before,...t.before},after:{...Zs,...n.after,...t.after},thumb:{...Zs,...n.thumb,...t.thumb},startHandle:{...Zs,...Qs,...n.startHandle},endHandle:{...Zs,...Qs,...n.endHandle},startHandleBorder:{...Zs,...el,...n.startHandleBorder},endHandleBorder:{...Zs,...el,...n.endHandleBorder}}}({id:t.settings.style,style:n[i]})),e.style[i]}var ul={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(){sl.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||!al.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Ps({e:e});t&&(this.state.hover[t]=!0),rl.call(this),sl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),rl.call(this),sl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Ps({e:e});t&&(this.state.drag[t]=!0),rl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),rl.call(this),sl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:i}=this.settings.settings.size.area,r="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[r]*i))},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:i}=il.call(this);return this.elements(e,ol.call(this,t,n,i))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:i}){const{settings:r}=this.settings,o=r.injections().map((t=>t({h:e,rect:this.rect,orientation:r.orientation,minThumbSize:r.size.thumb.min})));return function({h:e,size:t,start:n,end:i,properties:r,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[r.end]:t-n},m={[r.start]:i},h={left:-3},p={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"}),S=[];if(l){const t=e("div",{style:{...s.startHandle,...u?f:h},class:"scrollbar--start-handle",[Ds]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?g:p}}):void 0);S.push(t);const n=e("div",{style:{...s.endHandle,...u?h:f},class:"scrollbar--end-handle",[Ds]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?p:g}}):void 0);S.push(n)}const M=e("div",{style:{...s.thumb,[r.start]:n,[r.end]:t-i},class:"scrollbar--thumb"},S);return e("div",{style:{...s.container}},[v,M,y,...c])}({h:e,size:t,start:n,end:i,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:ll.call(this),continuous:r.isContinuous,invert:"horizontal"===r.orientation&&r.rtl,injections:o})}};function cl({layoutService:e}){return e.meta.isContinuous&&Rs({layoutService:e}).miniChart}function dl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:i,colorService:r}=e,{primarySeries:o,secondarySeries:a}=i.meta,s=i.query.series(ts.TYPE.LINE),l=[...Es({forceCreate:!0,key:es.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:r,layoutService:t}),...Es({key:es.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:r,layoutService:t}),...Es({key:es.COLLECTION.LINE,series:s,fieldModel:n,colorService:r,layoutService:t}),...bs({key:es.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:r,series:o}),...bs({key:es.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:r,series:a}),...Cs({key:es.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...Cs({key:es.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return cl(e)&&(l.push(...Es({key:es.COLLECTION.REDUCED,source:es.DATA.REDUCED,series:i.query.all(),fieldModel:n,colorService:r,layoutService:t})),l.push(...Es({key:es.COLLECTION.REDUCED_PRIMARY,source:es.DATA.REDUCED,series:o,fieldModel:n,colorService:r,layoutService:t})),l.push(...Es({key:es.COLLECTION.REDUCED_SECONDARY,source:es.DATA.REDUCED,series:a,fieldModel:n,colorService:r,layoutService:t})),l.push(...bs({key:es.COLLECTION.REDUCED_STACKED_PRIMARY,source:es.DATA.REDUCED,layoutService:t,fieldModel:n,series:i.meta.primarySeries.filter((e=>e.type===ts.TYPE.BAR)),colorService:r})),l.push(...bs({key:es.COLLECTION.REDUCED_STACKED_SECONDARY,source:es.DATA.REDUCED,layoutService:t,fieldModel:n,series:i.meta.secondarySeries.filter((e=>e.type===ts.TYPE.BAR)),colorService:r}))),l}const ml=({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 hl({models:e}){const{dockService:t,seriesModel:n,layoutService:i}=e,r=2===n.meta.measureAxes.length;if(r)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!r){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===i.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 pl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:i,layoutService:r,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:ml({layoutService:r,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:i.query.getScaleRange,align:hl({models:e})}},fl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:i,layoutService:r,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:r.meta.groupSize,maxPxStep:ml({layoutService:r,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:i.query.getScaleRange,align:hl({models:e})}};function gl({viewState:e,models:t,environment:n}){const{fieldModel:i,dockService:r}=t,{orientation:o}=r.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:i.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 vl({viewCache:e,mainMajor:t}){return re(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function yl({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const i=t.get("qTimeAxisCache");return i[n]&&i[n][0]===e?i[n][1]:void 0},set:(e,n,i=0)=>{t.get("qTimeAxisCache")[i]=[e,n]},key:({distance:i})=>{const{min:r,max:o}=e.get("zoom"),a=(o-r)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[i,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Sl({picasso:e,viewState:t,viewCache:n,models:i,environment:r}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=i,{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"===r.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:yl({viewState:t,viewCache:n,layoutService:o})};return{[es.SCALE.MAJOR]:re(!0,{},m,{ticks:{level:"outer"}}),[es.SCALE.MAJOR_INNER]:re(!0,{},m,{ticks:{level:"inner"}})}}function Ml({picasso:e,models:t,viewState:n,viewCache:i,environment:r}){const{meta:o}=t.layoutService,a=o.isTime?{...Sl({picasso:e,viewState:n,viewCache:i,models:t,environment:r})}:o.isContinuous?{[es.SCALE.MAJOR]:gl({models:t,viewState:n,environment:r})}:o.isBarSeriesGrouped?{[es.SCALE.MAJOR]:fl({models:t,environment:r})}:{[es.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?fl({models:t,environment:r}):pl({models:t,environment:r})};return cl(t)?{...a,[es.SCALE.REDUCED]:vl({viewCache:i,mainMajor:a[es.SCALE.MAJOR]})}:a}function xl({fields:e,tickModel:t,dockService:n,environment:i}){const r="rtl"===i.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||r,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function bl({layoutService:e,tickModel:t,dockService:n,environment:i}){if(!cl({layoutService:e}))return;const r="rtl"===i.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||r,min:t.query.getMin,max:t.query.getMax}}var El={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 Cl=["all","labels"];function Al({models:e,flags:t}){const{layoutService:n,dockService:i,seriesModel:r,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}=r.meta;return d.filter((e=>{const t=e.isPrimary?0:1;return Cl.some((e=>l[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?es.COMPONENT.AXIS.MINOR.PRIMARY:es.COMPONENT.AXIS.MINOR.SECONDARY,renderer:Ra(t),scale:e.scale,layout:{dock:e.isPrimary?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:El.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:Ma.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?i.meta.minor.dock:i.meta.minorSecondary.dock})}})))}var Nl={INACTIVE:.5},Ol={LOWER:3,UPPER:13};const Tl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),i=n?n.qMatrix:[];return Ee.getAdjustedMaxGlyphCount(t,i,0,"qText")};function Ll({models:e,environment:t,flags:n}){const{layoutService:i,dockService:r,styleModel:o,themeService:a,animationsModel:s}=e,l="rtl"===t.options.direction,u=i.getLayoutValue("dimensionAxis"),c=o.query.axis.label.getStyle(),d=Tl({layoutService:i}),{orientation:m}=r.meta.major,h="horizontal"===m,p=h?u.label:"auto",f=a.getStyles(),{auto:g,spacing:v}=i.getLayoutValue("gridLine",{});return{type:"axis",key:es.COMPONENT.AXIS.MAJOR,renderer:Ra(n),scale:es.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:El.AXIS.MAJOR[m.toUpperCase()]},settings:{labels:{mode:u.label,tiltAngle:l?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===p?void 0:r.meta.minor.size/4,maxGlyphCount:d,tiltThreshold:d>Ol.LOWER&&d<Ol.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:Nl.INACTIVE}}}]},animations:{enabled:s.enabled,trackBy:Ma.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isHorizontal:h})}}}function Il({models:e,flags:t}){const{dockService:n,styleModel:i,themeService:r,layoutService:o,animationsModel:a}=e,{orientation:s}=n.meta.major,l=i.query.axis.label.getStyle(),u=r.getStyles(),{auto:c,spacing:d}=o.getLayoutValue("gridLine",{});return{type:"axis",key:es.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:Ra(t),scale:es.SCALE.MAJOR,layout:{dock:n.meta.major.dock,minimumLayoutMode:El.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:Ma.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Rl({models:e,environment:t,flags:n}){const{layoutService:i}=e,r=i.getLayoutValue("dimensionAxis");if(!r)return[];const{show:o}=r;return"none"===o||"title"===o?[]:i.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:i,styleModel:r,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,u="bottom"===n.meta.major.dock?0:1,c=i.getStyles(),d=r.query.axis.label.getStyle(),m=s?1:0,{auto:h,spacing:p}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:El.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:Ma.axes.trackBy({isTime:!0}),compensateForLayoutChanges:Ma.axes.compensateForLayoutChanges({isTime:!0})}};return[re(!0,{},f,{key:es.COMPONENT.AXIS.TIME_INNER,scale:es.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!h&&0===p}},style:{majorGuideLine:{stroke:c.axis.line.minor.color},minorGuideLine:{stroke:c.axis.line.major.color},line:{stroke:c.axis.line.major.color}}}),re(!0,{},f,{key:es.COMPONENT.AXIS.TIME_OUTER,scale:es.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):i.meta.isContinuous?[Il({models:e,flags:n})]:[Ll({models:e,environment:t,flags:n})]}const wl=({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,kl=({layoutService:e,seriesModel:t,rtl:n,orientation:i})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:r})=>e([r.value,n&&"horizontal"===i?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===i?1:0])+e.bandwidth():null;function ql({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:Nl.INACTIVE},...n}}}]}}var Dl="max",Pl="min";function zl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i}(e,t)}const $l=(e,t)=>`${e}-${t.id}`,_l=4,Fl=12,Bl=4;function jl({chart:e,layoutService:t,dockService:n,markerKey:i,markerType:r}){if(t.meta.isContinuous)return()=>`${Bl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(i),s=t.resources.scale(es.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(_l,Math.min(Fl,l));o.size=`${"bar"===r?2*u:u}px`}return o.size}}const Vl=({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:Hl}=Ot;const Ul=({chart:e,models:t,series:n,environment:i})=>{const{layoutService:r,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,animationsModel:c}=t,d=a.getColor(),{fill:m,marker:h}=n.options,{isContinuous:p}=r.meta,f="rtl"===i.options.direction,{orientation:g}=s.meta.major,v="horizontal"===g,y=(n.isPrimary?l:u).query.getExtrema(),S=({end:e})=>{const{value:t}=e;return zl(t,y)},M=$l(es.COMPONENT.MARKER,n);return{type:"point",key:M,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[v?"x":"y"]:{scale:es.SCALE.MAJOR,fn:kl({layoutService:r,seriesModel:o,rtl:f,orientation:g}),ref:p?"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,i=e.scale(n);return r=i,Math.min(Math.max(0,r),1);var r}},fill:m||"bar"===h?d:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||S(e.datum)?0:1},stroke:e=>{const t=d(e);return m?Hl(t)?Je(t).brighter(.5).toString():function(e){return Je(e).darker().toString()}(t):t},size:jl({chart:e,layoutService:r,dockService:s,markerKey:M,markerType:h}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let i;return"triangle"!==e||t||(i=n?"left":"right"),"bar"===e&&(i=t?"horizontal":"vertical"),i?{type:e,direction:i}:{type:e}})({marker:h,horizontal:v,rtl:f})},brush:ql({layoutService:r,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data)?0:Nl.INACTIVE}}}),animations:{enabled:c.enabled,isMainComponent:Vl({series:n}),trackBy:Ma.markers.trackBy,compensateForLayoutChanges:Ma.markers.compensateForLayoutChanges}}};function Yl({property:e="end",isHorizontal:t,isColor:n,fallback:i,rtl:r}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(es.SCALE.MAJOR),u=s(es.SCALE.COLOR),c=t&&r?[...a.points].reverse():a.points,d=c.reduce(((t,n,i)=>{const r="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[i+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return r?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),h=d.map(m),p=Math.min(...h),f=Math.max(...h)-p,g=0===f?1:f,v=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-p)/g)),y=[];for(let t=0;t<d.length;t++){const r=d[t],o=r.color&&r.color.value,a=n?o||i:u(o)||i,s=0===t,l=t===d.length-1,c=v[t];if("NaN"===r[e].value||Number.isNaN(r[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 i=d[t+1];i&&"NaN"!==i[e].value&&!Number.isNaN(i[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 S=y.reduce(((e,t,n)=>{if(t.virtual){const t=y[n-1],i=y[n+1],r=t.offset+(i.offset-t.offset)/2;e.push({color:t.color,offset:r},{color:i.color,offset:r})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:S}}}function Wl({environment:e,models:t,measureIndex:n}){const{layoutService:i,colorService:r,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=i.meta,{mode:l,type:u,nil:c}=r.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return r.getColor();if("measure"===l&&"categorical"===u)return r.getColor();const m=i.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?Yl({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):r.getColor();const h=i.getLayoutValue("color",{}),p=!h.auto&&"byExpression"===h.mode,f=!!h.colorExpression;if(p&&!f)return c;const g=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!g?Yl({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:i},resources:{scale:r}}=n,o=r(es.SCALE.COLOR),a=i.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:i}){return function(r){const{datum:{points:o},resources:{scale:a}}=r,s=a(es.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,h=0===m?1:m,p=s.domain(),f=[];for(let e=0;e<p.length-1;e++){const t=p[e],i=s(t)||n;f.push({color:i,offset:Math.min(1,Math.max(0,(t-d)/h))});const r=p[e+1];f.push({color:i,offset:Math.min(1,Math.max(0,(r-d)/h))})}return{type:"gradient",x1:!e&&i?1:0,x2:e||i?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:d,fallback:c,rtl:a})}const Xl=({models:e,environment:t,series:n})=>{const{layoutService:i,seriesModel:r,dockService:o,styleModel:a,animationsModel:s}=e,l="rtl"===t.options.direction,{orientation:u}=o.meta.major,c=kl({layoutService:i,seriesModel:r,rtl:l,orientation:u});return{key:$l(es.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:es.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Wl({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:ql({layoutService:i,active:{stroke:void 0,strokeWidth:void 0,opacity:Nl.INACTIVE},inactive:{opacity:Nl.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!Vl({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}};var Kl={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 Gl({series:e,layoutService:t}){const{showAsConnections:n}=e.options,i=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}),r=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!i({item:e}))):(e,t)=>0!==e&&!i({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!i({item:e}))):(e,t)=>e!==t.length-1&&!i({item:t[e+1]});return({index:e,items:t})=>({before:r(e,t),after:o(e,t)})}const Jl=3,Zl=20;function Ql({models:e,series:t,environment:n}){const{layoutService:i,colorService:r,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c,animationsModel:d}=e,m=i.getLayoutValue("dataPoint.show",!1),{orientation:h}=a.meta.major,p="horizontal"===h,f="SPARK"===a.meta.chart.mode,g=r.getColor(),{POINT:v}=Kl,y=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},i=Gl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return 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}),{})}({items:t}));const{value:r}=e.line,o=n.map[r],a=`${e.major.value}-${r}`,s=o.keys.indexOf(a),{before:l,after:u}=i({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:i}),S="rtl"===n.options.direction,M=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:x}=i.meta,b=({end:e})=>{const{value:t}=e;return zl(t,M)};return{type:"point",key:$l(es.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:p?v.SIZE.DEFAULT/2:0}}),settings:{[p?"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,i=e.scale(n);return r=i,Math.min(Math.max(0,r),1);var r}},[p?"x":"y"]:{scale:es.SCALE.MAJOR,fn:kl({layoutService:i,seriesModel:o,rtl:S,orientation:h}),ref:"major"},sizeLimits:{minPx:Jl,maxPx:Zl},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||b(e)?0:f?y({item:e,items:t.items})?1:0:m||y({item:e,items:t.items})?1:0}},brush:ql({layoutService:i,active:{r:e=>e.r+Kl.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)||b(e.data))return 0;if(!x||m)return 1;const{event:n,components:i=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;return[es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>i.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:d.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.points.compensateForLayoutChanges}}}const eu=(e,{dataset:t},n=!1)=>{const{value:i,label:r,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return he.shouldUseFormat(a.raw())?a.formatter()(i):r};function tu({chart:e,models:t,environment:n,flags:i,lineSeries:r}){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(!r.length)return!1;const h=s.query.point.label.getStyle();return{type:"point-label",key:es.COMPONENT.POINT_LABEL,renderer:Ra(i),layout:{displayOrder:2,minimumLayoutMode:El.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>eu(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map((e=>({key:`${es.COMPONENT.POINT}-${e.id}`,labels:!0,lines:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(r.find((e=>e.id===t)).isPrimary?l:u).query.getExtrema();return!zl(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(es.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:h.fontFamily,fontSize:h.fontSize,fill:h.fill},animations:{enabled:c.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}}const nu=({chart:e,models:t,environment:n,flags:i,markerSeries:r})=>{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(),h=o.getLayoutValue("dataPoint");return!(null==h||!h.showMarkerLabels)&&(!!r.length&&{type:"point-label",key:es.COMPONENT.MARKER_LABEL,renderer:Ra(i),layout:{displayOrder:2,minimumLayoutMode:El.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,label:t=>eu(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map((e=>({key:`${es.COMPONENT.MARKER}-${e.id}`,labels:!0,lines:!1,fixed:!0}))),showLabel:e=>{const t=parseInt(e.key.substr(e.key.length-1),10),n=(r.find((e=>e.id===t)).isPrimary?l:u).query.getExtrema();return!zl(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(es.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:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}})},iu=({chart:e,dock:t})=>{let n=t;const i=e.component(`${es.COMPONENT.SLICED_HAT}-${Dl}`),r=e.component(`${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.PRIMARY}`),o=e.component(`${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.SECONDARY}`);return i?n=`@${es.COMPONENT.SLICED_HAT}-${Dl}`:r?n=`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.PRIMARY}`:o&&(n=`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.SECONDARY}`),n},ru=({dockPosition:e,orientation:t,rtl:n})=>{let i=1;return e!==`@${es.COMPONENT.SLICED_HAT}-${Dl}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.PRIMARY}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Dl}-${ts.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(i=4),e!==`@${es.COMPONENT.SLICED_HAT}-${Pl}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Pl}-${ts.AXIS.PRIMARY}`&&e!==`@${es.COMPONENT.SLICED_HAT}-${Pl}-${ts.AXIS.SECONDARY}`||"vertical"!==t||n||(i=4),i};function ou({chart:e,models:t,environment:n,lineSeries:i}){const{layoutService:r,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=r.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!i.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=r.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:es.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:El.LABEL_SPACE,dock:iu({chart:e,dock:c?"top":m})},settings:{size:10},preferredSize:()=>{const t=e.component(`${es.COMPONENT.LINE}-${i[0].id}`);if(null==t||!t.rect)return 0;const n=(c?17:34)/t.rect[c?"height":"width"],r=a.query.getExtrema(),o=e.scale(es.SCALE.MINOR.PRIMARY)(r.implicit.line.max),l=c||u?o:1-o,d=i.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),h=e.scale(es.SCALE.MINOR.SECONDARY)(m.implicit.line.max),p=c||u?h:1-h,f=i.filter((e=>!e.isPrimary)).length>0;return d&&l<n||f&&p<n?10:0}}}const au={min:"Min",max:"Max"};function su(e,t,n){const{hasExplicitMax:i}=n.meta,{max:r}=n.explicit;return!!i&&Math.max(e,t)>r&&r<=Math.min(e,t)}function lu(e,t,n){const{hasExplicitMin:i}=n.meta,{min:r}=n.explicit;return!!i&&Math.min(e,t)<r&&r>=Math.max(e,t)}function uu(e,t,n){return su(e,t,n)||lu(e,t,n)}function cu(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i&&i<=0}function du(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i&&i>=0}function mu(e,t){return cu(e,t)||du(e,t)}function hu({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${au[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Dl?e.implicit.bar.max:e.implicit.bar.min,i=Number(n.toFixed(13));return t===Dl?!cu(i,e):!du(i,e)}({extrema:e,type:t}))}var pu=Object.freeze({__proto__:null,isMaxOutOfBounds:cu,isMinOutOfBounds:du,isOutOfBounds:mu,isSegmentMaxOutOfBounds:su,isSegmentMinOutOfBounds:lu,isSegmentOutOfBounds:uu,shouldShowOob:hu});const fu={min:"Min",max:"Max"},gu=({chart:e,models:t,markerSeries:n,lineSeries:i,barSeries:r,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:m,seriesModel:h,themeService:p,fieldModel:f,animationsModel:g}=t,v="rtl"===o.options.direction,{dock:y,opposite:S,orientation:M}=s.meta.major,x=l.query.getExtrema(),b=u.query.getExtrema(),E=a===Dl,{isBarSeriesGrouped:C}=m.meta,A=(({chart:e,type:t,opposite:n,dock:i})=>{let r=t===Dl?n:i;const o=e.component(`${es.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),s=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`),l=e.component(es.COMPONENT.LABEL_SPACE),u=e.component(`${es.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`),d=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.SECONDARY}`);return o?r=`@${es.COMPONENT.SLICED_HAT}-${t}`:a?r=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`:s?r=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`:u||c||d?l&&t===Dl?r=`@${es.COMPONENT.LABEL_SPACE}`:u?r=`@${es.COMPONENT.BAR_OOB}-${t}`:c?r=`@${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`:d&&(r=`@${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.SECONDARY}`):l&&t===Dl&&(r=`@${es.COMPONENT.LABEL_SPACE}`),r})({chart:e,type:a,opposite:S,dock:y}),N=kl({layoutService:m,seriesModel:h,rtl:v,orientation:M}),O=i.concat(n);if(!O.length)return!1;const T=E?x.implicit.bar.max:x.implicit.bar.min,L=Number(T.toFixed(13));if(!C&&r.length&&pu[`is${fu[a]}OutOfBounds`](L,x))return!1;if(!x.meta.hasExplicit&&!b.meta.hasExplicit)return!1;const I=E?"max":"min",R=Math[I](Number(x.implicit.line[I].toFixed(13)),Number(x.implicit.marker[I].toFixed(13))),w=Math[I](Number(b.implicit.line[I].toFixed(13)),Number(b.implicit.marker[I].toFixed(13))),k=O.filter((e=>e.isPrimary)),q=O.filter((e=>!e.isPrimary)),D=k.length>0,P=q.length>0,{major:z,majorNumeric:$}=f.main,_=e=>"NaN"!==e.qNum?e.qNum:0,F=m.meta.isContinuous?$:z;return{type:"data-out-of-bounds-marker",key:`${es.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:A,minimumLayoutMode:El.OUT_OF_BOUNDS_MARKER},data:{extract:O.map((({ref:e,typeIndex:t,options:n})=>({field:z,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:F},end:{field:e,value:n.showAsZeros?_:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:k,secondarySeries:q,orientation:M,rtl:v,major:{scale:es.SCALE.MAJOR,fn:N},markerOffset:ru({dockPosition:A,orientation:M,rtl:v})},brush:ql({layoutService:m}),show:()=>{if(E){if(D&&R>c.query.getMax())return!0;if(P&&w>d.query.getMax())return!0}if(!E){if(D&&R<c.query.getMin())return!0;if(P&&w<d.query.getMin())return!0}return!1},style:{fill:p.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:Ma.lineOobs.compensateForLayoutChanges}}},vu={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function yu({chart:e,models:t,viewState:n,viewCache:i,axis:r}){const o=A(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${es.COMPONENT.BAR}-${r}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=vu[a.meta.chart.mode];return 0===Math.abs(i.get("continuousMax")-i.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),r=Math.abs(i.get("continuousMax")-i.get("continuousMin")),s=Math.abs(t-e),l=vu[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/r/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Su=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:i,isBarSeriesStackedInBothAxis:r})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/i.query.getItemSize(),t=n.query.bar.getWidthFn()(),r=t+e;return r>1?t-(r-1):t}:n.query.bar.getWidthFn():t||r?.9:.7;function Mu(e){return Math.min(Math.max(0,e),1)}const xu=({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:m,animationsModel:h}=t,{isContinuous:p,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:v}=o.meta,y=e=>e.datum.start?e.datum.start.value:e.scale.min(),S=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,M=r?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY;if(!(r?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=f?{scale:M,start:{ref:"start",fn:e=>{const t=y(e);return Mu(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:y(e))(e);return Mu(e.scale(t))}}}:{scale:M,start:{ref:"start",fn:e=>{const t=y(e);return Mu(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 Mu(e.scale(n))}}},b=(r?d:m).query.getExtrema(),E=f?({start:e,end:t})=>uu(e.value,t.value,b):({end:e})=>mu(e.value,b);return{type:"box",key:`${es.COMPONENT.BAR}-${S}`,data:{filter:(()=>{if(f)return;const e=l.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?r?es.COLLECTION.STACKED_PRIMARY:es.COLLECTION.STACKED_SECONDARY:r?es.COLLECTION.PRIMARY:es.COLLECTION.SECONDARY},preferredSize:p?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:es.SCALE.MAJOR,fn:wl({layoutService:o,axis:S}),ref:p?{start:"major",end:"major"}:void 0},minor:x,box:{width:Su({isContinuous:p,isBarSeriesGrouped:g,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:v}),minWidthPx:p?yu({chart:e,models:t,viewState:n,viewCache:i,axis:S}):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)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:ql({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:Nl.INACTIVE}}}),animations:{enabled:h.enabled,isMainComponent:Vl({isPrimary:r,seriesModel:l}),trackBy:Ma.bars.trackBy,compensateForLayoutChanges:Ma.bars.compensateForLayoutChanges}}},bu=({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:p}=o.meta,f=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,g=r?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${es.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:r?es.COLLECTION.STACKED_TOTAL_PRIMARY:es.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:es.SCALE.MAJOR,fn:wl({layoutService:o,axis:f}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:r?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Su({isContinuous:m,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:p}),minWidthPx:m?yu({chart:e,models:t,viewState:n,viewCache:i,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Eu(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:i}=t,r=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map((e=>{const t=r.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Ot.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:i,simplifiedPlacement:e}):r.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const i=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:i}}({simplifiedPlacement:e,fill:t,isHorizontal:n})})),label:t.label}}function Cu(e,t,n,i){const r=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,i);let o="up";return"vertical"===t&&r<0?o="down":"horizontal"===t&&(o=r>=0&&!n||r<0&&n?"right":"left"),o}const Au=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:i}=e;if(!n)return!1;const{isBarSeriesStacked:r,isContinuous:o}=t;return!r||!o&&!!i},Nu=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:i}=e;if(!n)return!1;const{isBarSeriesStacked:r,isContinuous:o}=t;return!!r&&(!!o||!1!==i)};function Ou(e,t,n,i){const r=[];return void 0!==e&&(r[e]={position:"outside",onBackground:!0,justify:0,overflow:i}),void 0!==t&&(r[t]={position:"inside",onBackground:!1,justify:n}),r}const Tu=({models:e,environment:t,flags:n,isPrimary:i})=>{const{layoutService:r,seriesModel:o,styleModel:a,themeService:s,animationsModel:l}=e,{meta:u}=r,{isBarSeriesStacked:c}=u,d="rtl"===t.options.direction,m=s.getStyles(),h=a.query.bar.label.getStyle(),p=e.layoutService.getLayoutValue("dataPoint",{}),f=i?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(!(i?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!Au(p,u))return!1;let g;!c&&(g=c?1:0);const v={label:e=>eu(e.data,e,c),simplifiedPlacements:Ou(g,0===g?1:0,c?.5:1,u.isContinuous),style:m.label.value},y=[Eu(e,v)],S=[{component:`${es.COMPONENT.BAR}-${f}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Cu(t.data.end.value,e.dockService.meta.minor.orientation,d,0),labels:y,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{type:"labels",key:`${es.COMPONENT.BAR_LABEL}-${f}`,renderer:Ra(n),layout:{minimumLayoutMode:El.VALUE_LABEL},settings:{sources:S},animations:{enabled:l.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}};function Lu(e,t,n,i){const r=[{position:e,onBackground:!0,justify:0,overflow:i}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return r}function Iu({chart:e,models:t,environment:n,flags:i,isPrimary:r}){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=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Nu(u,o))return!1;const d=!Au(u,o),m=l.useContrastColor,h=e.formatter(r?es.FORMATTER.PRIMARY:es.FORMATTER.SECONDARY)||(e=>e),p=e=>h(e),f={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value),simplifiedPlacements:Lu("outside",d,m,o.isContinuous),style:s.label.value},g={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value),simplifiedPlacements:Lu("opposite",d,m,o.isContinuous),style:s.label.value},v=[Eu(t,f),Eu(t,g)];return{type:"labels",key:`${es.COMPONENT.STACK_BAR_LABEL}-${c}`,renderer:Ra(i),layout:{displayOrder:2,minimumLayoutMode:El.VALUE_LABEL},settings:{sources:[{component:`${es.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Cu(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:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}}var Ru=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:i}=t.explicit;return!!n&&e>i&&i>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:i}=t.explicit;return!!n&&e<i&&i<0}});const wu={min:"Min",max:"Max"};function ku({chart:e,models:t,type:n,viewCache:i,viewState:r,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:h,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:f}=a.meta,g=m?bu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}):xu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}),v=o?l.query.getExtrema():u.query.getExtrema(),y=n===Dl,S=o?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${wu[t]}`]}(v,n)||function(e,t,n){const i=n?e.implicit.bar.max:e.implicit.bar.min,r=Number(i.toFixed(13));return!Ru[`has${wu[t]}Hat`](r,e)}(v,n,y)||function(e,t,n){const i=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${wu[t]}`]&&i(e.explicit[t])}(v,n,y))return!1;let M="end";m&&(M=y?"sumOfPositives":"sumOfNegatives");const x=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY)[n]()));const b=(({chart:e,type:t,isPrimary:n,dock:i})=>{let r=i;const o=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),a=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`);return o&&a&&(r=n?i:`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),r})({chart:e,type:n,isPrimary:o,dock:y?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${es.COMPONENT.SLICED_HAT}-${n}-${S}`,layout:{dock:b},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:re({},g.settings.box,{fill:m?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=x(),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[M].value);return y?n>t:n<t},width:Su({isContinuous:h,isBarSeriesGrouped:p,styleModel:c,discreteModel:d,isBarSeriesStackedInBothAxis:f}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:ql({layoutService:a})}}const qu={min:"Min",max:"Max"},Du={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Pu({chart:e,models:t,type:n,viewCache:i,viewState:r,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c,animationsModel:d}=t,{end:m,start:h}=s.meta.minor,{isBarSeriesStacked:p}=a.meta,f=p?bu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}):xu({chart:e,models:t,viewCache:i,viewState:r,isPrimary:o}),g=o?l.query.getExtrema():u.query.getExtrema(),v=n===Dl?g.implicit.bar.max:g.implicit.bar.min,y=Number(v.toFixed(13)),S=o?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;if(!f)return!1;if(!pu[`is${qu[n]}OutOfBounds`](y,g))return!1;const M=(({chart:e,type:t,end:n,start:i,isPrimary:r})=>{let o=t===Dl?n:i;const a=e.component(es.COMPONENT.LABEL_SPACE),s=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`),l=e.component(`${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`),u=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`),c=e.component(`${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.SECONDARY}`);return s?o=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.PRIMARY}`:l?o=`@${es.COMPONENT.SLICED_HAT}-${t}-${ts.AXIS.SECONDARY}`:u&&c&&!r?o=`@${es.COMPONENT.BAR_OOB}-${t}-${ts.AXIS.PRIMARY}`:a&&t===Dl&&(o=`@${es.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:m,start:h,isPrimary:o});let x="end";p&&(x=n===Dl?"sumOfPositives":"sumOfNegatives");const b={type:"box-out-of-bounds",key:`${es.COMPONENT.BAR_OOB}-${n}-${S}`,layout:{dock:M},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:Me.getDockValue(n===Dl?m:h),oob:re({},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 i=p&&0===e.datum[x].value,r=pu[`is${qu[n]}OutOfBounds`](e.datum[x].value,g,n),o=(!i||function({type:e,item:t,prop:n,extrema:i}){const r=t.datum[Du[n]].value;return 0!==r&&pu[`is${qu[e]}OutOfBounds`](r,i,e)}({type:n,item:e,prop:x,extrema:g}))&&r;return o}})},brush:ql({layoutService:a}),animations:{enabled:d.enabled,compensateForLayoutChanges:Ma.barOobs.compensateForLayoutChanges}};return b}function zu(e){return Math.min(Math.max(0,e),1)}const $u=({chart:e,models:t,type:n,isPrimary:i})=>{const{discreteModel:r,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(i?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(i?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY),h=i?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,p=i?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===Dl;if(!hu({extrema:p,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);return{type:"box",key:`${es.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?i?es.COLLECTION.STACKED_TOTAL_PRIMARY:es.COLLECTION.STACKED_TOTAL_SECONDARY:i?es.COLLECTION.PRIMARY:es.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:es.SCALE.MAJOR,fn:wl({layoutService:s,axis:h}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:i?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return zu(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return zu(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return zu(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return zu(e.scale(t))}}},box:{width:Su({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:r,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}}}};function _u(e,t,n,i,r){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:i||r?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Fu=({chart:e,models:t,type:n,environment:i,flags:r,isPrimary:o})=>{const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,seriesModel:d,themeService:m,animationsModel:h}=t,p=m.getStyles(),f=c.query.bar.label.getStyle(),{meta:g}=a,{isBarSeriesStacked:v}=g,y=e.formatter(o?es.FORMATTER.PRIMARY:es.FORMATTER.SECONDARY),S=a.getLayoutValue("dataPoint",{}),M="horizontal"===s.meta.major.orientation,x="rtl"===i.options.direction;if(!(o?d.meta.primaryBarSeriesCount:d.meta.secondaryBarSeriesCount)||!v&&!Au(S,g)||v&&!Nu(S,g))return!1;const b=o?l.query.getExtrema():u.query.getExtrema();if(!b.meta.hasExplicit)return!1;const E=n===Dl?b.implicit.bar.max:b.implicit.bar.min;if(!(n===Dl?cu(E,b):du(E,b)))return!1;let C=e=>eu(e.data,e);g.isBarSeriesStacked&&(C=n===Dl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(cu(e.data.sumOfNegatives.value,b)){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(du(e.data.sumOfPositives.value,b)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return y?y(t):t}return""});const A={label:C,simplifiedPlacements:_u("outside",0,g.isContinuous,M,x),style:p.label.value},N={label:C,simplifiedPlacements:_u("opposite",0,g.isContinuous,M,x),style:p.label.value},O=[Eu(t,A),Eu(t,N)],T=o?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY,L="horizontal"===s.meta.major.orientation?"down":"right",I=[{component:`${es.COMPONENT.GHOST_BAR_OOB}-${n}-${T}`,selector:"rect",strategy:{type:"bar",settings:{direction:L,labels:O,fontSize:parseInt(f.fontSize,10),fontFamily:f.fontFamily}}}];return{key:`${es.COMPONENT.BAR_OOB_LABEL}-${n}-${T}`,type:"labels",renderer:Ra(r),layout:{minimumLayoutMode:El.VALUE_LABEL},settings:{sources:I},animations:{enabled:h.enabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}},Bu=({chart:e,models:t,viewState:n,viewCache:i})=>[xu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),xu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1})],ju=({chart:e,models:t,viewState:n,viewCache:i})=>[bu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),bu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1})],Vu=({chart:e,models:t,environment:n,flags:i})=>{const r=Iu({chart:e,models:t,environment:n,flags:i,isPrimary:!0}),o=Iu({chart:e,models:t,environment:n,flags:i,isPrimary:!1});return[Tu({models:t,environment:n,flags:i,isPrimary:!0}),Tu({models:t,environment:n,flags:i,isPrimary:!1}),r,o]},Hu=({chart:e,models:t,viewCache:n,viewState:i})=>[ku({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!0}),ku({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!0}),ku({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!1}),ku({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!1})],Uu=({chart:e,models:t,viewCache:n,viewState:i})=>[Pu({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!0}),Pu({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!0}),Pu({chart:e,models:t,type:"max",viewCache:n,viewState:i,isPrimary:!1}),Pu({chart:e,models:t,type:"min",viewCache:n,viewState:i,isPrimary:!1})],Yu=({chart:e,models:t})=>[$u({chart:e,models:t,type:"max",isPrimary:!0}),$u({chart:e,models:t,type:"min",isPrimary:!0}),$u({chart:e,models:t,type:"max",isPrimary:!1}),$u({chart:e,models:t,type:"min",isPrimary:!1})],Wu=({chart:e,models:t,environment:n,flags:i})=>[Fu({chart:e,models:t,type:"max",environment:n,flags:i,isPrimary:!0}),Fu({chart:e,models:t,type:"min",environment:n,flags:i,isPrimary:!0}),Fu({chart:e,models:t,type:"max",environment:n,flags:i,isPrimary:!1}),Fu({chart:e,models:t,type:"min",environment:n,flags:i,isPrimary:!1})],Xu=({chart:e,environment:t,flags:n,models:i,viewState:r,viewCache:o})=>{const{seriesModel:a}=i,s=a.query.series(ts.TYPE.BAR).slice(-1),l=a.query.series(ts.TYPE.LINE),u=a.query.series(ts.TYPE.MARKER);return[...Bu({chart:e,models:i,viewState:r,viewCache:o}),...ju({chart:e,models:i,viewState:r,viewCache:o}),...l.map((e=>Xl({models:i,environment:t,series:e}))),...l.map((e=>Ql({models:i,series:e,environment:t}))),...u.map((n=>Ul({chart:e,models:i,series:n,environment:t}))),tu({chart:e,models:i,environment:t,flags:n,lineSeries:l}),nu({chart:e,models:i,environment:t,flags:n,markerSeries:u}),...Vu({chart:e,models:i,environment:t,flags:n}),...Hu({chart:e,models:i,viewCache:o,viewState:r}),...Uu({chart:e,models:i,viewCache:o,viewState:r}),...Yu({chart:e,models:i}),...Wu({chart:e,models:i,environment:t,flags:n}),gu({chart:e,models:i,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"max"}),gu({chart:e,models:i,markerSeries:u,lineSeries:l,barSeries:s,environment:t,type:"min"}),ou({chart:e,models:i,environment:t,lineSeries:l})]},Ku={NONE:0,WIDE:1,NARROW:3};function Gu({models:e}){const{dockService:t,seriesModel:n,layoutService:i,themeService:r,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=i.getLayoutValue("gridLine",{});if(!a&&s===Ku.NONE)return!1;const u=r.getStyles(),c=n.meta.primarySeries.length>0;return{key:es.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:El.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===Ku.WIDE)||((e,t)=>t%2==0),stroke:u.grid.line.major.color},minorTicks:{show:!a&&s===Ku.NARROW,stroke:u.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(null!=l?l:0)&&c?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}}function Ju({models:e}){var t,n;const{primaryExtremumModel:i,primaryTickModel:r,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),h=i.query.getExtrema(),p=l.query.getExtrema();if(!h.meta.includesZero&&!p.meta.includesZero)return!1;return{key:es.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:El.GRID_LINE},show:()=>(()=>{const e=s.meta.primarySeries.length>0,t=s.meta.secondarySeries.length>0;return m&&e&&r.query.getMin()<=0&&r.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?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,line:{stroke:o.getStyles().grid.line.highContrast.color}}]},animations:{enabled:d.enabled,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}}function Zu({models:e}){const{layoutService:t,themeService:n,animationsModel:i}=e,{isContinuous:r,isTime:o}=t.meta;if(!r)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:El.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:i.enabled,trackBy:Ma.lines.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}};return o?[re(!0,{},s,{key:"time-inner-grid",x:{scale:es.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),re(!0,{},s,{key:"time-outer-grid",x:{scale:es.SCALE.MAJOR}})]:[re(!0,{},s,{key:"continuous-grid",x:{scale:es.SCALE.MAJOR},minorTicks:{show:!0}})]}function Qu({models:e}){return[Gu({models:e}),Ju({models:e}),...Zu({models:e})]}function ec({models:e,environment:t,actions:n,viewCache:i,flags:r}){const{alternativeService:o,layoutService:a,dockService:s,appModel:l,genericObjectModel:u,selectionService:c,styleModel:d}=e,m=a.getLayoutValue("dimensionAxis");if(!m)return!1;const{show:h}=m;if("all"!==h&&"title"!==h)return!1;const p=o.getAlternatives(),{orientation:f}=s.meta.major,g=d.query.axis.title.getStyle();return{type:"axis-title",key:es.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:s.meta.major.dock,minimumLayoutMode:El.AXIS_TITLE.MAJOR[f.toUpperCase()]},data:{infos:a.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:l,cache:i,model:u,selections:c.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:r.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:g.color,fontFamily:g.fontFamily,fontSize:g.fontSize}}}}const tc=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function nc({models:e,environment:t,actions:n,viewCache:i,flags:r}){const{alternativeService:o,layoutService:a,dockService:s,seriesModel:l,appModel:u,genericObjectModel:c,selectionService:d,styleModel:m}=e,h=a.getLayoutValue("measureAxes");if(!h||!h.length)return[];const p=o.getAlternatives(),f=m.query.axis.title.getStyle(),{measureAxes:g}=l.meta;return g.filter((e=>e.isPrimary?"all"===h[0].show||"title"===h[0].show:"all"===h[1].show||"title"===h[1].show)).map((e=>{const o=a.getHyperCube(),{isPrimary:m}=e;return{type:"axis-title",key:m?es.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:es.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:m?s.meta.minor.dock:s.meta.minorSecondary.dock,minimumLayoutMode:El.AXIS_TITLE.MINOR},data:{infos:tc(l,o.qMeasureInfo,m),alternatives:p.measures},resources:{app:u,cache:i,model:c,selections:d.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 i=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(i)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:a.meta.isSnapshot,noModelDependencies:r.isEnabled("VIZ_252_DATA_TITLE_OUTSIDE_SENSE"),skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:f.fontFamily,fontSize:f.fontSize,color:f.color}}}}))}function ic({models:e,environment:t,actions:n,viewCache:i,flags:r}){return[ec({models:e,environment:t,actions:n,viewCache:i,flags:r}),...nc({models:e,environment:t,actions:n,viewCache:i,flags:r})]}function rc({models:e,environment:t,viewState:n,viewCache:i}){const{discreteModel:r,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:i,viewState:r,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=Rs({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?i.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Ts({layoutService:e,viewState:r,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const p=a.getStyles();return p.color&&(h.style={standard:{thumb:{"border-color":p.color,opacity:.4},before:{background:p.color,opacity:.1},after:{background:p.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(h.settings.injections=()=>[Os({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:i,discrete:r,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>c,value:Ns.OPTIONS.BAR.value},deviceType:t.deviceType})}function oc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r}){const{layoutService:o}=t,a=xu({chart:e,models:t,viewState:n,viewCache:i,isPrimary:r});if(!a)return!1;const s=r?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY;return a.key=`${es.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?r?es.COLLECTION.REDUCED_STACKED_PRIMARY:es.COLLECTION.REDUCED_STACKED_SECONDARY:r?es.COLLECTION.REDUCED_PRIMARY:es.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=r?es.SCALE.MINOR.REDUCED_PRIMARY:es.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=es.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function ac({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(ts.TYPE.LINE).map((i=>{const r=Xl({models:t,environment:e,series:i});return r.key=$l(es.COMPONENT.MINI_CHART.LINE,i),r.data.collection=es.COLLECTION.REDUCED,r.settings.coordinates.minor.scale=i.isPrimary?es.SCALE.MINOR.REDUCED_PRIMARY:es.SCALE.MINOR.REDUCED_SECONDARY,r.settings.coordinates.major.scale=es.SCALE.REDUCED,r.settings.layers.line.strokeWidth=1,r.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",r.layout={dock:"@scrollbar"},r}))}function sc({models:e,environment:t}){return e.seriesModel.query.series(ts.TYPE.MARKER).map((n=>{const i=Ul({models:e,environment:t,series:n});return i.key=$l(es.COMPONENT.MINI_CHART.MARKER,n),i.data.collection=es.COLLECTION.REDUCED,i.settings.y.scale=n.isPrimary?es.SCALE.MINOR.REDUCED_PRIMARY:es.SCALE.MINOR.REDUCED_SECONDARY,i.settings.x.scale=es.SCALE.REDUCED,i.layout={dock:"@scrollbar"},i}))}function lc({chart:e,models:t,viewState:n,viewCache:i,environment:r}){return cl(t)?[oc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!0}),oc({chart:e,models:t,viewState:n,viewCache:i,isPrimary:!1}),...ac({environment:r,models:t}),...sc({models:t,environment:r})]:[]}function uc({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:i,isTime:r}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!i)return[!1];const a=El.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return r?[{type:"axis-overlay",key:es.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:es.SCALE.MAJOR_INNER,layout:{dock:`@${es.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:es.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:es.SCALE.MAJOR,layout:{dock:`@${es.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:es.SCALE.MAJOR,layout:{dock:`@${es.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function cc({chart:e,models:t,environment:n}){const{refLineModel:i,layoutService:r,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u,animationsModel:c}=t,d=l.qLocaleInfo,{options:m,theme:h}=n,p="rtl"===m.direction,f=u.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary)),g=u.query.series(ts.TYPE.BAR).filter((e=>!e.isPrimary)),v=u.query.series(ts.TYPE.LINE),y=u.query.series(ts.TYPE.MARKER),S=u.query.all(),M=S.some((e=>e.isPrimary)),x=S.some((e=>!e.isPrimary)),b=M&&x,E={resolveUIColor:o.getPaletteColor},C=c.enabled,A=M?La({refLineModel:i,layoutService:r,colorModel:E,dock:b?a.meta.minor.dock:a.meta.minor.opposite,scale:es.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:es.FORMATTER.PRIMARY,theme:h,localeInfo:d,rtl:p,key:es.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],N=x?La({refLineModel:i,layoutService:r,colorModel:E,dock:b?a.meta.minor.opposite:a.meta.minor.dock,scale:es.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:es.FORMATTER.SECONDARY,theme:h,localeInfo:d,rtl:p,key:es.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!M&&Na({refLineModel:i,layoutService:r,colorModel:E,dockService:a,chart:e,scale:es.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:es.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:El.REFERENCE_LINE,animationsEnabled:C}),!!x&&Na({refLineModel:i,layoutService:r,colorModel:E,dockService:a,chart:e,scale:es.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:es.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:El.REFERENCE_LINE,animationsEnabled:C}),Na({isDimension:!0,refLineModel:i,layoutService:r,colorModel:E,dockService:a,chart:e,scale:es.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:p,key:es.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`:g.length?`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`:v.length?`${es.COMPONENT.LINE}-${v[0].id}`:y.length?`${es.COMPONENT.MARKER}-${y[0].id}`:`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,minimumLayoutMode:El.REFERENCE_LINE,animationsEnabled:C}),...A,...N,...La({isDimension:!0,refLineModel:i,layoutService:r,colorModel:E,dock:a.meta.major.opposite,scale:es.SCALE.MAJOR,style:s.getStyles(),theme:h,localeInfo:d,rtl:p,key:es.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function dc({layoutService:e}){return!!cl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:es.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function mc(e){return(null==e?void 0:e.type)||ts.TYPE.BAR}function hc({models:e,environment:t}){const{layoutService:n,colorService:i,dockService:r,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",{}),h=e=>e.filter((e=>mc(e)===ts.TYPE.LINE)).map((e=>({key:$l(es.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),p=!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:es.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:h(o.meta.primarySeries),secondary:h(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=>i.getSettingsForMeasure(e),colorByData:e=>!f[e]&&p,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:r.meta.major.orientation,rtl:"rtl"===d.direction}}}function pc({models:{fieldModel:e}}){return{[es.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[es.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var fc={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:gc}=fc;function vc({layoutService:e,largeDataService:t}){const{maxNumPoints:n=gc}=(null==t?void 0:t.meta)||{},{qHyperCube:i}=e.getLayout();return i.qSize.qcy*i.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:yc}=fc,Sc=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=yc}=(null==t?void 0:t.meta)||{},{qHyperCube:i}=e.getLayout();return i.qDimensionInfo.length>1&&!vc({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Mc}=fc,{MAX_NUM_POINTS:xc,DEFAULT_NUM_POINTS:bc,DEFAULT_NUM_LINES:Ec}=fc,{DEFAULT_NUM_POINTS:Cc}=fc,Ac=({layoutService:e,largeDataService:t})=>{if(!vc({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Cc}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:i=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:r=Ec,maxNumPoints:o=bc,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Sc({layoutService:e,largeDataService:t})*i[0]<=o)return i[0];const s=Math.max(1,Math.min(r,i[1])),l=o/s,u=Math.floor(i[0]<=l?l:l/4),c=2*s*(s+1);return a&&(s>Ec||o>bc)?Math.min(u,Math.ceil(xc/c)):u})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Mc}=(null==t?void 0:t.meta)||{},{measureCount:i=1}=(null==e?void 0:e.meta)||{},r=4+2*(i-1);return Math.floor(n/(i*r))})({layoutService:e,largeDataService:t})};function Nc({model:e,layoutService:t,largeDataService:n,definitionPath:i="/qHyperCubeDef"}){return{shouldFetchReduced:()=>vc({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Ac({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Sc({layoutService:t,largeDataService:n}),fetch:(r,o)=>(({start:e,end:t,model:n,layoutService:i,largeDataService:r,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:Ac({layoutService:i,largeDataService:r}),qMaxNbrTicks:300,qMaxNumberLines:Sc({layoutService:i,largeDataService:r})};return n.getHyperCubeContinuousData(o,a,!1)})({start:r,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:i})}}function Oc(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Tc({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 i=n+e,r=i+t;return 1===t&&0===e&&(i=n-.5,r=n+.5),{zoom:{min:i,max:r}}}(n,t.get("continuousMin"))}}}function Lc(){const e=()=>{},t=[],n={};return e.set=(e,i)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1),t.push(e),n[e]=i},e.forEach=e=>{t.forEach(((t,i)=>e(n[t],i)))},e.has=e=>e in n,e}function Ic(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const i=[],r=Lc(),o=Lc();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?r.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return r.forEach(((e,t)=>i.splice(t,0,e))),o.forEach((e=>i.push(e))),i}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const i=[];let r,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?r=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&i.push(s)}return r&&i.unshift(r),o&&i.push(o),i}({start:e,end:t,matrix:n})}function Rc(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function wc(e,t,n){const i={qDataPages:(n.qDataPages||[]).map((n=>{const i=Ic(e,t,n.qMatrix),r=Rc(n.qArea,i);return{...n,qArea:r,qMatrix:i}}))};return n.qAxisData&&n.qAxisData.qAxis&&(i.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,i)=>((i.qStart>=e&&i.qStart<=t||i.qEnd>=e&&i.qEnd<=t||i.qStart<e&&i.qEnd>t)&&n.push(i),n)),[])})))}}(e,t,n.qAxisData)),i}const kc=2**.5,qc=1/kc,Dc=qc**44;function Pc(e){return e.qIsOtherCell}function zc({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Pc)){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(Pc)||t++})),t}(n)}const $c={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var _c={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 i=t[e],r=t[e+1];i.data={},r||1===i.end?r?(i.data.start=i.value,i.data.end=r.value,i.end=r.position):(i.data.start=i.value,i.data.end=i.value):(i.data.start=i.value,i.data.end=n,i.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 i=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],i.data.start]},x:0,y:0,width:i.start*this.rect.width,height:this.rect.height})}return n}};function Fc(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Bc(e,t){const{localProps:{size:n},props:{anchor:i}}=t,r=function({props:e,localProps:{size:t},style:n,renderer:i}){const r=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=>i.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,i)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=i;e.start===e.end&&(d=u.width+2*r,1===e.end&&(c-=d));const m={x:c+r,y:r,width:d-2*r,height:t.height-2*r},h=s(`${l[0]}…`).width,p=Math.max(0,m.width-u.width),f=Math.max(0,m.height-u.height),g=o*p,v=a*f;return{show:m.width>=Math.min(h,u.width),text:l,dx:g,dy:v,rect:m,style:n.label,segment:{x:c+g,width:u.width+2*r},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:i}){const[r,o]=n.domain(),a=Math.max(0,Math.min(1,i.guideLine.major.justify));return{resolve:(n,i)=>{const s=a*i.width,l=Fc(i.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=r&&n.value<=o,x1:l,y1:0,x2:l,y2:Fc(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const i=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:i,height:t.height}}(e,n,i);return{rect:t,label:r.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const i=e[n-1],r=t[n-1].label;if(i&&i.start===i.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=r.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function jc(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:i=>{const r=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Fc(i.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Fc(r,n.minorGuideLine.strokeWidth),x2:o,y2:Fc(t.guideLine.minor.size+r,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Vc(e){return e.filter((e=>e.show)).map((e=>re({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var Hc={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)),i=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const i=Fc(1,t.line.strokeWidth);return{show:n.line.show,x1:Fc(0,t.line.strokeWidth),y1:i,x2:Fc(e.width,t.line.strokeWidth),y2:i,style:t.line}}(this),this.state.major=Bc(n,this),this.state.minor=jc(i,this)},render(){return[...Vc([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>re({},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})))),...Vc(this.state.major.map((e=>e.guideLine))),...Vc(this.state.minor.map((e=>e.guideLine)))];var e}};function Uc(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 Yc({qAxis:e}){const t=[],n=[];for(let i=0;i<e.length;i++){const r=i+1,o=e[i],a=e[r];Uc(o,a)?(a.qTags.indexOf("$qualified")>-1?(t.push(r),n.push(i)):(t.push(i),n.push(r)),i++):(t.push(i),n.push(i))}return{qualified:t,nonQualified:n}}function Wc({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let i,r=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(r=u.index,i=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const i=t[l+2];i&&i.queries.minor(n)&&(a=i.index);break}}}if(!Number.isNaN(r)&&Number.isNaN(o)&&"auto"!==o){o=r,r=NaN;const e=t[i+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(r)&&(r="auto",o="auto");return{outer:r,inner:o,minor:a,isDayOrShorter:s}}}}function Xc({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:i}){const r=n;return{isDayOrShorter:()=>(r.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,r.isDayOrShorter),count:()=>e.length,maxRange:()=>(r.maxRange=e.length?Math.max(...e.map((e=>Math.abs(i(e.qStart)-i(e.qEnd))))):0,r.maxRange),rangeAndWidth(){const n=i.clamp();return i.clamp(!1),r.rangeAndWidth=e.map((e=>({range:Math.abs(i(e.qStart)-i(e.qEnd)),width:t(`${e.qText}`).width+16}))),i.clamp(n),r.rangeAndWidth}}}function Kc({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 Gc({qualified:e,nonQualified:t,qAxis:n,measureText:i,reqAutoFitWidth:r,scale:o},{attributesFactory:a=Xc,queryFactory:s=Kc}={attributesFactory:Xc,queryFactory:Kc}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:i,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:r})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function Jc({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:i=0,scale:r},{metaFactory:o=Gc,mapper:a=Yc,resolver:s=Wc}={metaFactory:Gc,mapper:Yc,resolver:Wc}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:i,scale:r}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const i=n.key({distance:t});if(n.get(i))return n.get(i);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 r=m.resolve(t);return n.set(i,r),r}}}function Zc(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const Qc=Zc(0).getTime();function ed(e){return(e.getTime()-Qc)/86400/1e3}const td=new Date,nd=new Date;function id(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=t=>(e(t=new Date(+t)),t),r.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),r.round=e=>{const t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),r.range=(n,i,o)=>{const a=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<i);return a},r.filter=n=>id((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,i)=>{if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););})),n&&(r.count=(t,i)=>(td.setTime(+t),nd.setTime(+i),e(td),e(nd),Math.floor(n(td,nd))),r.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?t=>i(t)%e==0:t=>r.count(0,t)%e==0):r:null)),r}const rd=1e3,od=6e4,ad=36e5,sd=864e5,ld=6048e5,ud=id((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*rd)}),((e,t)=>(t-e)/rd),(e=>e.getUTCSeconds()));ud.range;const cd=id((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd)}),((e,t)=>{e.setTime(+e+t*od)}),((e,t)=>(t-e)/od),(e=>e.getMinutes()));cd.range;const dd=id((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*od)}),((e,t)=>(t-e)/od),(e=>e.getUTCMinutes()));dd.range;const md=id((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rd-e.getMinutes()*od)}),((e,t)=>{e.setTime(+e+t*ad)}),((e,t)=>(t-e)/ad),(e=>e.getHours()));md.range;const hd=id((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*ad)}),((e,t)=>(t-e)/ad),(e=>e.getUTCHours()));hd.range;const pd=id((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*od)/sd),(e=>e.getDate()-1));pd.range;const fd=id((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sd),(e=>e.getUTCDate()-1));fd.range;const gd=id((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sd),(e=>Math.floor(e/sd)));function vd(e){return id((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())*od)/ld))}gd.range;const yd=vd(0),Sd=vd(1),Md=vd(2),xd=vd(3),bd=vd(4),Ed=vd(5),Cd=vd(6);function Ad(e){return id((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)/ld))}yd.range,Sd.range,Md.range,xd.range,bd.range,Ed.range,Cd.range;const Nd=Ad(0),Od=Ad(1),Td=Ad(2),Ld=Ad(3),Id=Ad(4),Rd=Ad(5),wd=Ad(6);Nd.range,Od.range,Td.range,Ld.range,Id.range,Rd.range,wd.range;const kd=id((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 qd=id((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()));qd.range;const Dd=id((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()));Dd.every=e=>isFinite(e=Math.floor(e))&&e>0?id((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,Dd.range;const Pd=id((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()));Pd.every=e=>isFinite(e=Math.floor(e))&&e>0?id((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,Pd.range;const zd=1,$d=2,_d=3,Fd=4,Bd=5,jd=6;function Vd({timeScale:e,labels:t,distance:n,isDayOrShorter:i,cache:r,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=r.key({distance:n});let c;r.get(u,1)?c=r.get(u,1):(c=function(e,t,n,i,r,o){function a(e){return Pd.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=ud.count(e,t),l=dd.count(e,t),u=hd.count(e,t),c=fd.count(e,t),d=Nd.count(e,t),m=qd.count(e,t),h=Pd.count(e,t),p=n/i.second.width-1,f=n/i.minute.width-1,g=n/i.date.width-1,v=n/i.year.width-1,y={type:"year",desc:"year",count:h,interval:Pd.every(1),formatter:i.year.formatter,offset:e=>Pd.offset(e,-1),floor:Pd.floor};if(s<=p)y.type=zd,y.desc="second",y.count=s,y.interval=ud.every(1),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-1),y.floor=ud.floor;else if(s/2<=p)y.type=zd,y.desc="every other second",y.count=s/2,y.interval=ud.every(2),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-2),y.floor=ud.floor;else if(s/5<=p)y.type=zd,y.desc="every 5 second",y.count=s/5,y.interval=ud.every(5),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-5),y.floor=ud.floor;else if(s/15<=p)y.type=zd,y.desc="every 15 second",y.count=s/15,y.interval=ud.every(15),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-15),y.floor=ud.floor;else if(s/30<=p)y.type=zd,y.desc="every 30 second",y.count=s/30,y.interval=ud.every(30),y.formatter=i.second.formatter,y.offset=e=>ud.offset(e,-30),y.floor=ud.floor;else if(l<=f)y.type=$d,y.desc="minute",y.count=l,y.interval=dd.every(1),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-1),y.floor=dd.floor;else if(l/2<=f)y.type=$d,y.desc="every 2 minute",y.count=l/2,y.interval=dd.every(2),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-2),y.floor=dd.floor;else if(l/5<=f)y.type=$d,y.desc="every 5 minute",y.count=l/5,y.interval=dd.every(5),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-5),y.floor=dd.floor;else if(l/10<=f)y.type=$d,y.desc="every 10 minute",y.count=l/10,y.interval=dd.every(10),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-10),y.floor=dd.floor;else if(l/15<=f)y.type=$d,y.desc="every 15 minute",y.count=l/15,y.interval=dd.every(15),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-15),y.floor=dd.floor;else if(l/30<=f)y.type=$d,y.desc="every 30 minute",y.count=l/30,y.interval=dd.every(30),y.formatter=i.minute.formatter,y.offset=e=>dd.offset(e,-30),y.floor=dd.floor;else if(u<=f)y.type=_d,y.desc="hour",y.count=u,y.interval=hd.every(1),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-1),y.floor=hd.floor;else if(u/2<=f)y.type=_d,y.desc="every 2 hour",y.count=u/2,y.interval=hd.every(2),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-2),y.floor=hd.floor;else if(u/3<=f)y.type=_d,y.desc="every 3 hour",y.count=u/3,y.interval=hd.every(3),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-3),y.floor=hd.floor;else if(u/6<=f)y.type=_d,y.desc="every 6 hour",y.count=u/6,y.interval=hd.every(6),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-6),y.floor=hd.floor;else if(u/12<=f||r)y.type=_d,y.desc="every 12 hour",y.count=u/12,y.interval=hd.every(12),y.formatter=i.minute.formatter,y.offset=e=>hd.offset(e,-12),y.floor=hd.floor;else if(c<=g)y.type=Fd,y.desc="day",y.count=c,y.interval=fd.every(1),y.formatter=i.date.formatter,y.offset=e=>fd.offset(e,-1),y.floor=fd.floor;else if(c/2<=g)y.type=Fd,y.desc="every 2 day",y.count=c/2,y.interval=fd.every(2),y.formatter=i.date.formatter,y.offset=e=>fd.offset(e,-2),y.floor=fd.floor;else if(c/3<=g)y.type=Fd,y.desc="every 3 day",y.count=c/3,y.interval=fd.every(3),y.formatter=i.date.formatter,y.offset=e=>fd.offset(e,-3),y.floor=fd.floor;else if(d<=g)y.type=Fd,y.desc="week",y.count=d,y.interval=Nd.every(1),y.formatter=i.date.formatter,y.offset=e=>Nd.offset(e,-1),y.floor=fd.floor;else if(d/2<=g)y.type=Fd,y.desc="every 2 week",y.count=d/2,y.interval=Nd.every(2),y.formatter=i.date.formatter,y.offset=e=>Nd.offset(e,-2),y.floor=fd.floor;else if(m<=g)y.type=Bd,y.desc="month",y.count=m,y.interval=qd.every(1),y.formatter=i.date.formatter,y.offset=e=>qd.offset(e,-1),y.floor=fd.floor;else if(m/3<=g)y.type=Bd,y.desc="quarter",y.count=m/3,y.interval=qd.every(3),y.formatter=i.date.formatter,y.offset=e=>qd.offset(e,-3),y.floor=fd.floor;else if(m/6<=g)y.type=Bd,y.desc="half year",y.count=m/6,y.interval=qd.every(6),y.formatter=i.date.formatter,y.offset=e=>qd.offset(e,-6),y.floor=fd.floor;else if(h<=v)y.type=jd,y.desc="year",y.count=h,y.interval=Pd.every(1),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-1),y.floor=Pd.floor;else if(h/2<=v)y.type=jd,y.desc="every 2 year",y.count=h/2,y.interval=a(2),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-2),y.floor=Pd.floor;else if(h/5<=v)y.type=jd,y.desc="every 5 year",y.count=h/5,y.interval=a(5),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-5),y.floor=Pd.floor;else if(h/10<=v)y.type=jd,y.desc="every 10 year",y.count=h/10,y.interval=a(10),y.formatter=i.year.formatter,y.offset=e=>Pd.offset(e,-10),y.floor=Pd.floor;else{const e=Math.max(1,Math.floor(h/v));y.type=jd,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=i.year.formatter,y.offset=t=>Pd.offset(t,-e),y.floor=Pd.floor}return y}(s,l,n,t.all(),i,a),r.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 i=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:c.formatter}}));let h=[];if(!o&&c.type<=_d){const n=t.getFormat("date"),i=e.ticks(fd.every(1));i.length&&s.getUTCDate()!==i[0].getUTCDate()&&i.unshift(fd.offset(i[0],-1)),h=(i.length?i:[fd.floor(s)]).map(((e,t,i)=>{const r=i[t+1]?i[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:n.formatter}}))}return{inner:m,outer:h}}const Hd=86400,Ud=1440,Yd={};function Wd(e,t,n,i){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:i}}function Xd(e,t,n){const{generator:i,anchor:r,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=Mo().domain([Zc(l),Zc(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof i?i:{type:i};let m;m="d3"===d.type?(e,r)=>Vd({timeScale:c,labels:n,distance:e,isDayOrShorter:r,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:Zc(i.initialMin)}):e=>function(e,t,n,i,r,o=!1){if(Yd[[t,n,i,i,o]])return Yd[[t,n,i,i,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=Zc(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=i-n,m=t/(r-i),h=m/1440,p=m/Hd,f=366*m,g=3*m*30,v=a.second.width/p,y=a.minute.width/h,S=a.date.width/g,M=a.year.width/f;let x,b,E,C=0,A=0,N=null,O=null,T=null,L=null,I=null,R=null;const w={outer:[],inner:[]};for(v<1?(N=1,A=1/Hd):v<2?(N=2,A=1/Hd*2):v<5?(N=5,A=1/Hd*5):v<10?(N=10,A=1/Hd*10):v<30?(N=30,A=1/Hd*30):y<1?(O=1,A=1/Ud):y<2?(O=2,A=1/Ud*2):y<5?(O=5,A=1/Ud*5):y<10?(O=10,A=.006944444444444445):y<30?(O=30,A=.020833333333333336):y<60?(T=1,A=1/24):y<120?(T=2,A=2/24):y<360?(T=6,A=.25):y<720?(T=12,A=.5):S<1/90?(A=1,L=1):S<2/90?(A=2,L=2):S<7/90?(A=7,L=7):S<31/90?(I=1,A=31):S<1?(I=3,A=90):M<1?(R=1,A=366):M<2?(R=2,A=732):M<5?(R=5,A=1826.25):(R=10,A=3652.5),b=Math.floor((d+n%1)/A);C<r;){E=b+1,x=R?Wd("year",[l+b*R,0,1],[l+E*R,0,1],a.year.formatter):I?Wd("month",[l,u+b*I,1],[l,u+E*I,1],a.date.formatter):L?Wd("day",[l,u,c+b*L],[l,u,c+E*L],a.date.formatter):T?Wd("hour",[l,u,c,0+b*T],[l,u,c,0+E*T],a.minute.formatter):O?Wd("minute",[l,u,c,0,0+b*O],[l,u,c,0,0+E*O],a.minute.formatter):Wd("second",[l,u,c,0,0,0+b*N],[l,u,c,0,0,0+E*N],a.second.formatter),C=ed(x.start),w.inner.push(x);const e=Math.floor(C);if(!(o||R||I||L)){const t={type:"day",start:Zc(e),end:Zc(e+1),formatter:a.date.formatter,qStart:e};w.outer[w.outer.length-1]&&w.outer[w.outer.length-1].qStart===t.qStart||w.outer.push(t)}b++}return w.min=i,w.max=r,Yd[[t,n,i,i,o]]=w,w}(n,e,d.min,l,u,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let i;i="start"===r?t.qStart:"end"===r?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(i),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:i,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"===r?ed(t.start):"end"===r?ed(t.end):(ed(t.start)+ed(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:ed(t.start),end:ed(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const Kd=/t+/i;const Gd={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 Jd(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 Zd="continuousPan";var Qd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:i=$c,viewCache:r,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Nc,snapshotFetcherFactory:u=Tc,cacheFetcherFactory:c=Oc,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=u({layoutService:t,viewCache:r}),p=c({cache:d}),f=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,i;({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])),r.set("continuousMin",v),r.set("continuousMax",y),r.set("minimiumZoomSpan",(n=v,i=y,Math.max(1e-6,(i-n)*Dc))),g=t.meta.isSnapshot?h:m,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=h.getSnapshotData()),o.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:i}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",i),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=Rc(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return i.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>wc(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 i=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,i=t[t.length-1][0].qNum,r=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?r.push(e[t]):a.qNum>i&&o.push(e[t])}return[...r,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),r=Rc(e.qArea,i);return{...e,qArea:r,qMatrix:i}})),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)),i=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),r=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}=i[a];for(let n=0,i=o.qTicks.length;n<i;n++){const i=o.qTicks[n];i.qStart<e?s.push(i):i.qStart>t&&l.push(i)}r[a].qTicks=[...s,...r[a].qTicks,...l]}}return{qAxis:r}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(i.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>wc(e,t,n))).catch(f),fetchFromCache:(e,t)=>p.fetch(e,t).then((n=>wc(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return re({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return re({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>zc(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=i.query.getShouldProcess()?[i.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:i}=e;function r(e,n,r){return i[e](n,r).then((e=>(i.updateLayout(e),t(),e)))}const o=N(((e,t)=>r("fetch",e,t)),50);return({min:e,max:t},{min:i,max:a})=>!n.meta.isContinuous||e===i&&t===a?Promise.resolve(null):r("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,i=NaN;return(r,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),i=e.get("minimiumZoomSpan"),Math.abs(r.max-r.min)<i?o:{min:Math.min(r.max,Math.max(t,r.min)),max:Math.max(r.min,Math.min(n,r.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:i=50,rtl:r=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return O(((e,i)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:i}=e;return i-=t.element.getBoundingClientRect().left,i-=n.rect.x,Math.max(0,Math.min(1,i/n.rect.width))}(e,n,l),u=r?1-o:o,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),h=m-(i>0?qc:kc)*m,p=c+h*u,f=d-h*(1-u),g=p<a?a-p:0,v=f>s?f-s:0;t.set("zoom",{min:Math.max(p-v,a),max:Math.min(f+g,s)})}}),i)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:i,viewCache:r}){return{type:"Pan",key:"continuous:pan",options:{event:Zd,pointers:1,threshold:10,enable(i,r){return this.started===Zd||!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))}},events:{[`${Zd}start`](n){n.preventDefault(),this.started=Zd;const{min:r,max:o}=i.get("zoom");this[Zd]={min:r,max:o,size:t.component(e).rect.computedInner.width,span:o-r}},[`${Zd}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[Zd],s=-e.deltaX/a;i.set("zoom",{min:Math.min(n+s*t,r.get("continuousMax")-t),max:Math.max(o+s*t,r.get("continuousMin")+t)})},[`${Zd}end`](e){e.preventDefault(),this.started=!1},[`${Zd}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:_c,timeAxis:Hc},picassoScales:{time:function e(t,n={}){const i=function(e,t,n){const i={};return Object.keys(t).forEach((r=>{const o=e[r],a=typeof o;"function"===a?i[r]=o(n):"object"!==a||Array.isArray(o)?i[r]="undefined"===a?t[r]:o:i[r]=re(!0,{},t[r],o)})),i}(t,Gd,n),{qAxis:r}=i,o=ui(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,i=+e.max;return Number.isNaN(n)&&Number.isNaN(i)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),i=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===i&&(n-=.5,i+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+i)?1:i}}(i,r);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[i.ticks.level];if(Number.isNaN(+o)||(d=c.transform(r[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(r[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=>(Jd(a,m),a.instance(e)),m.normInvert=e=>(Jd(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(i.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=i.invert;const h=function(e){const t={},{measureText:n,fn:i,localeInfo:r}=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 r&&Kd.test(r.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=r&&r.qDateFmt?r.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=i(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 i=Zc(t[0].data.start),r=Zc(t[n-1].data.start);return fd.count(i,r)/n>=1?o.date:hd.count(i,r)/n>0?o.minute:dd.count(i,r)/n>0?o.second:o.date},t}(i);return c=Xd(o.copy(),i,h),u=Jc({qAxis:r,measureText:i.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:i.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>`qHyperCube/${i.field}`,key:()=>i.field,raw:b(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>h.getFormatFromTicks(d).formatter,m}}};const em=e=>e.meta.seriesComponentKeys[0],tm=(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 nm({chart:e,models:t,actions:n,viewState:i,viewCache:r,environment:o}){const{event:{onZoom:a}}=Qd,{layoutService:s,seriesModel:l}=t,u=em(l),c=s.meta.isContinuous?a({chart:e,viewState:i,viewCache:r},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:u}):()=>{};return{type:"native",events:{wheel(t){const i={x:t.clientX,y:t.clientY},r=e.componentsFromPoint(i);if(n.interact.enabled()){const[e]=r.filter((e=>e.key===es.COMPONENT.LEGEND_CATEGORICAL));tm(t,e)}if(n.scroll.enabled()){const[e]=r.filter((e=>e.key===u));e&&(c(i,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const im="continuousPinchZoom";function rm({chart:e,models:t,environment:n,viewState:i,viewCache:r,actions:o,selectables:a}){const s=Qd.interactions.areaPan,{layoutService:l,dockService:u,discreteModel:c,colorService:d,tooltipService:m}=t,h="rtl"===n.options.direction,p=m.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...js({componentKey:e,chart:t,actions:n,viewState:i,viewCache:r,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Vs({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:i,viewCache:r,discrete:c,layoutService:l,dockService:u,rtl:h}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...f.gestures,...p.gestures]},v=[nm({chart:e,models:t,actions:o,viewState:i,viewCache:r,environment:n}),f.native,p.native];return l.meta.isDiscrete&&(g.gestures.push(...c.interactions.gestures),v.push(c.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:em(t.seriesModel),chart:e,actions:o,viewState:i,viewCache:r}),function({targetKey:e,chart:t,actions:n,viewState:i,viewCache:r,rtl:o}){const a={last:0},s=Qd.event.onZoom({viewCache:r,viewState:i,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:im,pointers:2,threshold:0,enable:(i,r)=>!r||!!n.scroll.enabled()&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).some((t=>t.key===e))},events:{[`${im}start`](e){a.last=e.scale,e.preventDefault()},[`${im}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:em(t.seriesModel),chart:e,actions:o,viewState:i,viewCache:r,rtl:h})),[g,...v]}const om=({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}}}),am="lasso",sm=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:i},r)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:i,options:{event:am,enable(e,n){if(this.started===am||!n)return!0;if(!r.actions.select.enabled()||!r.actions.lasso.enabled()||!r.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!==am&&(r.actions.select.emit("start",am),this.chart.component(e).emit("lassoStart",t),this.started=am)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof r.updateOnMove&&r.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),r.actions.select.emit("end",am),"function"==typeof r.updateOnEnd&&r.updateOnEnd()}}});const lm=({targets:e,requireFailure:t,recognizeWith:n,components:i,eventName:r="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:r,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:{[r](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let i,r;return e.center?(({x:i}=e.center),({y:r}=e.center)):(i=e.clientX,r=e.clientY),{x:i-n.left,y:r-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"),h="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",r,e)),d.length&&i){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof i?i(t,d):i;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",r),(({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 h&&m.emit("hide")}}}};const um=({key:e,requireFailure:t,recognizeWith:n,eventName:i="tap"},r)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${i}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!r.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:{[`${i}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const cm=({eventName:e,key:t,fillTargets:n=[],requireFailure:i,recognizeWith:r},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:i,recognizeWith:r,options:{event:e,enable(i,r){if(this.started===e||!r)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:r.center.x,y:r.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}-`))}(r,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 dm(e,t){const n=function(e){const{key:t,targets:n,fillTargets:i,targetSelector:r,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:i,selector:r,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),i=cm(e,t,"range");return{interactions:[e.onEdited?um(e,t):null,i].filter(Boolean),components:[n]}}const mm=/axis|legend/,hm=e=>e.some((e=>mm.test(e.type)));function pm({actions:e,models:t}){const{seriesModel:n,layoutService:i,colorService:r,flags:o}=t,a=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,...n.query.series(ts.TYPE.MARKER).map((e=>$l(es.COMPONENT.MARKER,e))),...n.query.series(ts.TYPE.LINE).map((e=>$l(es.COMPONENT.POINT,e))),es.COMPONENT.AXIS.MAJOR,es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER,es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,es.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:i}=n,r={key:i,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[es.COMPONENT.AXIS.MAJOR,es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER,es.COMPONENT.AXIS_OVERLAY.CONTINUOUS,es.COMPONENT.LEGEND_CATEGORICAL].indexOf(i)&&(r.data=["selectionDimension"]),[r]}},l={actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?r.isSelectionLocked({isMeasureSelectionLocked:i.meta.isDimensionLocked}):i.meta.isDimensionLocked,hitRadius:e=>hm(e)?0:3,debouncer:N,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[lm(e,t)],components:[]}}(s,l)}function fm({actions:e,models:t}){const{layoutService:n,dockService:i,seriesModel:r}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...r.meta.seriesComponentKeys,es.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:i,fillTargets:r,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:i},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:r,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[cm(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[es.COMPONENT.AXIS.MAJOR],dock:i.meta.major.dock},{actions:e})}const gm={components:[],interactions:[]};function vm({actions:e,chart:t,models:n,isUnsupportedFeature:i}){const r=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:i,seriesModel:r,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&dm({eventName:"minorRange",key:"minor-range-brush",targets:[es.COMPONENT.AXIS.MINOR.PRIMARY,`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,...r.query.series(ts.TYPE.MARKER).filter((e=>e.isPrimary)).map((e=>$l(es.COMPONENT.MARKER,e))),...r.query.series(ts.TYPE.LINE).filter((e=>e.isPrimary)).map((e=>$l(es.COMPONENT.POINT,e)))],fillTargets:[es.COMPONENT.AXIS.MINOR.PRIMARY],dock:i.meta.minor.dock,scale:es.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:i})||gm,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:i,seriesModel:r,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&dm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[es.COMPONENT.AXIS.MINOR.SECONDARY,`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,...r.query.series(ts.TYPE.MARKER).filter((e=>!e.isPrimary)).map((e=>$l(es.COMPONENT.MARKER,e))),...r.query.series(ts.TYPE.LINE).filter((e=>!e.isPrimary)).map((e=>$l(es.COMPONENT.POINT,e)))],fillTargets:[es.COMPONENT.AXIS.MINOR.SECONDARY],dock:i.meta.minorSecondary.dock,scale:es.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:i})||gm,a=fm({actions:e,models:n})||gm,s=function({actions:e,chart:t,models:n}){const{layoutService:i,dockService:r,seriesModel:o}=n,{isContinuous:a,isTime:s}=i.meta;if(!a)return!1;const l=s?[es.COMPONENT.AXIS_OVERLAY.TIME_INNER,es.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[es.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return dm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,...o.query.series(ts.TYPE.MARKER).map((e=>$l(es.COMPONENT.MARKER,e))),...o.query.series(ts.TYPE.LINE).map((e=>$l(es.COMPONENT.POINT,e))),...l],fillTargets:l,dock:r.meta.major.dock,scale:s?es.SCALE.MAJOR_INNER:es.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:i}){const r=s?i.formatter():t.formatter(es.FORMATTER.PRIMARY),o=t.scale(es.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${r(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||gm,l=function({actions:e,models:t}){const{colorService:n,layoutService:i}=t,[r]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=i.meta;if(a||!r)return!1;const s=`${es.SCALE.COLOR}Range`,{type:l,key:u}=r,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&dm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:r.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||gm;return{components:[...r.components,...o.components,...a.components,...s.components,...l.components],interactions:[...r.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function ym({actions:e,models:t}){const{layoutService:n,seriesModel:i}=t,{seriesComponentKeys:r}=i.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},i=om(n);return{interactions:[sm(n,t)],components:[i]}}({key:"lasso",componentTargetKey:r[0],components:r.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function Sm({chart:e,chartModel:t,colorService:n,context:i,resources:r,viewCache:o,scales:a,models:s}){const{layoutService:l,dockService:u,themeService:c,discreteModel:d,seriesModel:m}=s,h={...n,getMain:()=>({getPaletteColor:n.getPaletteColor.bind(n)})},p=[],f=l.getLayoutValue("plugins");if(!Array.isArray(f)||0===f.length)return p;const{allSeries:g,seriesComponentKeys:v}=m.meta,[y]=v;let S;const M=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=he.generateId)}))}(f);const x=[{key:es.COMPONENT.POINT,lines:!0,labels:!1,labelKeys:[es.COMPONENT.POINT_LABEL]},{key:es.COMPONENT.FORECAST_POINT,lines:!0,labels:!1,labelKeys:[es.COMPONENT.FORECAST_POINT_LABEL]}],b=function(e){const t=[];return e.forEach((e=>{const n=t[t.length-1],i=null==n?void 0:n[0],r=(null==e?void 0:e.type)===(null==i?void 0:i.type),o=(null==e?void 0:e.scale)===(null==i?void 0:i.scale);let a=!1;if("point"===(null==e?void 0:e.type))a=o&&r;else if("line"===(null==e?void 0:e.type)){const t=!(null!=e&&e.showPoints||null!=i&&i.showPoints);a=r&&o&&t}a?n.push(e):t.push([e])})),t}(M);return b.forEach(((n,r)=>{var o;const s=`points-addon-combo-chart-${r}`,m=`lines-addon-combo-chart-${r}`;var f,v,M,b,E;"point"===n[0].type?S=(null===(f=n[0])||void 0===f?void 0:f.scale)||(null===(v=g[0])||void 0===v?void 0:v.scale):S=null!==(M=null===(b=n[0])||void 0===b||null===(b=b.points[0])||void 0===b?void 0:b.scale)&&void 0!==M?M:null===(E=g[0])||void 0===E?void 0:E.scale;switch(null===(o=n[0])||void 0===o?void 0:o.type){case"point":p.push(za({chart:e,chartModel:t,discreteModel:d,colorService:h,themeService:c,layoutService:l,dockService:u,rtl:i.rtl,majorScale:es.SCALE.MAJOR,minorScale:S,mainComponentKey:y,data:n,key:s})),x.push({key:s,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":p.push(function({chart:e,chartModel:t,discreteModel:n,colorService:i,layoutService:r,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 h={resolveUIColor:i.getMain().getPaletteColor},p="horizontal"===o.meta.major.orientation,f=!(!p||!a),{canBeContinuous:g,isContinuous:v}=r.meta,y=r.getLayout(),S=Go.getDimensionValuesInfo({layout:y,canBeContinuous:g,discreteModel:n,layoutService:r}),M=[];c.forEach(((e,t)=>{var n;const i=(null!==(n=null==e?void 0:e.points)&&void 0!==n?n:[]).map(((n,i)=>({...n,lineId:t,style:0===i?e.style:void 0})));M.push(...i)}));const x={},b=[];c.forEach((e=>{var t;return b.push(...(null!==(t=null==e?void 0:e.points)&&void 0!==t?t:[]).map((e=>e.dimensionValue)))})),b.forEach((e=>{S[e]&&(x[e]?(x[e].innerValues=S[e].innerValues,x[e].minOrder=Math.min(x[e].minOrder,S[e].minOrder),x[e].maxOrder=Math.max(x[e].maxOrder,S[e].maxOrder),x[e].isMinOrderOk=x[e].isMinOrderOk||S[e].isMinOrderOk,x[e].isMaxOrderOk=x[e].isMaxOrderOk||S[e].isMaxOrderOk):x[e]={id:S[e].id,dataNode:S[e].dataNode,qText:S[e].qText,innerValues:S[e].innerValues,minOrder:S[e].minOrder,maxOrder:S[e].maxOrder,isMinOrderOk:S[e].isMinOrderOk,isMaxOrderOk:S[e].isMaxOrderOk},x[e].numInnerValues=(x[e].maxOrder||0)-(x[e].minOrder||0)+1)}));const E=M[0];M.forEach((t=>{var n,i,o;const a=ka({point:t,dimensionValueInfo:x,layoutService:r}),s=null==t?void 0:t.scale,l=null==E?void 0:E.scale,u=null==r||null===(n=r.meta)||void 0===n?void 0:n.isButterfly,c=null==r||null===(i=r.meta)||void 0===i?void 0:i.isStacked,d=null===(o=x[t.dimensionValue])||void 0===o?void 0:o.dataNode;let h=a;const p=l&&s&&l!==s,f=u&&1===t.measureIndex,g=c&&Array.isArray(d);if(p)h=function(e,t,n){const i=t.min(),r=t.max(),o=n.min(),a=n.max();return r===i?o:o+(e-i)/(r-i)*(a-o)}(a,m[s]||e.scale(s),m[l]||e.scale(l));else if(f)h=-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);h=e.reduce(((e,n)=>{const i=n.qNum;return"number"==typeof i&&Math.sign(i)===t?e+i:e}),0)}}t.validMeasureValue=h}));const C={scale:s,fn:({datum:t})=>{var n;const i=e.scale(s),o=t.value.dimensionValue;return v?i("string"==typeof o?""===o?void 0:+o:o):void 0!==x[o]?Go.getScaledPosition({scale:i,value:x[o].id,valueInfo:x[o],size:null===(n=e.component(u))||void 0===n?void 0:n.rect[p?"width":"height"],align:"center",invert:f,layoutService:r,isContinuous:v}):void 0}},A={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"line",data:M,settings:{connect:!0,coordinates:{major:p?C:A,minor:p?A: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:$a},stroke:({datum:e})=>{var t,n;return wa({colorModel:h,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:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:d,colorService:h,layoutService:l,dockService:u,rtl:i.rtl,majorScale:es.SCALE.MAJOR,minorScale:S,mainComponentKey:y,data:n,key:m,scales:a})),n.forEach((n=>{null!=n&&n.showPoints&&null!=n&&n.points?n.points.forEach(((n,r)=>{const o=`points-${r}-for-${m}`;p.push(za({chart:e,chartModel:t,discreteModel:d,colorService:h,themeService:c,layoutService:l,dockService:u,rtl:i.rtl,majorScale:es.SCALE.MAJOR,minorScale:n.scale,mainComponentKey:y,data:[n],key:o})),x.push({key:o,lines:!0,labels:!0,duplicates:!0})})):null!=n&&n.points&&x.push({key:m,lines:!0,labels:!1,duplicates:!0,points:n.points})}))}})),p.push(function({layoutService:e,dockService:t,chartModel:n,themeService:i,configs:r,flags:o,cache:a}){const s=e.getLayoutValue("plugins"),{rtl:l}=t.config,{orientation:u}=t.meta.major,{isOneDimensional:c,isStacked:d}=e.meta,m=i.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:Ra(o),settings:{all:!0,cache:a,configs:r,label:e=>{var t,n,i,r;return null!==(t=e.value)&&void 0!==t&&null!==(t=t.label)&&void 0!==t&&t.value?null===(r=e.value)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.value:d?null===(n=e.point)||void 0===n?void 0:n.label:null===(i=e.end)||void 0===i?void 0:i.label},lineId:({data:e})=>{var t,n,i;for(let n=0;n<s.length;n++){const i=s[n];switch(i.type){case"point":if(i.cId===(null===(t=e.value)||void 0===t?void 0:t.cId))return i.cId;break;case"line":if(i.points.some((t=>{var n;return t.cId===(null===(n=e.value)||void 0===n?void 0:n.cId)})))return i.cId}}return(null===(n=e.value)||void 0===n?void 0:n.cId)||(null===(i=e.line)||void 0===i?void 0:i.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=>{var t;return null===(t=e.value)||void 0===t?void 0:t.validMeasureValue},rtl:l},style:m.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:Ma.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ma.labels.compensateForLayoutChanges}}}({layoutService:l,dockService:u,chartModel:t,themeService:c,configs:x,flags:r.flags,cache:o})),p}function Mm({picasso:e,chart:t,models:n,environment:i,flags:r,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:u,pluginService:c}=n,d=n.layoutService.getLayout(),{options:m}=i,h=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}),p=(f={logicalSize:h,minCenterRatio:0},{layoutModes:se.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:i,viewState:r,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:i}=e,{themeService:r,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=r.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:a.alignment},settings:{isRTL:"rtl"===i.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return d.getHasSuppressingDisclaimer()?[m]:[...Qu({models:t}),...Al({models:t,flags:i}),...Xu({chart:e,models:t,environment:n,flags:i,viewState:r,viewCache:o}),hc({models:t,environment:n}),...Rl({models:t,environment:n,flags:i}),...ic({models:t,environment:n,actions:a,viewCache:o,flags:i}),Co({viewState:r,viewCache:o,layoutService:l,dockService:u}),...uc({models:t}),...cc({chart:e,models:t,environment:n}),rc({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),dc(t),...lc({chart:e,models:t,viewState:r,viewCache:o,environment:n}),...c.getComponents(),m].filter(Boolean)}({chart:t,models:n,environment:i,flags:r,viewState:o,viewCache:a,actions:s}),v=function({actions:e,chart:t,models:n,isUnsupportedFeature:i}){const{layoutService:r}=n,o=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=pm({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=vm({actions:e,chart:t,models:n,isUnsupportedFeature:i}),l=ym({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:r},S=function({picasso:e,models:t,viewState:n,viewCache:i,environment:r}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Ml({picasso:e,models:t,viewState:n,viewCache:i,environment:r}),[es.SCALE.MINOR.PRIMARY]:xl({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:r}),[es.SCALE.MINOR.SECONDARY]:xl({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:r}),[es.SCALE.MINOR.REDUCED_PRIMARY]:bl({layoutService:o,tickModel:s,dockService:c,environment:r}),[es.SCALE.MINOR.REDUCED_SECONDARY]:bl({layoutService:o,tickModel:l,dockService:c,environment:r}),...u.custom.wrappedScales()}}({picasso:e,models:n,viewState:o,viewCache:a,environment:i}),M=r.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?Sm({chart:t,chartModel:{query:{animationsEnabled:n.animationsModel.enabled}},colorService:u,context:{},resources:y,viewCache:a,scales:S,models:n}):[],x=c.extendComponents([...g,...v.components,...M]);return{collections:dl({models:n}),scales:S,components:x,formatters:pc({models:n}),interactions:rm({chart:t,models:n,environment:i,viewState:o,viewCache:a,actions:s,selectables:v}),strategy:p,palettes:u.getPalettes()}}const xm=({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})=>{const{width:d,height:m}=r(),[,h]=o((async()=>{if(!(null!=t&&t.update&&n&&i&&s))return;const{colorService:r,discreteModel:o,dockService:h,layoutService:p,refLineModel:f,animationsModel:g,styleModel:v}=n;function y(){t.update({settings:Mm({picasso:e,chart:t,models:n,environment:i,flags:a,viewState:s,viewCache:l,actions:u,isUnsupportedFeature:c})})}h.update({width:d,height:m}),r.custom.updateLegend(v),f.update({picasso:e,chart:t,models:n,environment:i,viewState:s,viewCache:l,actions:u});const S=p.getDataPages();g.meta.isSizeChanging=!0,p.setDataPages([]),y(),p.setDataPages(S),p.meta.isContinuous||await o.command.initialize(),y()}),[d,m]);if(h)throw h},bm=[es.COMPONENT.AXIS_TITLE.MAJOR,es.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,es.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,es.COMPONENT.GRID_LINE,es.COMPONENT.ZERO_LINE],Em=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:es.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Cm=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:i}})=>e.meta.isContinuous?[{type:"q",key:es.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:i.qLocaleInfo}}]:[];const Am={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Nm(e){return Am[e]||e}function Om(e){return function(t,n,i){let r,o,a,s,l=[],u=!0;function c(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&(r.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=Nm(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(i),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))})),r.gestures.forEach((t=>{const n=Nm(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,r=e,o={chart:t,mediator:n,settings:r},r.gestures=r.gestures||[],void 0===r.enable&&(r.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,r=null}}}}function Tm(e,t,n,i){const r=function(t){const n=String(t);return e(n)};return r.ticks=()=>t.map((t=>{const o=r([t.data.value,i?n-1:0]),a=r([t.data.value,i?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),r.bandwidth=()=>e.bandwidth(),r.data=()=>e.data(),r.domain=()=>e.domain(),r.pxScale=function(i){const r=e.pxScale(i);return r===e?this:Tm(r,t,n)},r}function Lm(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},i={}){const r=t(e,n,i),o=r.domain(),a=r.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),r.domain(s),Tm(r,a,l,e.invert)}))}const Im={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:i,rendHeight:r,flipXY:o,symbol:a}){let s="x",l="y",u=i,c=r,d=t<.5?90:-90;return o&&(s="y",l="x",u=r,c=i,d=t<.5?180:0),a(re({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function Rm({i:e,width:t,height:n,resolved:i,keys:r,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==i.major.settings.binStart?(l=i.major.items[e].binStart,u=i.major.items[e].binEnd,s=i.major.settings.binStart.scale):(s=i.major.settings.major.scale,l=s?i.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=re({},{major:l,majorEnd:u},i.minor.items[e]);r.forEach((t=>{d[t]=i[t].items[e]}));const m=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:i,maxMajorWidth:r}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(i))?r:i/r);return a=Number.isNaN(Number(n))?a:Math.max(n/r,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),p=(c-h)/2,f=p+d.major+h/2;return{item:d,boxCenter:f,boxWidth:h,boxPadding:p,rendWidth:t,rendHeight:n}}function wm({keys:e,data:t,defaultSettings:n,style:i,settings:r,width:o,height:a,resolver:s}){const l=re(!0,{},n||{},i||{}),u={major:"horizontal"===r.orientation?a:o,minor:"horizontal"===r.orientation?o:a},c=r.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:re(!0,{},{binStart:{scale:r.major.scale,ref:r.major.ref.start},binEnd:{scale:r.major.scale,ref:r.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:re(!0,{},{binStart:{scale:r.major.scale,ref:"binStart"},binEnd:{scale:r.major.scale,ref:"binEnd"}},r.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:r.major}});const m=r.minor||{};let h;const p={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:re(!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,i=e.length;n<i;n++)h=e[n],p[h]=s.resolve({data:t,defaults:l[h],settings:r[h],scaled:u});return p}const km=["oob"];const qm={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,i="horizontal"===this.settings.settings.orientation,{data:r,style:o,resolver:a,symbol:s}=this,l=wm({keys:km,data:r,defaultSettings:{oob:Im.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:i,keys:r,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Rm}){const l=[],{items:u}=i.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:h,rendHeight:p}=s({i:c,width:e,height:t,resolved:i,keys:r,flipXY:n,calcKey:"oob"}),f=u[c].data,g=[];if(d.oob.show){g.push(Im.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:h,rendHeight:p,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:i,resolved:l,keys:km,symbol:s,dockValue:n});return d}},Dm={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Pm=["hat"];function zm(e,t=!0){let n="";for(let t=0;t<e.length;t++){const i=e[t];n+=0===t?`M${i.x} ${i.y}`:`L${i.x} ${i.y}`,n+=" "}return t&&(n+="Z"),n}function $m({item:e,boxWidth:t,boxPadding:n,rendWidth:i,rendHeight:r,flipXY:o}){let a="x",s="y",l=i,u=r,c=e.hat.alignment||0;o&&(a="y",s="x",l=r,u=i,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 h=re({},e.hat,{type:"path",d:zm(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[h,re({},e.hat,{type:"path",d:zm(m)})]}const _m={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:i,style:r,resolver:o}=this,a=wm({keys:Pm,data:i,defaultSettings:Dm,style:r,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,u=function({width:e,height:t,flipXY:n,resolved:i,keys:r,_calcItemRenderingOpts:o=Rm}){const a=[],{items:s}=i.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h}=o({i:l,width:e,height:t,resolved:i,keys:r,flipXY:n,calcKey:"hat"}),p=s[l].data,f=[];u.hat.show&&f.push(...$m({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h,flipXY:n}));const g={type:"container",data:p,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Pm});return u}};var Fm={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var Bm={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:i,markerOffset:r,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 h=s.map((e=>e.ref)),p=l.map((e=>e.ref)),f=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:i=[],secondaryItems:r=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];return[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?i:r;s.push((({type:e,extremum:t,separateStacking:n,items:i})=>{const r="max"===e?e=>e>t:e=>e<t,o=n?e=>r(e.point.value<0?e.start.value:e.end.value):e=>r(e.end.value);return i.filter(o)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:i}=e.major;t[i]||(t[i]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>h.includes(e.end.source.field))),secondaryItems:e.filter((e=>p.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}}),S=("max"===t?90:-90)-(g?0:90)-(!g&&i?180:0),M=o/2*r,{fill:x}=this.settings.style,b=y.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:i,x:r,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:i,width:.7,x:r,y:o,data:a})}({symbol:this.symbol,size:o,fill:x,startAngle:S,x:g?v*e.major:M,y:g?M:v*e.major,data:e.data})));return b}};function jm({x:e,y:t,size:n,stroke:i,strokeWidth:r,fill:o}){return{type:"container",children:[{type:"line",stroke:i||o,strokeWidth:r,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 Vm({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},i=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>i.some((t=>t===e.key)))).reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const i=t?n.primary:n.secondary;if(!i.map[e]){const[t]=i.paths.filter((t=>t.data&&t.data.typeIndex.value===e));i.map[e]=t}return i.map[e]}}}function Hm({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function Um({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const i=t&&t.scale(es.SCALE.MAJOR),r=i&&i.max&&i.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===r?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function Ym({brush:e,selectionInfo:t,items:n,selectionValues:i,colorByData:r,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:i[d]].filter(Boolean);if(r&&l&&m.push((e=>e.color.value)),!r&&c&&(m=[e=>e.color.value]),!m.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?Hm:Um)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce(((e,t,n)=>(m.some((e=>h({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function Wm({chart:e,selected:t,connection:n,gradient:i,fallback:r}){const o=e.scale(es.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)))||r,offset:Math.min(1,Math.max(0,(e-s)/c))}))),m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:f}}function Xm({chart:e,selected:t,connection:n,gradient:i,fallback:r}){const o=e.scale(es.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)||r;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const i=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(i-s)/u))})}const m=d.map((e=>e.offset)),h=m.lastIndexOf(0),p=m.indexOf(1),f=d.slice(-1===h?0:h,-1===p?d.length:p+1);return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:f}}function Km({property:e,chart:t,connection:n,attrs:i,colorSettings:r,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const m=i[e];if("gradient"!==m.type)return m;const{type:h,nil:p}=r;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:i,fallback:r,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(es.SCALE.MAJOR),d=e.scale(es.SCALE.COLOR),m=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),h=t.filter((e=>-1!==n.indexOf(e.index))),p=("vertical"===o&&u?h.reverse():h).map((e=>e.item)),f=p.map((e=>m(e.major.value))),g=Math.min(...f),v=Math.max(...f)-g,y=0===v?1:v,S=f.map(((e,t)=>0===t?0:t===f.length-1?1:(e-g)/y)),M=[];for(let e=0;e<p.length;e++){const t=p[e],n=a?t.color.value:d(t.color.value)||r,i=S[e];M.push({color:n,offset:0===e?0:Math.max(0,M[M.length-1].offset)}),M.push({color:n,offset:e===p.length-1?1:Math.max(0,parseFloat((i+(S[e+1]-i)/2).toFixed(5)))})}return{type:"gradient",x1:i.x1,x2:i.x2,y1:i.y1,y2:i.y2,stops:M}}({chart:t,selected:a,connection:n,gradient:m,fallback:p,orientation:c,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===h?Wm:Xm)({chart:t,selected:a,connection:n,gradient:m,fallback:p})}function Gm({chart:e,pathModel:t,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:m,count:h}){const p=t.getLine(l,u),{attrs:f}=p,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},i=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=i,[,n.y]=i):"C"===t&&([,,,,n.x]=i,[,,,,,n.y]=i),n}))}({d:f.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:r,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:Km({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:i,groupedByMeasure:r,itemsPerGroup:o,orientation:a,rtl:d})}}({chart:e,colorSettings:n,colorByData:i,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:g,attrs:f,rtl:m,count:h})))}function Jm({chart:e,pathModel:t,seriesInfo:n,brush:i,selectionInfo:r,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,rtl:h}){const p=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:i,minorRangePrimary:r}=t;return!i||(r?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:r,seriesInfo:n}),f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,i)=>{const r=n.typeIndex.value;var o;return e[r]||(e[r]={key:r,items:[],index:i,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===r))}),e[r].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:p,seriesInfo:n}),{lines:g}=f.reduce(((n,o)=>{const p=Ym({brush:i,selectionInfo:r,items:o.items,selectionValues:a,colorByData:l,chart:e});if(p.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:p});return f.length?(n.lines.push(...Gm({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:p,connections:f,rtl:h,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 Zm={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:Vm({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=Jm({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=Vm({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Jm({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 Qm=()=>{const e=B();return e.use(j),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Om(e))};e.interaction("hammer",Om(Hammer))}(F)),e.use(Lm),e.renderer("react-qcm",V),e.component("axis-title",H),e.component("disclaimer",U),e.component("scrollbar",ul),e.component("point-label",T),e.component("label-space",Fm),e.component("time-axis",Qd.picassoComponents.timeAxis),e.component("axis-overlay",Qd.picassoComponents.axisOverlay),e.component("reference-line-labels",va),e.component("box-sliced-hat",_m),e.component("box-out-of-bounds",qm),e.component("data-out-of-bounds-marker",Bm),e.component("scroll-hint",Eo),e.component("brush-highlighter",Zm),e.scale("time",Qd.picassoScales.time),e.symbol("line-point",jm),e},eh=e=>"[object Object]"===Object.prototype.toString.call(e),th=e=>Array.isArray(e);function nh(e,t){if(e===t)return!0;if(th(e)){if(!th(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!nh(e[n],t[n]))return!1;return!0}if(eh(e)){if(!eh(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i<n.length;i++){if(!Object.hasOwn(t,n[i]))return!1;if(!nh(e[n[i]],t[n[i]]))return!1}return!0}return e===t}function ih({enable:e=!0}={}){const t=a(),r=()=>Date.now().toString()+Math.random(),[o,s]=n(r()),l={properties:void 0};return i((()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then((e=>{const t=re(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){var n,i,r,o;const a={properties:!1,exclude:!1};if(e===t)return a;const s=re(!0,{},e),l=re(!0,{},t);return a.exclude=!nh(null===(n=s.qHyperCubeDef)||void 0===n?void 0:n.qLayoutExclude,null===(i=l.qHyperCubeDef)||void 0===i?void 0:i.qLayoutExclude),null===(r=s.qHyperCubeDef)||void 0===r||delete r.qLayoutExclude,null===(o=l.qHyperCubeDef)||void 0===o||delete o.qLayoutExclude,a.properties=!nh(s,l),a}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(r())}))};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}}),[e]),o}const rh={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},oh=e=>void 0===e.marker?rh.circle:rh[e.marker],ah=e=>void 0===e.markerFill||e.markerFill;function sh({series:e,layoutService:t}){switch(mc(e)){case ts.TYPE.MARKER:return(e=>({marker:oh(e),fill:ah(e)}))(e);case ts.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case ts.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function lh(e=ts.NOPE_SERIES,t=!0){return t?e.axis===ts.AXIS.PRIMARY:e.axis===ts.AXIS.PRIMARY||mc(e)===ts.TYPE.BAR}var uh={exports:{}};var ch={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 dh="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var mh=dh;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:r}=ch,o=mh,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-]",h=[["\\s",1],["\\d",r],[m,i]],p=(e,t,n)=>{const i=(e=>{for(const[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),r=d++;o(e,r,t),c[e]=r,l[r]=t,u[r]=i,a[r]=new RegExp(t,n?"g":void 0),s[r]=new RegExp(i,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${m}*`),p("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${m}+`),p("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),p("FULL",`^${l[c.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),p("LOOSE",`^${l[c.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),p("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?`+`(?:${l[c.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",l[c.COERCE],!0),p("COERCERTLFULL",l[c.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(uh,uh.exports);var hh=uh.exports;const ph=Object.freeze({loose:!0}),fh=Object.freeze({});var gh=e=>e?"object"!=typeof e?ph:e:fh;const vh=/^[0-9]+$/,yh=(e,t)=>{const n=vh.test(e),i=vh.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1};var Sh={compareIdentifiers:yh,rcompareIdentifiers:(e,t)=>yh(t,e)};const Mh=mh,{MAX_LENGTH:xh,MAX_SAFE_INTEGER:bh}=ch,{safeRe:Eh,t:Ch}=hh,Ah=gh,{compareIdentifiers:Nh}=Sh;var Oh=class e{constructor(t,n){if(n=Ah(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>xh)throw new TypeError(`version is longer than ${xh} characters`);Mh("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const i=t.trim().match(n.loose?Eh[Ch.LOOSE]:Eh[Ch.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>bh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>bh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>bh||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<bh)return t}return e})):this.prerelease=[],this.build=i[5]?i[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(Mh("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)),Nh(this.major,t.major)||Nh(this.minor,t.minor)||Nh(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],i=t.prerelease[n];if(Mh("prerelease compare",n,e,i),void 0===e&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===e)return-1;if(e!==i)return Nh(e,i)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],i=t.build[n];if(Mh("build compare",n,e,i),void 0===e&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===e)return-1;if(e!==i)return Nh(e,i)}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?Eh[Ch.PRERELEASELOOSE]:Eh[Ch.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 i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===n&&(i=[t]),0===Nh(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const Th=Oh;var Lh=(e,t,n=!1)=>{if(e instanceof Th)return e;try{return new Th(e,t)}catch(e){if(!n)return null;throw e}};const Ih=Lh;var Rh=(e,t)=>{const n=Ih(e,t);return n?n.version:null};const wh=Lh;var kh=(e,t)=>{const n=wh(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const qh=Oh;var Dh=(e,t,n,i,r)=>{"string"==typeof n&&(r=i,i=n,n=void 0);try{return new qh(e instanceof qh?e.version:e,n).inc(t,i,r).version}catch(e){return null}};const Ph=Lh;var zh=(e,t)=>{const n=Ph(e,null,!0),i=Ph(t,null,!0),r=n.compare(i);if(0===r)return null;const o=r>0,a=o?n:i,s=o?i: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!==i.major?u+"major":n.minor!==i.minor?u+"minor":n.patch!==i.patch?u+"patch":"prerelease"};const $h=Oh;var _h=(e,t)=>new $h(e,t).major;const Fh=Oh;var Bh=(e,t)=>new Fh(e,t).minor;const jh=Oh;var Vh=(e,t)=>new jh(e,t).patch;const Hh=Lh;var Uh=(e,t)=>{const n=Hh(e,t);return n&&n.prerelease.length?n.prerelease:null};const Yh=Oh;var Wh=(e,t,n)=>new Yh(e,n).compare(new Yh(t,n));const Xh=Wh;var Kh=(e,t,n)=>Xh(t,e,n);const Gh=Wh;var Jh=(e,t)=>Gh(e,t,!0);const Zh=Oh;var Qh=(e,t,n)=>{const i=new Zh(e,n),r=new Zh(t,n);return i.compare(r)||i.compareBuild(r)};const ep=Qh;var tp=(e,t)=>e.sort(((e,n)=>ep(e,n,t)));const np=Qh;var ip=(e,t)=>e.sort(((e,n)=>np(n,e,t)));const rp=Wh;var op=(e,t,n)=>rp(e,t,n)>0;const ap=Wh;var sp=(e,t,n)=>ap(e,t,n)<0;const lp=Wh;var up=(e,t,n)=>0===lp(e,t,n);const cp=Wh;var dp=(e,t,n)=>0!==cp(e,t,n);const mp=Wh;var hp=(e,t,n)=>mp(e,t,n)>=0;const pp=Wh;var fp=(e,t,n)=>pp(e,t,n)<=0;const gp=up,vp=dp,yp=op,Sp=hp,Mp=sp,xp=fp;var bp=(e,t,n,i)=>{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 gp(e,n,i);case"!=":return vp(e,n,i);case">":return yp(e,n,i);case">=":return Sp(e,n,i);case"<":return Mp(e,n,i);case"<=":return xp(e,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};const Ep=Oh,Cp=Lh,{safeRe:Ap,t:Np}=hh;var Op,Tp,Lp,Ip,Rp,wp,kp=(e,t)=>{if(e instanceof Ep)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const i=t.includePrerelease?Ap[Np.COERCERTLFULL]:Ap[Np.COERCERTL];let r;for(;(r=i.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),i.lastIndex=r.index+r[1].length+r[2].length;i.lastIndex=-1}else n=e.match(t.includePrerelease?Ap[Np.COERCEFULL]:Ap[Np.COERCE]);if(null===n)return null;const i=n[2],r=n[3]||"0",o=n[4]||"0",a=t.includePrerelease&&n[5]?`-${n[5]}`:"",s=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Cp(`${i}.${r}.${o}${a}${s}`,t)};function qp(){if(Ip)return Lp;Ip=1;const e=/\s+/g;class t{constructor(n,o){if(o=i(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof r)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=>!p(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&&h))+":"+e,i=n.get(t);if(i)return i;const a=this.options.loose,f=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(f,O(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],u),o("comparator trim",e),e=e.replace(s[l.TILDETRIM],c),o("tilde trim",e),e=e.replace(s[l.CARETTRIM],d),o("caret trim",e);let g=e.split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>N(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 y=new Map,S=g.map((e=>new r(e,this.options)));for(const e of S){if(p(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const M=[...y.values()];return n.set(t,M),M}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(T(this.set[t],e,this.options))return!0;return!1}}Lp=t;const n=new(Tp?Op:(Tp=1,Op=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}})),i=gh,r=Dp(),o=mh,a=Oh,{safeRe:s,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:d}=hh,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:h}=ch,p=e=>"<0.0.0-0"===e.value,f=e=>""===e.value,g=(e,t)=>{let n=!0;const i=e.slice();let r=i.pop();for(;n&&i.length;)n=i.every((e=>r.intersects(e,t))),r=i.pop();return n},v=(e,t)=>(o("comp",e,t),e=x(e,t),o("caret",e),e=S(e,t),o("tildes",e),e=E(e,t),o("xrange",e),e=A(e,t),o("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,S=(e,t)=>e.trim().split(/\s+/).map((e=>M(e,t))).join(" "),M=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,i,r,a)=>{let s;return o("tilde",e,t,n,i,r,a),y(n)?s="":y(i)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(r)?s=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${i}.${r}-${a} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${r} <${n}.${+i+1}.0-0`,o("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,((t,n,r,a,s)=>{let l;return o("caret",e,t,n,r,a,s),y(n)?l="":y(r)?l=`>=${n}.0.0${i} <${+n+1}.0.0-0`:y(a)?l="0"===n?`>=${n}.${r}.0${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.0${i} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===r?`>=${n}.${r}.${a}-${s} <${n}.${r}.${+a+1}-0`:`>=${n}.${r}.${a}-${s} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===r?`>=${n}.${r}.${a}${i} <${n}.${r}.${+a+1}-0`:`>=${n}.${r}.${a}${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},E=(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,i,r,a,s,l)=>{o("xRange",e,n,i,r,a,s,l);const u=y(r),c=u||y(a),d=c||y(s),m=d;return"="===i&&m&&(i=""),l=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&m?(c&&(a=0),s=0,">"===i?(i=">=",c?(r=+r+1,a=0,s=0):(a=+a+1,s=0)):"<="===i&&(i="<",c?r=+r+1:a=+a+1),"<"===i&&(l="-0"),n=`${i+r}.${a}.${s}${l}`):c?n=`>=${r}.0.0${l} <${+r+1}.0.0-0`:d&&(n=`>=${r}.${a}.0${l} <${r}.${+a+1}.0-0`),o("xRange return",n),n}))},A=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),N=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),O=e=>(t,n,i,r,o,a,s,l,u,c,d,m)=>`${n=y(i)?"":y(r)?`>=${i}.0.0${e?"-0":""}`:y(o)?`>=${i}.${r}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=y(u)?"":y(c)?`<${+u+1}.0.0-0`:y(d)?`<${u}.${+c+1}.0-0`:m?`<=${u}.${c}.${d}-${m}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),T=(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!==r.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0};return Lp}function Dp(){if(wp)return Rp;wp=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(i,r){if(r=n(r),i instanceof t){if(i.loose===!!r.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),a("comparator",i,r),this.options=r,this.loose=!!r.loose,this.parse(i),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?i[r.COMPARATORLOOSE]:i[r.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,i){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,i).test(this.value):""===e.operator?""===e.value||new l(this.value,i).test(e.semver):(!(i=n(i)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!i.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,i)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,i)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}Rp=t;const n=gh,{safeRe:i,t:r}=hh,o=bp,a=mh,s=Oh,l=qp();return Rp}const Pp=qp();var zp=(e,t,n)=>{try{t=new Pp(t,n)}catch(e){return!1}return t.test(e)};const $p=qp();var _p=(e,t)=>new $p(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const Fp=Oh,Bp=qp();var jp=(e,t,n)=>{let i=null,r=null,o=null;try{o=new Bp(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(i&&-1!==r.compare(e)||(i=e,r=new Fp(i,n)))})),i};const Vp=Oh,Hp=qp();var Up=(e,t,n)=>{let i=null,r=null,o=null;try{o=new Hp(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(i&&1!==r.compare(e)||(i=e,r=new Vp(i,n)))})),i};const Yp=Oh,Wp=qp(),Xp=op;var Kp=(e,t)=>{e=new Wp(e,t);let n=new Yp("0.0.0");if(e.test(n))return n;if(n=new Yp("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let r=null;i.forEach((e=>{const t=new Yp(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!Xp(t,r)||(r=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!r||n&&!Xp(n,r)||(n=r)}return n&&e.test(n)?n:null};const Gp=qp();var Jp=(e,t)=>{try{return new Gp(e,t).range||"*"}catch(e){return null}};const Zp=Oh,Qp=Dp(),{ANY:ef}=Qp,tf=qp(),nf=zp,rf=op,of=sp,af=fp,sf=hp;var lf=(e,t,n,i)=>{let r,o,a,s,l;switch(e=new Zp(e,i),t=new tf(t,i),n){case">":r=rf,o=af,a=of,s=">",l=">=";break;case"<":r=of,o=sf,a=rf,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(nf(e,t,i))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===ef&&(e=new Qp(">=0.0.0")),c=c||e,d=d||e,r(e.semver,c.semver,i)?c=e:a(e.semver,d.semver,i)&&(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 uf=lf;var cf=(e,t,n)=>uf(e,t,">",n);const df=lf;var mf=(e,t,n)=>df(e,t,"<",n);const hf=qp();var pf=(e,t,n)=>(e=new hf(e,n),t=new hf(t,n),e.intersects(t,n));const ff=zp,gf=Wh;const vf=qp(),yf=Dp(),{ANY:Sf}=yf,Mf=zp,xf=Wh,bf=[new yf(">=0.0.0-0")],Ef=[new yf(">=0.0.0")],Cf=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===Sf){if(1===t.length&&t[0].semver===Sf)return!0;e=n.includePrerelease?bf:Ef}if(1===t.length&&t[0].semver===Sf){if(n.includePrerelease)return!0;t=Ef}const i=new Set;let r,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?r=Af(r,t,n):"<"===t.operator||"<="===t.operator?o=Nf(o,t,n):i.add(t.semver);if(i.size>1)return null;if(r&&o){if(a=xf(r.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==r.operator||"<="!==o.operator))return null}for(const e of i){if(r&&!Mf(e,String(r),n))return null;if(o&&!Mf(e,String(o),n))return null;for(const i of t)if(!Mf(e,String(i),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!r||n.includePrerelease||!r.semver.prerelease.length)&&r.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,r)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=Af(r,e,n),s===e&&s!==r)return!1}else if(">="===r.operator&&!Mf(r.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=Nf(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!Mf(o.semver,String(e),n))return!1;if(!e.operator&&(o||r)&&0!==a)return!1}return!(r&&u&&!o&&0!==a)&&(!(o&&c&&!r&&0!==a)&&(!m&&!d))},Af=(e,t,n)=>{if(!e)return t;const i=xf(e.semver,t.semver,n);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},Nf=(e,t,n)=>{if(!e)return t;const i=xf(e.semver,t.semver,n);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};var Of=(e,t,n={})=>{if(e===t)return!0;e=new vf(e,n),t=new vf(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=Cf(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0};const Tf=hh,Lf=ch,If=Oh,Rf=Sh,wf=(e,t,n)=>{const i=[];let r=null,o=null;const a=e.sort(((e,t)=>gf(e,t,n)));for(const e of a){ff(e,t,n)?(o=e,r||(r=e)):(o&&i.push([r,o]),o=null,r=null)}r&&i.push([r,null]);const s=[];for(const[e,t]of i)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 kf=X({parse:Lh,valid:Rh,clean:kh,inc:Dh,diff:zh,major:_h,minor:Bh,patch:Vh,prerelease:Uh,compare:Wh,rcompare:Kh,compareLoose:Jh,compareBuild:Qh,sort:tp,rsort:ip,gt:op,lt:sp,eq:up,neq:dp,gte:hp,lte:fp,cmp:bp,coerce:kp,Comparator:Dp(),Range:qp(),satisfies:zp,toComparators:_p,maxSatisfying:jp,minSatisfying:Up,minVersion:Kp,validRange:Jp,outside:lf,gtr:cf,ltr:mf,intersects:pf,simplifyRange:wf,subset:Of,SemVer:If,re:Tf.re,src:Tf.src,tokens:Tf.t,SEMVER_SPEC_VERSION:Lf.SEMVER_SPEC_VERSION,RELEASE_TYPES:Lf.RELEASE_TYPES,compareIdentifiers:Rf.compareIdentifiers,rcompareIdentifiers:Rf.rcompareIdentifiers}),qf={BAR_IN_SECONDARY_AXIS:"0.23.1"};const Df=e=>!e||kf.lt(kf.coerce(e),kf.coerce(qf.BAR_IN_SECONDARY_AXIS)),Pf=({layoutService:e})=>{const t=!Df(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[ts.TYPE.BAR]:0,[ts.TYPE.LINE]:0,[ts.TYPE.MARKER]:0};return({series:i=ts.NOPE_SERIES},r)=>{const o=lh(i,t),a=mc(i);return{id:r,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${r}`,refIndex:r,isPrimary:o,scale:o?es.SCALE.MINOR.PRIMARY:es.SCALE.MINOR.SECONDARY,collection:o?es.COLLECTION.PRIMARY:es.COLLECTION.SECONDARY,options:sh({series:i,layoutService:e})}}})(e,t)),i=(e,t)=>e.filter((e=>mc(e)===t)).length,r=n.filter((e=>e.isPrimary)),o=n.filter((e=>!e.isPrimary)),a=[!!r.length&&r[0],!!o.length&&o[0]].filter((e=>!!e)),s=i(n,ts.TYPE.BAR),l=i(r,ts.TYPE.BAR),u=i(o,ts.TYPE.BAR),c=e=>n.filter((t=>mc(t)===e)),d=c(ts.TYPE.LINE).map((e=>$l(es.COMPONENT.POINT,e))),m=c(ts.TYPE.MARKER).map((e=>({key:$l(es.COMPONENT.MARKER,e),type:e.options.marker}))),h=m.map((e=>e.key)),p=[];l>0&&p.push(`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`),u>0&&p.push(`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`);const f=[...p,...d,...h],{MINI_CHART:g}=es.COMPONENT,v=c(ts.TYPE.LINE).map((e=>$l(g.LINE,e))),y=c(ts.TYPE.MARKER).map((e=>$l(g.MARKER,e))),S=e.meta.isContinuous?[`${g.BAR}-${ts.AXIS.PRIMARY}`,`${g.BAR}-${ts.AXIS.SECONDARY}`,...v,...y]:[];return{meta:{allSeries:n,primarySeries:r,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:u,measureAxes:a,pointComponentKeys:d,markerComponentKeys:h,barComponentKeys:p,seriesComponentKeys:f,miniComponentKeys:S,markers:m},query:{all:()=>n,seriesByAxis:e=>e?r:o,series:c,isPrimary:lh}}};function zf({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 $f({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(Se).then((e=>{var n;const i=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),o="K"===i&&r.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:r.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:zf({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function _f({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:i}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):i?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):$f({genericObjectModel:e,layoutService:t})}const Ff=e=>"number"==typeof e&&!Number.isNaN(e);function Bf({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const i=t.getHyperCubeValue("qMeasureInfo"),r=n.query.seriesByAxis(e).map((e=>i[e.refIndex])),o=r.filter((e=>mc(e.series)===ts.TYPE.BAR)),a=r.filter((e=>mc(e.series)===ts.TYPE.LINE)),s=r.filter((e=>mc(e.series)===ts.TYPE.MARKER));return{min:Math.min(...r.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...r.filter((e=>Ff(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>Ff(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>Ff(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>Ff(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>Ff(e.qMax))).map((e=>e.qMax)))}}}}function jf({isPrimary:e,layoutService:t,seriesModel:n}){const i=Bf({isPrimary:e,layoutService:t,seriesModel:n}),r=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const i=e.query.series(ts.TYPE.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:r}=n,o={min:NaN,max:NaN};return r.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>i.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=i({dataPage:e});return t.bar=r({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 Vf({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:i,seriesModel:r}){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:i}=t.meta,r=n.query.series(ts.TYPE.BAR).filter((t=>t.isPrimary===e)).length;return!i||r<2?Bf({isPrimary:e,layoutService:t,seriesModel:n}):jf({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:r});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:i}=t,r=i("measureAxes."+(e?0:1),{});if(r.autoMinMax)return n;const{minMax:o,min:a,max:s}=r;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:i}=t.meta;if(i){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:i}).then((({dataPage:t})=>{const{min:n,max:i,bar:s,line:l,marker:u}=a({dataPage:t}),c=r.query.seriesByAxis(e).some((e=>mc(e)===ts.TYPE.BAR)),d=Number((c?Math.min(n,0):n).toFixed(13)),m=Number((c?Math.max(i,0):i).toFixed(13)),h=Number((c?Math.min(s.min,0):s.min).toFixed(13)),p=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(h)?h:0,o.implicit.bar.max=Number.isFinite(p)?p: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 Hf({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 Uf({min:e,max:t,count:n,threshold:i,disable:r}){const o=function(e,t,n){const i=ui().domain([e,t]);return i.nice(n),i}(e,t,n),a={start:!0,stop:!0};if(!a.start||!a.stop){const[e,t]=o.domain(),i=o.ticks(n),r=i.length>=4?i[1]-i[0]:.1*e,s=i.length>=4?i[i.length-1]-i[i.length-2]:.1*t;o.domain([a.start?e:e-r,a.stop?t:t+s]),o.nice(n)}return o}const Yf=50,Wf=100,Xf=200,Kf=125;function Gf({config:{measureAxesRef:e},layoutService:t,size:n}){const i=(e=>{switch(e){case.5:return Yf;case 1:return Wf;case 2:return Xf;default:return e*Kf}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/i))}function Jf({config:e,chart:t,layoutService:n,dockService:i,measureText:r,size:o,min:a,max:s}){const l=Gf({config:e,layoutService:n,size:o}),u=Uf({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"===i.meta.major.orientation?"height":"width",h=e=>r(e)[m],p=t.formatter(e.formatter),f=()=>{const e=d.ticks.map(p);return!e.some(((t,n)=>e.indexOf(t)!==n))&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(h))<=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 Zf({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function Qf({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function eg({config:e,chart:t,extrema:n,min:i,max:r}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=Uf({min:i,max:r,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,i=e.length-t;return e.slice(n,i).some((e=>0===e))}({ticks:s}),u=l?Zf:Qf;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);return d.some(((e,t)=>d.indexOf(e)!==t))&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function tg({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 ng({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}){if("SPARK"===i.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=Jf({config:e,chart:t,layoutService:n,dockService:i,measureText:o,size:a,min:s,max:l});return Hf({extrema:r,ticks:u.ticks})?u:eg({config:e,chart:t,extrema:r,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:i,extrema:r,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const n=[];for(let i=0;i<e.length-1;i++){const r=e[i],o=(e[i+1]-r)/(t+1);for(let e=1;e<=t;e++)n.push(r+o*e)}return n}({ticks:u,count:1});return{min:c,max:d,values:[...tg({ticks:u,extrema:r}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function ig({config:e,chart:t,layoutService:n,dockService:i,measureText:r,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 ng({config:e,chart:t,layoutService:n,dockService:i,extrema:o,measureText:r,size:a,min:s,max:l})}function rg({config:e,chart:t,layoutService:n,extremumModel:i,dockService:r,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=i.query,u=function({chart:e,config:t,dockService:n,extremumModel:i,layoutService:r,seriesModel:o,themeService:a}){const{measureText:s}=B.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var i;const r=n.component(t.meta.seriesComponentKeys[0]),o=null!==(i=null==r?void 0:r.rect)&&void 0!==i?i:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=i.query.getExtrema();return ig({config:t,chart:e,layoutService:r,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:i,dockService:r,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 og({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return ve.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 ag({layoutService:e,seriesModel:t,colorService:n}){const{type:i,mode:r,fieldType:o}=n.getSettings();if("categorical"!==i)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===r?"measure"===o?()=>({type:ts.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===ts.TYPE.LINE?2:t!==ts.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:i}=s(e);return n!==ts.TYPE.MARKER||"bar"===i.marker||i.fill?t(e.value):"none"}}}}}}function sg({layout:e,defaultAuto:t}){const n=t(e),i=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:i?"measure":n.useBaseColors}}function lg({actions:e,appLayoutModel:t,appModel:n,chart:i,environment:r,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:u}){let c;const{theme:d,translator:m}=r,h={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return c=L({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:es.SCALE.COLOR}},config:{auto:sg,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>h.wrappedScales,legendComponents:()=>h.legendComponents,legendInteractions:()=>h.legendInteractions,updateLegend:t=>{const{components:n,interactions:o,scales:s}=function({viewState:e,chart:t,layoutService:n,seriesModel:i,environment:r,colorService:o,actions:a,styleModel:s}){const{options:l}=r,u={eventName:"legend-c",key:es.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:ag({layoutService:n,seriesModel:i,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,i=m[`${es.SCALE.COLOR}Range`];return!i||"right"!==n&&"left"!==n||(i.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:i,environment:r,colorService:c,seriesModel:l,layoutService:a,actions:e,styleModel:t});h.wrappedScales=s,h.legendComponents=n,h.legendInteractions=o}}}),c}const ug="REJECTED",cg=()=>{},dg=2,mg=20,hg=200,pg=10;var fg={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)),i=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),r=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,r-e.qArea.qTop),s=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+i-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:r,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 i=n.qTop-pg<=t.qTop,r=n.qLeft+n.qWidth+pg>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+pg>=t.qTop+t.qHeight,a=n.qLeft-pg<=t.qLeft;return i&&t.qTop>0||r&&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 gg={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)),i=Math.max(t.qTop,e.qArea.qTop),r=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,i-e.qArea.qTop),a=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-i-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:i,qLeft:r},qData:[{...e.qData[0],qUp:i,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 i=n.qTop-pg<=t.qTop,r=n.qTop+n.qHeight+pg>=t.qTop+t.qHeight;return i&&t.qTop>0||r&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var vg={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 yg="pages";const Sg="discretePan";function Mg({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:Sg,pointers:1,threshold:10,enable(i,r){return this.started===Sg||!r||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:r.center.x,y:r.center.y}).some((e=>e.key===n))}},events:{[`${Sg}start`](e){e.preventDefault(),this.started=Sg;const t="horizontal"===i.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${Sg}move`](e){e.preventDefault();const t="horizontal"===i.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&r?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${Sg}end`](e){e.preventDefault(),this.started=!1},[`${Sg}cancel`](e){e.preventDefault(),this.started=!1}}}}function xg({chart:e,componentKey:t,actions:n,scroller:i}){return function(r){if(!n.scroll.enabled()||!i.enabled())return;const[o]=e.componentsFromPoint({x:r.clientX,y:r.clientY}).filter((e=>e.key===t));if(!o)return;r.preventDefault();const a=Math.abs(r.deltaY)>Math.abs(r.deltaX)?r.deltaY:r.deltaX,s=100*Math.sign(-a);i.scroll(s)}}function bg({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 i=Math.min(t,Math.max(hg,n));return{width:e,height:Math.max(mg,Math.min(n*dg,i))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:i,height:r}=t({width:e.qWidth,height:e.qHeight}),o=r?Math.ceil((r-e.qHeight)/2):0,a=i?Math.ceil((i-e.qWidth)/2):0;return{qHeight:r?Math.min(r,n.height):e.qHeight,qWidth:i?Math.min(i,n.width):e.qWidth,qTop:r?Math.max(0,Math.min(e.qTop-o,n.height-r)):e.qTop,qLeft:i?Math.max(0,Math.min(e.qLeft-a,n.width-i)):e.qLeft}}}function Eg(e){let t,n;const i=r=>{t=r;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject(ug),t=null,void(n&&(i(n),n=null));t.resolve(e[0]),t=null}))},r=e=>new Promise(((r,o)=>{const a={request:e,resolve:r,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(ug),n=e})(a):i(a)}));return r.isProcessing=()=>!!t,r.hasQueued=()=>!!n,r.cancel=()=>{r.isProcessing()&&t.cancel(),r.hasQueued()&&(n.reject(ug),n=null)},r}const Cg={command:{update:()=>{}}};function Ag({dataStore:e,composition:t,enigmaModel:n,layoutService:i,trendLineModel:r=Cg,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:u}=t,c=function({dataStore:e,slice:t,warden:n,expand:i,request:r,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const i=e.getCurrent();if(a)return Promise.resolve(t(i,l));const r=n.release(i.qArea,l),s=o.isProcessing();if(!r&&s&&o.cancel(),!r||s)return Promise.resolve(t(i,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=i(l);return o(r(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:i.meta.size.x,height:i.meta.size.y}}),expand:bg({layoutService:i}),request:u({definitionPath:o}),process:Eg(n),connectionless:i.meta.isSnapshot,processDataPage:a}),d=O(((e,{onProcessing:t,onData:n})=>{c(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==ug)throw e}))}),50);return function(e,{onProcessing:t=cg,onDataPage:n=cg}={}){d(e,{onProcessing:t,onData:e=>{i.setDataPages(e?[e]:[]),r.command.update(),n(e)}})}}var Ng={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:i}){const{pixel:r}=t,o=e.getDataPages()[0],a=r/i;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var Og={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:i}){const r=void 0===i?4:i,o=Math.max(0,Math.floor(t)-r/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+r))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const{pixel:r}=t,o=e.getDataPages()[0],a=i/n.inView,s=(r+o.qArea.qTop*a)/i;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function Tg(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function Lg(e,t){const n=[];for(let i=0;i<e.length;i++){const r=t(e[i]);-1===n.indexOf(r)&&n.push(r)}return n.length}function Ig(e){return Lg(e.qMatrix,(e=>e[0].qElemNumber))-1}var Rg={inTotal:function({layoutService:e}){const t=Tg(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:i}){const r=Tg(e),o=void 0===i?r:i,a=t/(r+1),s=Math.max(0,Math.floor((t-a-o/2)/r));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/r+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:i}){const r=Tg(e),o=e.getDataPages()[0],a=i/n.inView,{pixel:s}=t,l=Ig(o),u=o.qArea.qHeight*r+l,c=(s+(o.qArea.qTop*r+o.qArea.qTop)*a)/i;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const wg=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function kg(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return wg(e,n);const i=((e,t)=>{const n={successful:!0,count:0};let i=Math.abs(Math.floor(t));const r=[];for(let t=0;t<=i;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===r.indexOf(o)&&(r.push(o),i--)}return n.count=r.length-1,n})(t.qMatrix,n);return i.successful?i.count:wg(e,n)},area(t,n,i){if(0!==t.qArea.qTop)return wg(e,n);return Lg(t.qMatrix.slice(0,i.qTop+1),(e=>e[0].qElemNumber))-1}}}var qg={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:i}){const r=kg(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-r));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(i+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:i,viewSize:r,upperBound:o}){const a=t.getDataPages()[0],s=r/i.inView,{item:l,pixel:u}=n,c=kg(t).area(e(),l,a.qArea),d=Ig(a),m=a.qArea.qHeight+d,h=u===o?(i.inView-m)*s/r:(u+(a.qArea.qTop+c)*s)/r;return[h,i.inView>=i.inTotal?h+1:h+m/i.inView]}};function Dg({chart:e,rect:t,dockService:n,itemWidths:i,axisKey:r,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:u,maxDataRows:c}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:h}=i[n.meta.chart.mode],p="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:v}=s,y=p?t.width:t.height,S=y/l>=m;switch(f){case"max":return Math.min(l,c);case"custom":return Math.min(g,c);default:return u?y/h:S?function({chart:e,isHorizontal:t,axisKey:n,renderer:i={},isGrouped:r,itemSize:o,label:a}){if(r||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=i;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 h=(90-d)*(Math.PI/180);return m>Math.cos(h)*o}({chart:e,isHorizontal:p,axisKey:r,renderer:o,isGrouped:a,itemSize:m,label:v})?y/d:l:y/d}}function Pg({chart:e,getRect:t,getDataPages:n,layoutService:i,dockService:r,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:i}=e.meta;return t?Ng:n?i?Rg:qg:Og}({layoutService:i}),h=()=>"horizontal"===r.meta.major.orientation?t().width:t().height,p=e=>e?h()/e:0,f=(e,t)=>-(e-t)*p(t);return{getItems(){const n=i.getLayoutValue("dimensionAxis"),l=c({layoutService:i});return{inTotal:l,inView:Dg({chart:e,rect:t(),dockService:r,itemWidths:o(),axisKey:a,renderer:s,isGrouped:i.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(i.meta.dimensionCount+i.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return p(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t,r=Math.min(0,Math.max(e,f(n,i))),o=i?Math.abs(i*r/h()):0;return{start:{pixel:r,item:o},end:{item:Math.min(o+(i||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return f(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:i}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:i}){const r=e/n*t,o=Math.abs(i)/r;return[o,Math.min(1,o+e/r)]}({viewSize:h(),inTotal:n,inView:i,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:i,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=m({getDataPages:n,layoutService:i,offsets:e,items:t,viewSize:h(),upperBound:f(t.inTotal,t.inView)});return"horizontal"===r.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:i}=t;return e<=0&&e>=f(n,i)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,i=e*p(n);return Number.isFinite(i)?-i:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:i}=t;return-e*(p(i)*n)}}}}function zg({chart:e,componentKey:t,state:n,dataStore:i,pageData:r,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,renderer:c,areaBuffer:d,viewState:m,rtl:h}){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 p=Pg({chart:e,getRect:()=>n.get("rect"),getDataPages:i.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,renderer:c,areaBuffer:d,rtl:h}),f=()=>{const e=p.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const i=p.getOffsets({pixelOffset:e,items:t});return n.set("offsets",i),i},v=e=>{const t=Date.now(),i=f(),a=g({pixelOffset:e,items:i}),s=p.getArea({itemOffset:a.start.item,items:i});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((p.validate.offset({pixelOffset:e,items:i})||m.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:i})),m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:i})),m.set("scrollOffset",{start:a.start.item,end:a.end.item})));m.preventSet("viewRange",p.getViewRange({pixelOffset:a.start.pixel,items:i}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",p.getScaleRange({offsets:a.start,items:i})),m.set("scrollOffset",{start:a.start.item,end:a.end.item}))};r(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 i=e.component(t);if(!i)return Promise.resolve();n.set("rect","function"==typeof l?l():i.rect),n.set("itemWidths","function"==typeof s?s():s);const a=f();n.set("itemSize",p.getItemSize({items:a}));const u=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?p.getUpperBound({items:e}):0;if("number"==typeof n)return p.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:i,end:r}=n,a=1===t&&r?r-e.inView:i;return p.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),c=g({pixelOffset:u,items:a});m.preventSet("viewRange",p.getViewRange({pixelOffset:c.start.pixel,items:a}));const d=p.getArea({itemOffset:c.start.item,items:a});return new Promise((e=>{r(d,{onDataPage:()=>{n.set("scaleRange",p.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"),i=p.convert.relativeToPixelOffset({relativeOffset:e,items:t});v(i)}}}function $g({chart:e,actions:t,componentKey:n,enigmaModel:i,layoutService:r,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:m,renderer:h,areaBuffer:p,processDataPage:f=()=>{}}={}}){const g=A(),v=function({qMode:e}){switch(e){case"K":return gg;case"T":return vg;default:return fg}}({qMode:r.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(yg,[]),{add:t=>{const n=e.get(yg);n.length=0,n.push(t)},getCurrent:()=>e.get(yg)[0],getAll:()=>e.get(yg),contains:n=>t(e.get(yg)[0],n)}}({state:g,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const i=e.getDataPages()[0];if(!i)return;const r=n.patcher({layoutService:e});r.should(i)&&r(i),t.add(i)}({layoutService:r,dataStore:y,composition:v});const S=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:p}),M=Ag({dataStore:y,composition:v,enigmaModel:i,layoutService:r,trendLineModel:a,definitionPath:c,processDataPage:f}),x=zg({chart:e,componentKey:n,state:g,dataStore:y,pageData:M,layoutService:r,dockService:o,itemWidths:s,getRect:d,axisKey:m,renderer:h,areaBuffer:S,viewState:l,rtl:u}),E=function({layoutService:e,dataStore:t}){return function(n){const i=b(n,`${e.refs.dataPages}`);i.length=0,i.push(t.getCurrent())}}({layoutService:r,dataStore:y}),C=function({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o}){return{gestures:[Mg({chart:e,actions:t,componentKey:n,dockService:i,rtl:r,scroller:o})],native:{type:"native",events:{wheel:xg({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:x});return{interactions:C,query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>y.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>E(e)}}}var _g={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 Fg({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 Bg({layoutService:e,dockService:t,themeService:n,colorService:i,flags:r}){const{BAR:o,LINE:a,POINT:s}=Kl,l=n.getStyles(),u=Fg({layoutService:e,key:"bar"}),c=Fg({layoutService:e,key:"line"}),d=()=>{const e=u({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},m=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0,h=(e,t)=>{const n=i.getPaletteColor;if(null!=e&&e.color&&n){const i=n(e);var r;return"none"===i&&e.index>0?null!==(r=null==e?void 0:e.color)&&void 0!==r?r:t:null!=i?i:t}return 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:()=>h(u({property:"strokeColor"}),o.STROKE.COLOR),label:{getStyle:()=>{var e,t,n,i;const r=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:h(null==r?void 0:r.color,l.label.value.color),useContrastColor:null===(t=null==r?void 0:r.useContrastColor)||void 0===t||t,fontSize:null!==(n=null==r?void 0:r.fontSize)&&void 0!==n?n:12,fontFamily:null!==(i=null==r?void 0:r.fontFamily)&&void 0!==i?i: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 i=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:h(null==i?void 0:i.color,l.label.value.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:l.label.value.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:l.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{var e,t,n;const i=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:h(null==i?void 0:i.color,l.label.value.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:l.label.value.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:l.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n;const i=null===(e=m("axis"))||void 0===e||null===(e=e.axis)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:l.axis.title.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:l.axis.title.fontSize,color:h(null==i?void 0:i.color,l.axis.title.color)}}},label:{getStyle:()=>{var e,t,n;const i=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:h(null==i?void 0:i.color,l.axis.label.name.color),fontSize:null!==(t=null==i?void 0:i.fontSize)&&void 0!==t?t:l.axis.label.name.fontSize,fontFamily:null!==(n=null==i?void 0:i.fontFamily)&&void 0!==n?n:l.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n;const i=null===(e=m("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.title;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:l.legend.title.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:l.legend.title.fontSize,color:h(null==i?void 0:i.color,l.legend.title.color)}}},label:{getStyle:()=>{var e,t,n;const i=null===(e=m("legend"))||void 0===e||null===(e=e.legend)||void 0===e?void 0:e.label;return{fontFamily:null!==(t=null==i?void 0:i.fontFamily)&&void 0!==t?t:l.legend.label.fontFamily,fontSize:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:l.legend.label.fontSize,color:h(null==i?void 0:i.color,l.legend.label.color)}}}}}}}function jg({layoutService:e}){return I({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function Vg({dataset:e,data:t,valueData:n}){var i;const{source:r,label:o,value:a}=n,s=e(r.key).field(r.field);return he.shouldUseFormat(s.raw())?"-"===o||""===a||Number.isNaN(a)||"NaN"===a||null!==(i=t.null)&&void 0!==i&&i.value?"-":s.formatter()(a):o}function Hg({chart:e,actions:t,translator:n,rtl:i,dockService:r,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:h}=es.COMPONENT,{PRIMARY:p,SECONDARY:f}=ts.AXIS,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:i,DATA_OOB_MARKER:r,SLICED_HAT:o}=es.COMPONENT,{PRIMARY:a,SECONDARY:s}=ts.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,h=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===h&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const p=e.findShapes("path").find((e=>(e.key===`${i}-max-${a}`||e.key===`${i}-max-${s}`||e.key===`${r}-max`)&&e.data.major.value===h));if(u&&p)return{key:p.key,bounds:p.bounds};const f=e.findShapes("path").find((e=>(e.key===`${i}-min-${a}`||e.key===`${i}-min-${s}`||e.key===`${r}-min`)&&e.data.major.value===h)),g=e.findShapes("*").filter((e=>c.indexOf(e.key)>-1&&e.data&&e.data.major.value===h));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=p||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:r,seriesModel:o});return R({chart:e,translator:n,config:{rtl:i,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:c.fontFamily},main:{key:es.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:[es.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:m},placement:g},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${h}-max-${p}`,`${h}-max-${f}`,`${h}-min-${p}`,`${h}-min-${f}`,`${es.COMPONENT.BAR_OOB}-max-${p}`,`${es.COMPONENT.BAR_OOB}-max-${f}`,`${es.COMPONENT.BAR_OOB}-min-${p}`,`${es.COMPONENT.BAR_OOB}-min-${f}`,`${es.COMPONENT.DATA_OOB_MARKER}-max`,`${es.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:i,util:r})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(i.text({value:a,style:{bold:!0}})),s&&c.push(i.text({value:s}));const d=u.hideBasic();d&&!l.length&&(a||s)||c.push(i.text({value:o.data.label,style:{bold:!0}})),d||(c.push(i.color({nodes:t,property:es.SCALE.COLOR})),c.push(...t.map((e=>{const{segment:t,end:o}=e.data,a=t||o,{key:s,field:l}=a.source;return i.measure({label:r.dataset.title(s,l),value:Vg({dataset:n,data:e.data,valueData:a})})})))),l&&c.push(...l.map((e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(i.raw({value:u.chart.createLimitationRow()}))):c.push(i.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:m}=o.data;return u.isEnabled()&&m&&c.push(...m.map((t=>i.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:es.COMPONENT.LEGEND_TOOLTIP,component:es.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:Ug}=Qd,Yg=({picasso:e,chart:t,environment:m,flags:h,viewState:p,viewCache:f,actions:g,selectionService:v})=>{var y;const S=s(),{width:M,height:x}=r(),[E,C]=n(),[A,N]=n(),O=a(),T=l(),L=u(),I=c(),R=d(),z=ih({enable:!1===(null==E||null===(y=E.layoutService)||void 0===y||null===(y=y.meta)||void 0===y?void 0:y.isSnapshot)});i((()=>{if(!(S&&null!=t&&t.update&&m&&p&&v))return;const n=w({source:S,metaAdditionsFn:function({layout:e}){var t;const n=b(e,"qHyperCube.qMeasureInfo",[]),i=n.some((({series:e=ts.NOPE_SERIES})=>mc(e)===ts.TYPE.LINE)),r=ve.continuous(e,(()=>i&&ce.isTime(!0,e))),o=!Df(b(e,"version","")),a=n.filter((({series:e=ts.NOPE_SERIES})=>mc(e)===ts.TYPE.BAR)),s=a.length,l=a.filter((({series:e=ts.NOPE_SERIES})=>e.axis!==ts.AXIS.SECONDARY)).length,u=a.filter((({series:e=ts.NOPE_SERIES})=>e.axis===ts.AXIS.SECONDARY)).length,c=o?l>1||u>1:s>1,d=("grouped"!==b(e,"barGrouping.grouping")||r)&&c,m=!d&&s>1,h=o&&d&&(l>0&&u>1||l>1&&u>0),p=!(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:ce.canBeContinuous(e),isDiscrete:!r,isContinuous:r,isTime:ce.isTime(r,e),isSnapshot:ve.snapshot(e),isBarSeriesStacked:d,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:h,isGrouped:m||h,isGroupedByMeasure:m||h,isDimensionLocked:p,groupSize:h?2:s,hasLineSeries:i}}}),{options:i,translator:r}=m,{direction:o}=i,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},i=_f({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>i().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:O,layoutService:n}),l=k({app:T,translator:r}),u=q({chart:t,layoutService:n,config:{logicalSize:{width:M,height:x},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),c=Pf({layoutService:n}),d=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:i,seriesModel:r,viewState:o,rtl:a,actions:s,picasso:l}){return $g({chart:e,actions:s,componentKey:em(r),enigmaModel:t,layoutService:n,dockService:i,viewState:o,rtl:a,itemWidths:_g,options:{axisKey:es.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:O,layoutService:n,dockService:u,seriesModel:c,viewState:p,rtl:"rtl"===m.options.direction,actions:g,picasso:e}):void 0,y=n.meta.isContinuous?Ug({model:O,layoutService:n,viewState:p,viewCache:f}):void 0,E=D({theme:m.theme,config:{id:"comboChart",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),A=lg({actions:g,appLayoutModel:L,appModel:T,chart:t,environment:m,genericObjectModel:O,layoutService:n,picasso:e,seriesModel:c,viewState:p}),N=Bg({layoutService:n,dockService:u,themeService:E,colorService:A,flags:h}),z=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,i="qDimensionInfo/0",r=`${i}:numeric`;return{main:{major:i,majorNumeric:r,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:n?[{key:r,from:i,override:{value:e=>e.qNum}}]:void 0}}({layoutService:n,seriesModel:c}),$=Vf({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:c,continuousModel:y}),_=Vf({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:c,continuousModel:y}),F=jg({layoutService:n}),B=rg({config:{measureAxesRef:"measureAxes.0",formatter:es.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:$,dockService:u,seriesModel:c,themeService:E}),j=rg({config:{measureAxesRef:"measureAxes.1",formatter:es.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:_,dockService:u,seriesModel:c,themeService:E}),V=og({genericObjectModel:O,layoutService:n}),H=xs({flags:h,layout:S,app:T,model:O,picasso:e,chart:t,translator:r,localeInfo:L.qLocaleInfo,embed:R,options:i}),U=Hg({chart:t,actions:g,translator:r,rtl:a,dockService:u,seriesModel:c,colorService:A,themeService:E,propertiesModel:V,custom:H}),Y=Ia({layoutService:n,discreteModel:d}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:es.SCALE.MAJOR,MAJOR_INNER:es.SCALE.MAJOR_INNER,MINOR:{PRIMARY:es.SCALE.MINOR.PRIMARY,SECONDARY:es.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${es.COMPONENT.BAR}-${ts.AXIS.PRIMARY}`,BAR_SECONDARY:`${es.COMPONENT.BAR}-${ts.AXIS.SECONDARY}`,AXIS:{MAJOR:es.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:es.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:es.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:es.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:es.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:es.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:es.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:es.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:es.COLLECTION.MAIN}}}}(n),X=P({picassoInstance:e,plugins:I,pluginArgs:W}),K=function({options:e,viewCache:t,layoutService:n}){const i={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||i.hasSlicedHats||i.isPartialUpdating||i.isSizeChanging||Ma.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:i}}({options:i,viewCache:f,layoutService:n});C({alternativeService:l,selectionService:v,genericObjectModel:O,appModel:T,dockService:u,styleModel:N,layoutService:n,fieldModel:z,seriesModel:c,reducedModel:s,primaryExtremumModel:$,secondaryExtremumModel:_,primaryTickModel:B,secondaryTickModel:j,propertiesModel:V,colorService:A,themeService:E,appLayoutModel:L,tooltipService:U,disclaimerService:F,flags:h,...d&&{discreteModel:d},...y&&{continuousModel:y},refLineModel:Y,pluginService:X,animationsModel:K})}),[S,O,T,L,m,null==t?void 0:t.update,p,v]);const[,$]=o((()=>{if(!E)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:i,primaryExtremumModel:r,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:u,disclaimerService:c,styleModel:d}=E,h=s?()=>{var e;s.update(t.getLayout());const n=s.initialFetch(),i=!t.meta.isSnapshot&&(null==m||null===(e=m.options)||void 0===e||null===(e=e.viewState)||void 0===e?void 0:e.zoom);return i&&p.preventSet("zoom",i),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(),i.command.initialize(),O?a.command.initialize():Promise.resolve(),f,h(),g.scroll.attachDiscreteModel(l)]).then((()=>Promise.all([r.command.initialize(),o.command.initialize()]).then((async()=>{await e.initialize({properties:a.query.getProperties()||{}}),c.initialize(),N({...E})}))))}),[E,z]);if($)throw $;return A};const Wg={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 Xg={query:{getCanScroll:()=>!0}};function Kg({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function Gg({setSelectionInfo:e,event:t,components:n,clear:i}){const r=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:r,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&r[0]===es.COMPONENT.LEGEND_CATEGORICAL}),i()}function Jg({chart:e,actions:t}){const r=S(),o=s(),[a,l]=n();return i((()=>{if(null==e||!e.update||!e.scale)return null;const n=e.scale(es.SCALE.MAJOR),i=$({chart:e,actions:t,selections:r,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:Kg},selectionEvents:{start:Gg}}});i.setLayout(o);const{destroy:a}=i;return l(i),()=>{a()}}),[r,null==e?void 0:e.update,null==e?void 0:e.scale]),i((()=>{null!=a&&a.setLayout&&o&&a.setLayout(o)}),[o]),a}const Zg={version:"1.33.7",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 Qg=e=>t=>{const n=t.qHyperCubeDef.qMeasures,i=[0,0,0];let r;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)r=mc(n[e].qDef.series),r===ts.TYPE.BAR?i[0]=1:r===ts.TYPE.LINE?i[1]=1:i[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(i.join(""),2)-1];return e.get(o)},ev=e=>(t,n)=>{let i;const r=t.qHyperCubeDef.qMeasures[n];if(r){const{type:e}=r.qDef.series;i=e===ts.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===ts.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else i=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(i)};function tv(e){var t,n;const i=e.qHyperCubeDef.qMeasures,r=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===r&&1===i.length&&mc(null===(n=i[0].qDef)||void 0===n?void 0:n.series)===ts.TYPE.LINE?e.color.mode="primary":"byDimension"===r&&i.length>1&&(e.color.mode="byMultiple")}function nv(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:Qg(t),added(e,t){fs.addCallbackCustomTooltip(t)},moved(e,t){fs.moveCallbackCustomTooltip(t,e)},removed(e,t){fs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,i){fs.replaceCallbackCustomTooltip(i,t)}},measures:{min:1,max:15,description:ev(t),added({qDef:e},t){var n;tv(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:ts.TYPE.LINE,axis:ts.AXIS.SECONDARY}:e.series={type:ts.TYPE.BAR,axis:ts.AXIS.PRIMARY})},moved(e,t){tv(t)}}}}function iv(e){const t=nv(e);return{properties:Zg,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:i})=>{const r=Y.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:i}),o="linechart"===e.properties.visualization,a=[];r.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 r.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&re(!0,r.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),r},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const rv=({models:e,chart:t,viewState:n})=>{M((i=>{if(!e)return;const{layoutService:r,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=e,{width:c,height:d}=o.meta.chart.size;return i.snapshotData=i.snapshotData||{},i.snapshotData.content={size:{w:c,h:d}},r.meta.isSnapshot?Promise.resolve():(i.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,es.COMPONENT.LEGEND_CATEGORICAL)},r.meta.isDiscrete?(s.command.setSnapshotData(i),u.command.setSnapshotData(i)):l.setSnapshotData(i),a.getSnapshotData().then((e=>{i.snapshotData.content.chartData={...i.snapshotData.content.chartData,...e}})).catch((()=>{})))})),x((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,es.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])};const ov=e=>{const t=b(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=ts.NOPE_SERIES})=>mc(e)===ts.TYPE.LINE));return ve.continuous(e,(()=>t&&ce.isTime(!0,e)))},av=(e,t,n)=>{let i;const r=n||0;var o,a;"function"==typeof(null==e?void 0:e.getMeasureLayouts)?i=e.getMeasureLayouts():i=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 i.filter((e=>{const{series:t}=e||{};return 0===r?lh(t,!0):!lh(t,!0)}))},sv=(e,t)=>{const n=av(e,t,0).filter((e=>e.series.type===ts.TYPE.BAR)),i=av(e,t,1).filter((e=>e.series.type===ts.TYPE.BAR)),r="stacked"===b(t.layout,"barGrouping.grouping");return!ve.continuous(t.layout)&&r&&(n.length>1||i.length>1)},lv=(e,t,n,i,r=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!=r?r:n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:i.getStyle("object.comboChart",t,"color")})}}}}};function uv(e,t,n){const i=_({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)=>!ov(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:{...lv("bar.label.value","label.value",i,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:lv("line.label.value","label.value",i,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:lv("marker.label.value","label.value",i,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:lv("axis.title","axis.title",i,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:lv("axis.label.name","axis.label.name",i,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:lv("legend.title","legend.title",i,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:lv("legend.label","legend.label",i,t)}}}:void 0}}}const cv={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)=>!ov(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 dv(e){var t;return!(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t||!t.on)}function mv(e){var t,n;return dv(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 hv(e){var t;return dv(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.mode)}function pv(e){var t,n,i,r,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===(i=e.color)||void 0===i?void 0:i.colorExpression,s=null!==(r=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==r?r:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function fv(e){return hv(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function gv(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?[...pv(n),...fv(e)]:fv(e)}(t,n,e)))}function vv(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||ov(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"}]},i={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 mc(null===(t=e.qDef)||void 0===t?void 0:t.series)===ts.TYPE.MARKER}},r={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return mc(null===(t=e.qDef)||void 0===t?void 0:t.series)===ts.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)=>dv(...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 i;return null===(i=n.measureTitle)||void 0===i?void 0:i.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:i,seriesMarkerFill:r}},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,i=n.indexOf(t);return{index:-1===i?Math.min(6,n.length-1):i}},show:mv},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:hv}}}}}}}}}}}}const yv=10,Sv=!0;function Mv(e){return e.qHyperCube.qMeasureInfo.filter((e=>mc(e.series)===ts.TYPE.LINE)).length>0}function xv(e,t){const n=e.qHyperCube.qMeasureInfo.filter((e=>mc(e.series)===ts.TYPE.BAR));return n.filter((e=>e.series.axis!==ts.AXIS.SECONDARY)).length>t||n.filter((e=>e.series.axis===ts.AXIS.SECONDARY)).length>t}function bv(e){return e.qHyperCube.qMeasureInfo.filter((e=>mc(e.series)===ts.TYPE.MARKER)).length>0}const Ev=(e,t,n,i)=>{const r="vertical"===e.layout.orientation||ov(e.layout)?"y":"x",o=av(e,t,i).map((e=>e.qFallbackTitle));let a;return a=o.length?n.get(`properties.${r}AxisWithInfo`,[o.join(",")]):n.get(`properties.${r}Axis`),a};function Cv(e){var t,n,i;const{translator:r,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===(i=n.isUnsupportedFeature)||void 0===i?void 0:i.call(n,"continuousData"),u={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>gv(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>dv(e)))}}},c=e=>e.qHyperCubeDef.qMeasures.some((e=>dv(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;b(t=e,"qDef.color.on",void 0)&&E(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!c(e)}}},h={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&&xv(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&&Mv(n.layout),convertFunctions:{get:(e,t,n,i)=>i.dataPoint.show&&i.dataPoint.showLineLabels,set(e,t,n,i,r){r.dataPoint.showLineLabels=e,r.dataPoint.show=e}},reset(e){E(e,"dataPoint.show",!1),E(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,i)=>"labels"===i.dimensionAxis.show||"none"===i.dimensionAxis.show,set(e,t,n,i,r){r.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t,n)=>r.get(av(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&&av(e,t,0).length>0,convertFunctions:{get:(e,t,n,i)=>"labels"===i.measureAxes[0].show||"none"===i.measureAxes[0].show,set(e,t,n,i,r){r.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&&av(e,t,1).length>0,convertFunctions:{get:(e,t,n,i)=>"labels"===i.measureAxes[1].show||"none"===i.measureAxes[1].show,set(e,t,n,i,r){r.measureAxes[1].show=e?"labels":"all"}}}}}}},p={uses:"settings",items:{simpleStyling:cv,simpleLabels:h,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:uv(o,s,r),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)=>xv(n.layout,1)&&!ov(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)=>ov(n.layout),convertFunctions:(f="vertical",{get:(e,t,n)=>ov(n.layout)?f:e(t.type),set(e,t,n,i){t(n.type,ov(i.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)=>!ov(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)=>Mv(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>Mv(e)},show:(e,t,n)=>Mv(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=>xv(e,0)},show:(e,t,n)=>xv(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>xv(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&&sv(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&&sv(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>bv(e)},show:(e,t,n)=>bv(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 i=[],r=n.layout.qHyperCube.qMeasureInfo,o=d(r,0),a=d(r,1);return o&&i.push({translation:"properties.axis.primary",value:0}),a&&i.push({translation:"properties.axis.secondary",value:1}),i},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,i){var r;const o=null!==(r=i.gridLine.axis)&&void 0!==r?r:0,a=n.layout.qHyperCube.qMeasureInfo,s=d(a,0),l=d(a,1);return 0===o&&!s&&l?(E(i,"gridLine.axis",1),1):1===o&&s&&!l?(E(i,"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||ov(t.layout)?"x":"y",i=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=i?r.get(`properties.${n}AxisWithInfo`,[i]):r.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",i="Common.Top";return"vertical"===t.layout.orientation||ov(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!ov(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:yv,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:i}=e.dimensionAxis;return i<0||i>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:i}=e.dimensionAxis;i<1?e.dimensionAxis.maxVisibleItems=yv:i>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(i,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)=>Ev(t,n,r,0),show:(e,t,n)=>av(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>Ev(t,n,r,0),show:(e,t,n)=>av(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)&&lh(null==e?void 0:e.series,Sv)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&av(t,n,0).length>0,options(e,t){let n="Common.Bottom",i="Common.Top";return("vertical"===t.layout.orientation||ov(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&av(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)=>av(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,i){const{autoMinMax:r,minMax:o,min:a}=(null==i?void 0:i.measureAxes[0])||{};return!0===r?"lowest":r||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,i,r){"zero"===e?(E(r,"measureAxes.0.autoMinMax",!1),E(r,"measureAxes.0.minMax","min"),E(r,"measureAxes.0.min",0)):E(r,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t,n)=>Ev(t,n,r,1),show:(e,t,n)=>av(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t,n)=>Ev(t,n,r,1),show:(e,t,n)=>av(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)&&!lh(null==e?void 0:e.series,Sv)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&av(t,n,1).length>0,options(e,t){let n="Common.Bottom",i="Common.Top";return("vertical"===t.layout.orientation||ov(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",i=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:i}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&av(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)=>av(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,i){const{autoMinMax:r,minMax:o,min:a}=(null==i?void 0:i.measureAxes[1])||{};return!0===r?"lowest":r||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,i,r){"zero"===e?(E(r,"measureAxes.1.autoMinMax",!1),E(r,"measureAxes.1.minMax","min"),E(r,"measureAxes.1.min",0)):E(r,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var f;o.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(p.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 i,r;if(null!=a&&null!==(i=a.sense)&&void 0!==i&&null!==(r=i.isUnsupportedFeature)&&void 0!==r&&r.call(i,"includeZeroValues"))return!1;return!ov(n.layout)}}}},measures:vv(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=>lh(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,Sv)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!lh(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,Sv)},dimRefLines:{uses:"dimReflines"},plugins:null!=o&&o.isEnabled("CLIENT_TLV_694_PLUGINS_UI")&&null!=o&&o.isEnabled("TLV_1275_PLUGINS_COMBO_CHART")?Ga({translator:r,pluginOptions:[{value:"point",translation:r.get("Visualizations.Descriptions.Point")},{value:"line",translation:r.get("Visualizations.Descriptions.Line")}]}):void 0}};return e})(),settings:p}}}function Av(e){return e.qHyperCubeDef.qMeasures.filter((e=>mc(e.qDef.series)===ts.TYPE.LINE)).length>0}function Nv(){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)=>Av(e)||!ov(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=>mc(e.qDef.series)===ts.TYPE.BAR));return t?n.filter((e=>e.qDef.series.axis===ts.AXIS.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===ts.AXIS.SECONDARY)).length>1:n.length>1}(e,!Df(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!ov(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)=>!ov(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=>Av(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>Av(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>dv(e)))}}}}}}const Ov={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 Tv(e,t,n,i,r){const{axis:o,icon:a,tid:s,translation:l}=Ov[r];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await i.addLibraryMeasure(e.id):await i.addExpressionMeasure(e.name,""),t.qDef.series.type=r,t.qDef.series.axis=o,i.updateGlobalChangeListeners(),n.setProperties(i.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function Lv(e,t,n,i,r){!function(e,t,n){const{item:i}=e,r=["contextMenu.add",i.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:r,tid:"add-as"});Tv(i,o,t,n,"bar"),Tv(i,o,t,n,"line"),Tv(i,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,r),e.ColorBy(n,t,r),i()}function Iv(e){const t={},{tooltip:n}=e;if(n){var i;t.chart_tooltip_custom=!n.auto;const e=null===(i=n.chart)||void 0===i||null===(i=i.object)||void 0===i?void 0:i.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const Rv=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function wv(e){return{definition:Cv(e),softDefinition:Nv(),support:{snapshot:Rv,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:Lv,extendMetrics:Iv,importProperties:(t,n,i,r)=>{const o={layout:{templateId:n.templateId}};i.mapProperties(o);const a={defaultDimension:i.getDefaultDimensionProperties(),defaultMeasure:i.getDefaultMeasureProperties()},s=Y.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:nv(e),defaultPropertyValues:a,hypercubePath:r,extension:i});return function(e,t,n){const i="linechart"===n.properties.visualization,r=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:i?"line":"bar",axis:0,marker:"circle",markerFill:!0}),r.indexOf(e.qDef.series.axis)<0&&r.push(e.qDef.series.axis)}));const o=r.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&re(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),gv(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:(function(e){var t;e.qHyperCubeDef.qDimensions.forEach(Tt),null!==(t=e.qHyperCubeDef.qLayoutExclude)&&void 0!==t&&null!==(t=t.qHyperCubeDef)&&void 0!==t&&t.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(Tt)}(e),function(e){return Df(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=ts.NOPE_SERIES),void 0===t.series.type&&(t.series.type=ts.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===ts.TYPE.BAR?ts.AXIS.PRIMARY:ts.AXIS.SECONDARY),t.series.type===ts.TYPE.BAR&&t.series.axis===ts.AXIS.SECONDARY&&(t.series.axis=ts.AXIS.PRIMARY)})),e.version=qf.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}}));