@nebula.js/sn-combo-chart 1.45.0 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-combo-chart v1.
|
|
2
|
+
* @nebula.js/sn-combo-chart v1.46.0
|
|
3
3
|
* Copyright (c) 2026 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,r,i,o,a,s,l,c,u,m,d,p,h,f,g,y,v,S,M,E,x,b,C,A,N,O,T,L,R,I,k,w,D,q,P,z,$,_,F,B,V,j,U,H,Y,W,X,K,G,J;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useModel,s=e.useStaleLayout,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,m=e.useEmbed,d=e.useRenderState,p=e.useOptions,h=e.useTranslator,f=e.useTheme,g=e.useDeviceType,y=e.useConstraints,v=e.useLayout,S=e.useAction,M=e.useSelections,E=e.onTakeSnapshot,x=e.useImperativeHandle},function(e){b=e.getValue,C=e.setValue,A=e.createColor,N=e.cache,O=e.debouncer,T=e.throttler,L=e.createTapInteraction,R=e.createContinuousRangeInteraction,I=e.createAreaRangeInteraction,k=e.createLassoInteraction,w=e.pointLabelComponent,D=e.colorService,q=e.disclaimerService,P=e.tooltipService,z=e.layoutService,$=e.alternativeService,_=e.dockService,F=e.themeService,B=e.pluginService,V=e.storage,j=e.selectionService,U=e.fontResolver},function(e){H=e.default},function(e){Y=e.default},function(e){W=e.default},function(e){X=e.reactRenderer,K=e.axisTitleComponent,G=e.disclaimerComponent},function(e){J=e.default}],execute:function(){e("default",function(e){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(ee).forEach(t=>{e.add(ee[t])})}}(e.translator);const{flags:i}=e,a=e.anything?.sense?.isUnsupportedFeature,s=up();return{qae:ty(e),ext:zy(e),component(){const e=function(){const[e,t]=n();return r(()=>t(N()),[]),e}(),l=function(){const[e,t]=n();return r(()=>{t(V({viewRange:[0,1],scrollOffset:void 0}))},[]),e}(),c=function(){const e=p(),t=h(),i=m(),o=f(),[a,s]=n(),l=g();return r(()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:i,deviceType:l})},[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),u=function(){const e=y(),[t,i]=n(!1),[o,a]=n(!1),[s,l]=n(!1),c=function(){const e=y(),[t,i]=n(!1),[o,a]=n({}),[s,l]=n();return r(()=>()=>{a({})},[]),r(()=>{e&&i(!e.select&&!e.active)},[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach(e=>e(...t)),removeListener:(e,t)=>{const n=o[e]?.indexOf(t);n>-1&&o[e].splice(n,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),u=function(){const e=y(),[t,i]=n(!1),[o,a]=n(!1),s=v(),l=h(),c=!!s.qSelectionInfo.qInSelections,u=!!s.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne;r(()=>{e&&i(!e.select&&!e.active)},[e]);const m=e=>{a("boolean"==typeof e?e:!o)};return S(()=>({key:"lasso",label:l.get(o?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:Hg,hidden:!t||!c||u,active:o,action:m}),[c,u,o,t,l.language()]),{action:m,enabled:()=>t,active:()=>o}}();let m=Yg;r(()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))},[e]);const[d]=n({});return d.scroll={enabled:()=>t&&m.query.getCanScroll(),attachDiscreteModel:e=>{m=e||Yg}},d.interact={enabled:()=>o},d.tooltip={enabled:()=>s},d.lasso=u,d.select=c,d}(),d=function({picasso:e,environment:i}){const o=t(),[a,s]=n();return r(()=>{if(!i)return;o.style.overflow="hidden";const t=e({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}},[i]),a}({picasso:s,environment:c}),M=Kg({chart:d,actions:u}),E=Ug({picasso:s,chart:d,environment:c,flags:i,viewState:l,viewCache:e,actions:u,selectionService:M});!function({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:c,onZoomChange:u}}=cd,[,m]=o(async()=>{if(!(t?.update&&n&&r&&a&&s))return;const{layoutService:o,colorService:m,continuousModel:d,discreteModel:p,refLineModel:h,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:y}=f.meta,{options:v}=r,{viewState:S={}}=v,{legendScrollOffset:M,scrollOffset:E}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):S;a.preventSet("scrollOffset",E),a.preventSet("legendScrollOffset",M),a.preventSet("title",o.getLayoutValue("title"));const x=()=>{h&&h.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...kd,...y]}),g.meta.isPartialUpdating=!1};function b(o=!1){const c=Rd({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}),u=o&&[wd({models:n}),...Dd({models:n}),...m.getData()];o?(t.layoutComponents({settings:c,data:u}),g.meta.hasSlicedHats=c.components.filter(e=>"box-sliced-hat"===e.type).length>0):t.update({settings:c,data:u})}a.onChanged("scrollOffset",x),o.meta.isContinuous&&(a.onChanged("zoom",u({layoutService:o,continuousDataModel:d},x)),a.intercept("zoom",c({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),b(!0),o.setDataPages(C),o.meta.isContinuous||await p.command.initialize(),b(!1),Ta.cacheProperties({viewCache:s,layout:o.getLayout()})},[t?.update,n,r]);if(m)throw m}({picasso:s,chart:d,models:E,environment:c,flags:i,viewState:l,viewCache:e,actions:u}),Id({picasso:s,chart:d,models:E,environment:c,flags:i,viewState:l,viewCache:e,actions:u,isUnsupportedFeature:a}),ny({models:E,chart:d,viewState:l})}}});var Z,Q,ee={Common_Measures:{id:"Common.Measures",locale:{"de-DE":"Kennzahlen","en-US":"Measures","es-ES":"Medidas","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","ru-RU":"Меры","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"de-DE":"Farbformel","en-US":"Color expression","es-ES":"Expresión de color","fr-FR":"Expression de couleur","it-IT":"Espressione colore","ja-JP":"カラー表現","ko-KR":"색상 표현식","nl-NL":"Kleuruitdrukking","pl-PL":"Wyrażenie koloru","pt-BR":"Expressão de cor","ru-RU":"Выражение для цвета","sv-SE":"Färguttryck","tr-TR":"Renk ifadesi","zh-CN":"颜色表达式","zh-TW":"色彩運算式"}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"de-DE":"+{0} mehr","en-US":"+{0} more","es-ES":"+{0} más","fr-FR":"+{0} plus","it-IT":"+{0} altre","ja-JP":"さらに +{0}","ko-KR":"{0} 이상","nl-NL":"+{0} meer","pl-PL":"Jeszcze {0}","pt-BR":"+{0} mais","ru-RU":"Еще +{0}","sv-SE":"Fler än {0} ytterligare","tr-TR":"+{0} daha","zh-CN":"+{0} 以上","zh-TW":"其他 +{0} 個"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"de-DE":"Summe negativer Werte","en-US":"Sum of negatives","es-ES":"Suma de negativos","fr-FR":"Somme des valeurs négatives","it-IT":"Somma valori negativi","ja-JP":"負の合計","ko-KR":"음수 합계","nl-NL":"Som negatieven","pl-PL":"Suma ujemnych","pt-BR":"Soma de negativos","ru-RU":"Сумма отрицательных значений","sv-SE":"Summan av negativa","tr-TR":"Negatif değerlerin toplamı","zh-CN":"负值总和","zh-TW":"負數總和"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"de-DE":"Summe positiver Werte","en-US":"Sum of positives","es-ES":"Suma de positivos","fr-FR":"Sommes des valeurs positives","it-IT":"Somma valori positivi","ja-JP":"正の合計","ko-KR":"양수 합계","nl-NL":"Som positieven","pl-PL":"Suma dodatnich","pt-BR":"Soma de positivos","ru-RU":"Сумма положительных значений","sv-SE":"Summan av positiva","tr-TR":"Pozitif değerlerin toplamı","zh-CN":"正值总和","zh-TW":"正數總和"}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","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.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","en-US":"Currently showing a limited data set.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","ja-JP":"現在、限定的なデータ セットを表示しています。","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","pt-BR":"Mostrando um conjunto de dados limitado.","ru-RU":"В настоящее время отображается ограниченный набор данных.","sv-SE":"Just nu visas en begränsad datauppsättning.","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","zh-CN":"当前正显示有限的数据集。","zh-TW":"目前顯示的是有限的資料集。"}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative or zero values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores cero o negativos que no se pueden mostrar en este gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。"}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","zh-CN":"数据集包含无法在此图表中显示的负值。","zh-TW":"資料集包含無法在此圖表中顯示的負值。"}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","en-US":"The selections generated no data for this chart.","es-ES":"Las selecciones no han generado datos para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ko-KR":"선택 내용으로 이 차트에 대한 데이터가 생성되지 않았습니다.","nl-NL":"De selecties hebben geen gegevens voor de diagram gegenereerd.","pl-PL":"Wymiary nie spowodowały wygenerowania danych dla tego wykresu.","pt-BR":"As seleções não geraram dados para este gráfico.","ru-RU":"В результате выборок данные для этой диаграммы не созданы.","sv-SE":"Urvalen genererade inga data för detta diagram.","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","zh-CN":"选择未生成此图表的数据。","zh-TW":"此選項無法產生任何適用於此圖表的資料。"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","en-US":"The data used to color this visualization only contains undefined values.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。"}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","en-US":"The chart is not displayed because it contains only undefined values.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości niezdefiniowane.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含未定义的值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。"}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","en-US":"The chart is not displayed because it contains only negative or zero values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos o valores cero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen negatieve waarden of nulwaarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne lub zerowe.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa värden eller nollvärden","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值或零值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。"}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","en-US":"The chart is not displayed because it contains only negative values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"de-DE":"Dimension nicht gefunden","en-US":"Dimension not found","es-ES":"No se ha encontrado la dimensión","fr-FR":"Dimension introuvable","it-IT":"Dimensione non trovata","ja-JP":"軸が見つかりません","ko-KR":"차원을 찾지 못했습니다.","nl-NL":"Dimensie niet gevonden","pl-PL":"Wymiar nie został znaleziony","pt-BR":"Dimensão não encontrada","ru-RU":"Измерение не найдено","sv-SE":"Dimensionen hittades inte","tr-TR":"Boyut bulunamadı","zh-CN":"未找到维度","zh-TW":"找不到維度"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"de-DE":"Kennzahl nicht gefunden","en-US":"Measure not found","es-ES":"No se ha encontrado la medida","fr-FR":"Mesure introuvable","it-IT":"Misura non trovata","ja-JP":"メジャーが見つかりません","ko-KR":"측정값을 찾지 못했습니다.","nl-NL":"Meting niet gevonden","pl-PL":"Miara nie została znaleziona","pt-BR":"Medida não encontrada","ru-RU":"Мера не найдена","sv-SE":"Måttet hittades inte","tr-TR":"Hesaplama bulunamadı","zh-CN":"未找到度量","zh-TW":"找不到量值"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"de-DE":"Lasso-Auswahl deaktivieren","en-US":"Turn off lasso selection","es-ES":"Desactivar la selección de contorno","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","ru-RU":"Выключить выбор лассо","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"de-DE":"Lasso-Auswahl aktivieren","en-US":"Turn on lasso selection","es-ES":"Activar la selección de contorno","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","ru-RU":"Включить выбор лассо","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取"}},Tooltip_dimensions_cyclic:{id:"Tooltip.dimensions.cyclic",locale:{"de-DE":"Zyklische Dimension","en-US":"Cyclic dimension","es-ES":"Dimensión cíclica","fr-FR":"Dimension cyclique","it-IT":"Dimensione ciclica","ja-JP":"サイクリック軸","ko-KR":"순환 차원","nl-NL":"Cyclische dimensie","pl-PL":"Wymiar cykliczny","pt-BR":"Dimensão cíclica","ru-RU":"Циклическое измерение","sv-SE":"Cyklisk dimension","tr-TR":"Döngüsel boyut","zh-CN":"循环维度","zh-TW":"循環維度"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"de-DE":"Drilldown-Dimension","en-US":"Drill-down dimension","es-ES":"Dimensión jerárquica","fr-FR":"Descendre dans la hiérarchie de la dimension","it-IT":"Dimensione di drill-down","ja-JP":"軸のドリルダウン","ko-KR":"드릴다운 차원","nl-NL":"Drill-downdimensie","pl-PL":"Wymiar hierarchiczny","pt-BR":"Dimensão da hierarquia","ru-RU":"Детализированное измерение","sv-SE":"Hierarkisk dimension","tr-TR":"Detaya inme boyutu","zh-CN":"下钻维度","zh-TW":"向下探查維度"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"de-DE":"Auswahlen sind für diese Dimension gesperrt","en-US":"Selections on this dimension are locked","es-ES":"Las selecciones de esta dimensión están bloqueadas.","fr-FR":"Sélections verrouillées pour cette dimension","it-IT":"Le selezioni in questa dimensione sono bloccate","ja-JP":"この軸での選択はロックされています","ko-KR":"이 차원의 선택은 잠겨 있습니다.","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","pl-PL":"Wybory dotyczące tego wymiaru są zablokowane","pt-BR":"Seleções estão bloqueadas nesta dimensão","ru-RU":"Выборки для данного измерения заблокированы","sv-SE":"Urval i den här dimensionen är låsta","tr-TR":"Bu boyuttaki seçimler kilitli","zh-CN":"相关维度的选择已锁定","zh-TW":"已鎖定此維度上的選項"}},Visualizations_Descriptions_Bars:{id:"Visualizations.Descriptions.Bars",locale:{"de-DE":"Balken","en-US":"Bars","es-ES":"Barras","fr-FR":"Barres","it-IT":"Barre","ja-JP":"棒","ko-KR":"막대","nl-NL":"Staven","pl-PL":"Słupki","pt-BR":"Barras","ru-RU":"Полосы","sv-SE":"Staplar","tr-TR":"Çubuklar","zh-CN":"条形","zh-TW":"長條"}},Visualizations_Descriptions_Group:{id:"Visualizations.Descriptions.Group",locale:{"de-DE":"Gruppe","en-US":"Group","es-ES":"Grupo","fr-FR":"Groupe","it-IT":"Gruppo","ja-JP":"グループ","ko-KR":"그룹","nl-NL":"Groep","pl-PL":"Grupa","pt-BR":"Grupo","ru-RU":"Группа","sv-SE":"Grupp","tr-TR":"Grup","zh-CN":"组","zh-TW":"群組"}},Visualizations_Descriptions_HeightLine:{id:"Visualizations.Descriptions.HeightLine",locale:{"de-DE":"Linienhöhe","en-US":"Height of line","es-ES":"Altura de línea","fr-FR":"Hauteur de ligne","it-IT":"Altezza della linea","ja-JP":"線の高さ","ko-KR":"선 높이","nl-NL":"Hoogte van lijn","pl-PL":"Wysokość linii","pt-BR":"Altura da linha","ru-RU":"Высота линии","sv-SE":"Linjens höjd","tr-TR":"Çizgi yüksekliği","zh-CN":"线高度","zh-TW":"折線高度"}},Visualizations_Descriptions_LengthBars:{id:"Visualizations.Descriptions.LengthBars",locale:{"de-DE":"Balkenlänge","en-US":"Length of bars","es-ES":"Longitud de barras","fr-FR":"Longueur des barres","it-IT":"Lunghezza delle barre","ja-JP":"棒の長さ","ko-KR":"막대 길이","nl-NL":"Lengte van staven","pl-PL":"Długość słupków","pt-BR":"Comprimento das barras","ru-RU":"Длина полос","sv-SE":"Staplarnas längd","tr-TR":"Çubuk uzunluğu","zh-CN":"条形长度","zh-TW":"長條長度"}},properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"de-DE":"Freigeben","en-US":"Share","es-ES":"Compartir","fr-FR":"Partage","it-IT":"Condividi","ja-JP":"共有","ko-KR":"공유","nl-NL":"Delen","pl-PL":"Udostępnij","pt-BR":"Compartilhar","ru-RU":"Совместное использование","sv-SE":"Dela","tr-TR":"Paylaş","zh-CN":"共享","zh-TW":"共用"}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"de-DE":"Durchschnitt","en-US":"Average","es-ES":"Media","fr-FR":"Moyenne","it-IT":"Media","ja-JP":"平均値","ko-KR":"평균","nl-NL":"Gemiddelde","pl-PL":"Średnia","pt-BR":"Média","ru-RU":"Среднее","sv-SE":"Medel","tr-TR":"Ortalama","zh-CN":"平均值","zh-TW":"平均值"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"de-DE":"Exponentiell","en-US":"Exponential","es-ES":"Exponencial","fr-FR":"Exponentiel","it-IT":"Esponenziale","ja-JP":"指数","ko-KR":"지수","nl-NL":"Exponentieel","pl-PL":"Wykładnicze","pt-BR":"Exponencial","ru-RU":"Экспоненциальный","sv-SE":"Exponentiell","tr-TR":"Üstel","zh-CN":"指数","zh-TW":"指數"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"de-DE":"Linear","en-US":"Linear","es-ES":"Lineal","fr-FR":"Linéaire","it-IT":"Lineare","ja-JP":"線形","ko-KR":"선형","nl-NL":"Lineair","pl-PL":"Liniowe","pt-BR":"Linear","ru-RU":"Линейный","sv-SE":"Linjär","tr-TR":"Doğrusal","zh-CN":"线性","zh-TW":"線性"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"de-DE":"Logarithmisch","en-US":"Logarithmic","es-ES":"Logarítmica","fr-FR":"Logarithmique","it-IT":"Logaritmica","ja-JP":"対数","ko-KR":"로그","nl-NL":"Logaritmisch","pl-PL":"Logarytmiczne","pt-BR":"Logarítmico","ru-RU":"Логарифмический","sv-SE":"Logaritmisk","tr-TR":"Logaritmik","zh-CN":"对数","zh-TW":"對數"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"de-DE":"Polynom zweiten Grades","en-US":"Second degree polynomial","es-ES":"Polinómica de segundo grado","fr-FR":"Polynomial du 2ème degré","it-IT":"Polinomio di secondo grado","ja-JP":"2 番目の角度の多項式近似","ko-KR":"2차 다항식","nl-NL":"Tweedegraadspolynoom","pl-PL":"Wielomianowe drugiego stopnia","pt-BR":"Polinômio de segundo grau","ru-RU":"Полиномиальный второй степени","sv-SE":"Polynomial, andra graden","tr-TR":"İkinci derece polinom","zh-CN":"二次多项式","zh-TW":"第二度多項式"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"de-DE":"Polynom dritten Grades","en-US":"Third degree polynomial","es-ES":"Polinómica de tercer grado","fr-FR":"Polynomial du 3ème degré","it-IT":"Polinomio di terzo grado","ja-JP":"3 番目の角度の多項式近似","ko-KR":"3차 다항식","nl-NL":"Derdegraadspolynoom","pl-PL":"Wielomianowe trzeciego stopnia","pt-BR":"Polinômio de terceiro grau","ru-RU":"Полиномиальный третьей степени","sv-SE":"Polynomial, tredje graden","tr-TR":"Üçüncü derece polinom","zh-CN":"三次多项式","zh-TW":"第三度多項式"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"de-DE":"Polynom vierten Grades","en-US":"Fourth degree polynomial","es-ES":"Polinómica de cuarto grado","fr-FR":"Polynomial du 4ème degré","it-IT":"Polinomio di quarto grado","ja-JP":"4 番目の角度の多項式近似","ko-KR":"4차 다항식","nl-NL":"Vierdegraadspolynoom","pl-PL":"Wielomianowe czwartego stopnia","pt-BR":"Polinômio de quarto grau","ru-RU":"Полиномиальный четвертой степени","sv-SE":"Polynomial, fjärde graden","tr-TR":"Dördüncü derece polinom","zh-CN":"四次多项式","zh-TW":"第四度多項式"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"de-DE":"Potenz","en-US":"Power","es-ES":"Potencia","fr-FR":"Puissance","it-IT":"Potenza","ja-JP":"累乗","ko-KR":"거듭제곱","nl-NL":"Macht","pl-PL":"Potęgowe","pt-BR":"Potência","ru-RU":"Степенной","sv-SE":"Potens","tr-TR":"Üs","zh-CN":"幂","zh-TW":"乘冪"}}};function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne=function(){if(Q)return Z;Q=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Z=function e(){var t,n,r,l,c,u,m=arguments[0],d=1,p=arguments.length,h=!1;for("boolean"==typeof m&&(h=m,m=arguments[1]||{},d=2),(null==m||"object"!=typeof m&&"function"!=typeof m)&&(m={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=s(m,n),m!==(l=s(t,n))&&(h&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(m,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(m,{name:n,newValue:l}));return m},Z}(),re=te(ne);const ie=[["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}]],oe={};ie.forEach(([e,{width:t,height:n}])=>{oe[e]={width:t,height:n}});const ae={getLayoutModes:()=>oe,getLayoutMode(e,t){let n;for(n=0;n<ie.length;++n)if(e>=ie[n][1].width&&t>=ie[n][1].height)return ie[n][0];return"SPARK"}};const se=["$date","$timestamp","$time"],le=["D","TS","T"],ce={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some(e=>se.some(t=>t===e))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&le.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=>7005!==e.qError?.qErrorCode)[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some(e=>"$numeric"===e))},canBeContinuous(e){const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode);return!((t?.length??0)<1)&&ce.canBeContinuousDimension(t[0])},maxNumberOfLines:12},ue=/^[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,"")}},de={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||ue.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=>de.getValue(e,"qHyperCube.qDimensionInfo",[]),he=e=>de.getValue(e,"qHyperCube.qMeasureInfo",[]),fe=e=>de.getValue(e,"barGrouping.grouping"),ge={continuous({layout:e,properties:t,auto:n}){if(!ce.canBeContinuous(e))return!1;const r=t||e;return de.getValue(r,"dimensionAxis.continuousAuto")?"function"==typeof n?n():!!n:!!r?.preferContinuousAxis},dimensionless:e=>!pe(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===fe(e)&&(pe(e).length>1||he(e).length>1)&&!this.continuous({layout:e})},groupedByDimension(e){return this.grouped(e)&&pe(e).length>1&&1===he(e).length},groupedByMeasure(e){return this.grouped(e)&&1===pe(e).length&&he(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==fe(e)&&"butterfly"!==fe(e)||this.continuous({layout:e}))&&(pe(e).length>1||he(e).length>1)},stackedByDimension(e){return this.stacked(e)&&pe(e).length>1&&1===he(e).length},stackedByMeasure(e){return this.stacked(e)&&1===pe(e).length&&he(e).length>1},simple:e=>0===pe(e).length||1===pe(e).length&&1===he(e).length,snapshot:e=>!!de.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 ve=e=>{throw e.isHandled=!0,e};const Se={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?Se.getVerticalDock(t):n?Se.getOppositeDock(Se.getHorizontalDock(t)):Se.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},Me=166/26,Ee=12/11,xe={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*Me)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach(e=>{i=xe.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk}):e.forEach(e=>{i=xe.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk});const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=xe.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(xe.stringWidthOverMWidth(o)+a*Ee)}},be=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ce=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Ae=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ne={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>be.test(e),isRtlChar:e=>Ce.test(e)||Ae.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Ne.isLtrChar(r))return"ltr";if(Ne.isRtlChar(r))return"rtl"}return"ltr"}},Oe={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Oe.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some(e=>e.field===t.coloring.field),getTitleRow(e,t){const n=Ne.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=Ne.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Ne.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=Ne.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Ne.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Oe.getColorSymbol(e,t)]:[Oe.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Ne.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Ne.detectTextDirection(e.value);let l;return l=i?r?[e.value,Oe.getColorSymbol(t,n)]:[Oe.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Te(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Le(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Re(){}var Ie=.7,ke=1/Ie,we="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pe=/^#([0-9a-f]{3,8})$/,ze=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),$e=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),_e=new RegExp(`^rgba\\(${we},${we},${we},${De}\\)$`),Fe=new RegExp(`^rgba\\(${qe},${qe},${qe},${De}\\)$`),Be=new RegExp(`^hsl\\(${De},${qe},${qe}\\)$`),Ve=new RegExp(`^hsla\\(${De},${qe},${qe},${De}\\)$`),je={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ue(){return this.rgb().formatHex()}function He(){return this.rgb().formatRgb()}function Ye(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Pe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?We(t):3===n?new Je(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Xe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Xe(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=ze.exec(e))?new Je(t[1],t[2],t[3],1):(t=$e.exec(e))?new Je(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_e.exec(e))?Xe(t[1],t[2],t[3],t[4]):(t=Fe.exec(e))?Xe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Be.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]):je.hasOwnProperty(e)?We(je[e]):"transparent"===e?new Je(NaN,NaN,NaN,0):null}function We(e){return new Je(e>>16&255,e>>8&255,255&e,1)}function Xe(e,t,n,r){return r<=0&&(e=t=n=NaN),new Je(e,t,n,r)}function Ke(e){return e instanceof Re||(e=Ye(e)),e?new Je((e=e.rgb()).r,e.g,e.b,e.opacity):new Je}function Ge(e,t,n,r){return 1===arguments.length?Ke(e):new Je(e,t,n,null==r?1:r)}function Je(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ze(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}`}function Qe(){const e=et(this.opacity);return`${1===e?"rgb(":"rgba("}${tt(this.r)}, ${tt(this.g)}, ${tt(this.b)}${1===e?")":`, ${e})`}`}function et(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nt(e){return((e=tt(e))<16?"0":"")+e.toString(16)}function rt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ot(e,t,n,r)}function it(e){if(e instanceof ot)return new ot(e.h,e.s,e.l,e.opacity);if(e instanceof Re||(e=Ye(e)),!e)return new ot;if(e instanceof ot)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ot(a,s,l,e.opacity)}function ot(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function at(e){return(e=(e||0)%360)<0?e+360:e}function st(e){return Math.max(0,Math.min(1,e||0))}function lt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Te(Re,Ye,{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 it(this).formatHsl()},formatRgb:He,toString:He}),Te(Je,Ge,Le(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ie:Math.pow(Ie,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Je(tt(this.r),tt(this.g),tt(this.b),et(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:Ze,formatHex:Ze,formatHex8:function(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}${nt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Qe,toString:Qe})),Te(ot,function(e,t,n,r){return 1===arguments.length?it(e):new ot(e,t,n,null==r?1:r)},Le(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ie:Math.pow(Ie,e),new ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Je(lt(e>=240?e-240:e+120,i,r),lt(e,i,r),lt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ot(at(this.h),st(this.s),st(this.l),et(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=et(this.opacity);return`${1===e?"hsl(":"hsla("}${at(this.h)}, ${100*st(this.s)}%, ${100*st(this.l)}%${1===e?")":`, ${e})`}`}}));const ct=Math.PI/180,ut=180/Math.PI,mt=.96422,dt=.82521,pt=4/29,ht=6/29,ft=3*ht*ht,gt=ht*ht*ht;function yt(e){if(e instanceof vt)return new vt(e.l,e.a,e.b,e.opacity);if(e instanceof Ct)return At(e);e instanceof Je||(e=Ke(e));var t,n,r=xt(e.r),i=xt(e.g),o=xt(e.b),a=St((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=St((.4360747*r+.3850649*i+.1430804*o)/mt),n=St((.0139322*r+.0971045*i+.7141733*o)/dt)),new vt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function vt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function St(e){return e>gt?Math.pow(e,1/3):e/ft+pt}function Mt(e){return e>ht?e*e*e:ft*(e-pt)}function Et(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function xt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function bt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ct)return new Ct(e.h,e.c,e.l,e.opacity);if(e instanceof vt||(e=yt(e)),0===e.a&&0===e.b)return new Ct(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ut;return new Ct(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ct(e,t,n,null==r?1:r)}function Ct(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function At(e){if(isNaN(e.h))return new vt(e.l,0,0,e.opacity);var t=e.h*ct;return new vt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Te(vt,function(e,t,n,r){return 1===arguments.length?yt(e):new vt(e,t,n,null==r?1:r)},Le(Re,{brighter(e){return new vt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new vt(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 Je(Et(3.1338561*(t=mt*Mt(t))-1.6168667*(e=1*Mt(e))-.4906146*(n=dt*Mt(n))),Et(-.9787684*t+1.9161415*e+.033454*n),Et(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Te(Ct,bt,Le(Re,{brighter(e){return new Ct(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ct(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return At(this).rgb()}}));var Nt={isDark:function(e){return bt(e).l<70}};function Ot(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach(e=>{e.qSortByNumeric=1,e.qSortByAscii=1})}function Tt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Lt(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Tt(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var Rt=Lt(Tt).right,It=Math.sqrt(50),kt=Math.sqrt(10),wt=Math.sqrt(2);function Dt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=It?10:o>=kt?5:o>=wt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=It?10:o>=kt?5:o>=wt?2:1)}function qt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=It?i*=10:o>=kt?i*=5:o>=wt&&(i*=2),t<e?-i:i}function Pt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var zt="$";function $t(){}function _t(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 r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Ft(){}$t.prototype=_t.prototype={constructor:$t,has:function(e){return zt+e in this},get:function(e){return this[zt+e]},set:function(e,t){return this[zt+e]=t,this},remove:function(e){var t=zt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===zt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===zt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===zt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===zt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===zt&&++e;return e},empty:function(){for(var e in this)if(e[0]===zt)return!1;return!0},each:function(e){for(var t in this)t[0]===zt&&e(this[t],t.slice(1),this)}};var Bt=_t.prototype;Ft.prototype={constructor:Ft,has:Bt.has,add:function(e){return this[zt+(e+="")]=e,this},remove:Bt.remove,clear:Bt.clear,values:Bt.keys,size:Bt.size,empty:Bt.empty,each:Bt.each};var Vt=Array.prototype,jt=Vt.map,Ut=Vt.slice;function Ht(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Yt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Wt(){}var Xt=.7,Kt=1/Xt,Gt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qt=/^#([0-9a-f]{3,8})$/,en=new RegExp("^rgb\\("+[Gt,Gt,Gt]+"\\)$"),tn=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),nn=new RegExp("^rgba\\("+[Gt,Gt,Gt,Jt]+"\\)$"),rn=new RegExp("^rgba\\("+[Zt,Zt,Zt,Jt]+"\\)$"),on=new RegExp("^hsl\\("+[Jt,Zt,Zt]+"\\)$"),an=new RegExp("^hsla\\("+[Jt,Zt,Zt,Jt]+"\\)$"),sn={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 ln(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function un(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?mn(t):3===n?new hn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?dn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?dn(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=en.exec(e))?new hn(t[1],t[2],t[3],1):(t=tn.exec(e))?new hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=nn.exec(e))?dn(t[1],t[2],t[3],t[4]):(t=rn.exec(e))?dn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=on.exec(e))?vn(t[1],t[2]/100,t[3]/100,1):(t=an.exec(e))?vn(t[1],t[2]/100,t[3]/100,t[4]):sn.hasOwnProperty(e)?mn(sn[e]):"transparent"===e?new hn(NaN,NaN,NaN,0):null}function mn(e){return new hn(e>>16&255,e>>8&255,255&e,1)}function dn(e,t,n,r){return r<=0&&(e=t=n=NaN),new hn(e,t,n,r)}function pn(e,t,n,r){return 1===arguments.length?((i=e)instanceof Wt||(i=un(i)),i?new hn((i=i.rgb()).r,i.g,i.b,i.opacity):new hn):new hn(e,t,n,null==r?1:r);var i}function hn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function fn(){return"#"+yn(this.r)+yn(this.g)+yn(this.b)}function gn(){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 vn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mn(e,t,n,r)}function Sn(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof Wt||(e=un(e)),!e)return new Mn;if(e instanceof Mn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Mn(a,s,l,e.opacity)}function Mn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function En(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 xn(e){return function(){return e}}function bn(e){return 1===(e=+e)?Cn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):xn(isNaN(t)?n:t)}}function Cn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xn(isNaN(e)?t:e)}Ht(Wt,un,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ln,formatHex:ln,formatHsl:function(){return Sn(this).formatHsl()},formatRgb:cn,toString:cn}),Ht(hn,pn,Yt(Wt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new hn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Xt:Math.pow(Xt,e),new hn(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:fn,formatHex:fn,formatRgb:gn,toString:gn})),Ht(Mn,function(e,t,n,r){return 1===arguments.length?Sn(e):new Mn(e,t,n,null==r?1:r)},Yt(Wt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Xt:Math.pow(Xt,e),new Mn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new hn(En(e>=240?e-240:e+120,i,r),En(e,i,r),En(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var An=function e(t){var n=bn(t);function r(e,t){var r=n((e=pn(e)).r,(t=pn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Cn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Nn(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function On(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Dn(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Tn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ln(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Rn(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Dn(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var In=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kn=new RegExp(In.source,"g");function wn(e,t){var n,r,i,o=In.lastIndex=kn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=In.exec(e))&&(r=kn.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Ln(n,r)})),o=kn.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Dn(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?xn(t):("number"===i?Ln:"string"===i?(n=un(t))?(t=n,An):wn:t instanceof un?An:t instanceof Date?Tn:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?On:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Rn:Ln:Nn))(e,t)}function qn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Pn(e){return+e}var zn=[0,1];function $n(e){return e}function _n(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function Fn(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Bn(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=_n(i,r),o=n(a,o)):(r=_n(r,i),o=n(o,a)),function(e){return o(r(e))}}function Vn(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=_n(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Rt(e,t,1,r)-1;return o[n](i[n](t))}}function jn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Un(e,t){return function(){var e,t,n,r,i,o,a=zn,s=zn,l=Dn,c=$n;function u(){return r=Math.min(a.length,s.length)>2?Vn:Bn,i=o=null,m}function m(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return m.invert=function(n){return c(t((o||(o=r(s,a.map(e),Ln)))(n)))},m.domain=function(e){return arguments.length?(a=jt.call(e,Pn),c===$n||(c=Fn(a)),u()):a.slice()},m.range=function(e){return arguments.length?(s=Ut.call(e),u()):s.slice()},m.rangeRound=function(e){return s=Ut.call(e),l=qn,u()},m.clamp=function(e){return arguments.length?(c=e?Fn(a):$n,m):c!==$n},m.interpolate=function(e){return arguments.length?(l=e,u()):l},m.unknown=function(e){return arguments.length?(n=e,m):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function Hn(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Yn(e){return(e=Hn(Math.abs(e)))?e[1]:NaN}var Wn,Xn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kn(e){if(!(t=Xn.exec(e)))throw new Error("invalid format: "+e);var t;return new Gn({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 Gn(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 Jn(e,t){var n=Hn(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Kn.prototype=Gn.prototype,Gn.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 Zn={"%":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 Jn(100*e,t)},r:Jn,s:function(e,t){var n=Hn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Wn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Hn(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 Qn(e){return e}var er,tr,nr,rr=Array.prototype.map,ir=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function or(e){var t=void 0===e.grouping||void 0===e.thousands?Qn:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(rr.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?Qn:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(rr.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Kn(e)).fill,u=e.align,m=e.sign,d=e.symbol,p=e.zero,h=e.width,f=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(f=!0,v="g"):Zn[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===c&&"="===u)&&(p=!0,c="0",u="=");var S="$"===d?n:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",M="$"===d?r:/[%p]/.test(v)?a:"",E=Zn[v],x=/[defgprs%]/.test(v);function b(e){var n,r,a,d=S,b=M;if("c"===v)b=E(e)+b,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:E(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==m&&(C=!1),d=(C?"("===m?m:s:"-"===m||"("===m?"":m)+d,b=("s"===v?ir[8+Wn/3]:"")+b+(C&&"("===m?")":""),x)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){b=(46===a?i+e.slice(n+1):e.slice(n))+b,e=e.slice(0,n);break}}f&&!p&&(e=t(e,1/0));var A=d.length+e.length+b.length,N=A<h?new Array(h-A+1).join(c):"";switch(f&&p&&(e=t(N+e,N.length?h-b.length:1/0),N=""),u){case"<":e=d+e+b+N;break;case"=":e=d+N+e+b;break;case"^":e=N.slice(0,A=N.length>>1)+d+e+b+N.slice(A);break;default:e=N+d+e+b}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),b.toString=function(){return e+""},b}return{format:c,formatPrefix:function(e,t){var n=c(((e=Kn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Yn(t)/3))),i=Math.pow(10,-r),o=ir[8+r/3];return function(e){return n(i*e)+o}}}}function ar(e,t,n,r){var i,o=qt(e,t,n);switch((r=Kn(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Yn(t)/3)))-Yn(Math.abs(e)))}(o,a))||(r.precision=i),nr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yn(t)-Yn(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Yn(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return tr(r)}function sr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Dt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return ar(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=Dt(s,l,n))>0?r=Dt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Dt(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function lr(){var e=Un($n,$n);return e.copy=function(){return jn(e,lr())},Pt.apply(e,arguments),sr(e)}er=or({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),tr=er.format,nr=er.formatPrefix;var cr=new Date,ur=new Date;function mr(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return mr(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(i.count=function(t,r){return cr.setTime(+t),ur.setTime(+r),e(cr),e(ur),Math.floor(n(cr,ur))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var dr=mr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});dr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mr(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):dr:null},dr.range;var pr=6e4,hr=36e5,fr=864e5,gr=6048e5,yr=mr(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()});yr.range;var vr=mr(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())*pr)/fr},function(e){return e.getDate()-1});function Sr(e){return mr(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())*pr)/gr})}vr.range;var Mr=Sr(0),Er=Sr(1),xr=Sr(2),br=Sr(3),Cr=Sr(4),Ar=Sr(5),Nr=Sr(6);Mr.range,Er.range,xr.range,br.range,Cr.range,Ar.range,Nr.range;var Or=mr(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()});Or.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr(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},Or.range;var Tr=mr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*pr)},function(e,t){return(t-e)/pr},function(e){return e.getUTCMinutes()});Tr.range;var Lr=mr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*hr)},function(e,t){return(t-e)/hr},function(e){return e.getUTCHours()});Lr.range;var Rr=mr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/fr},function(e){return e.getUTCDate()-1});function Ir(e){return mr(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)/gr})}Rr.range;var kr=Ir(0),wr=Ir(1),Dr=Ir(2),qr=Ir(3),Pr=Ir(4),zr=Ir(5),$r=Ir(6);kr.range,wr.range,Dr.range,qr.range,Pr.range,zr.range,$r.range;var _r=mr(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()});_r.range;var Fr=mr(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 Br(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 Vr(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function jr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Fr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr(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},Fr.range;var Ur,Hr,Yr={"-":"",_:" ",0:"0"},Wr=/^\s*\d+/,Xr=/^%/,Kr=/[\\^$*+?|[\]().{}]/g;function Gr(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Jr(e){return e.replace(Kr,"\\$&")}function Zr(e){return new RegExp("^(?:"+e.map(Jr).join("|")+")","i")}function Qr(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function ei(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ti(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ni(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ri(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ii(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function oi(e,t,n){var r=Wr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ai(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function si(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function li(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function ci(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ui(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function mi(e,t,n){var r=Wr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function di(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pi(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function hi(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function fi(e,t,n){var r=Wr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gi(e,t,n){var r=Wr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yi(e,t,n){var r=Xr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function vi(e,t,n){var r=Wr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Si(e,t,n){var r=Wr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Mi(e,t){return Gr(e.getDate(),t,2)}function Ei(e,t){return Gr(e.getHours(),t,2)}function xi(e,t){return Gr(e.getHours()%12||12,t,2)}function bi(e,t){return Gr(1+vr.count(Or(e),e),t,3)}function Ci(e,t){return Gr(e.getMilliseconds(),t,3)}function Ai(e,t){return Ci(e,t)+"000"}function Ni(e,t){return Gr(e.getMonth()+1,t,2)}function Oi(e,t){return Gr(e.getMinutes(),t,2)}function Ti(e,t){return Gr(e.getSeconds(),t,2)}function Li(e){var t=e.getDay();return 0===t?7:t}function Ri(e,t){return Gr(Mr.count(Or(e)-1,e),t,2)}function Ii(e){var t=e.getDay();return t>=4||0===t?Cr(e):Cr.ceil(e)}function ki(e,t){return e=Ii(e),Gr(Cr.count(Or(e),e)+(4===Or(e).getDay()),t,2)}function wi(e){return e.getDay()}function Di(e,t){return Gr(Er.count(Or(e)-1,e),t,2)}function qi(e,t){return Gr(e.getFullYear()%100,t,2)}function Pi(e,t){return Gr((e=Ii(e)).getFullYear()%100,t,2)}function zi(e,t){return Gr(e.getFullYear()%1e4,t,4)}function $i(e,t){var n=e.getDay();return Gr((e=n>=4||0===n?Cr(e):Cr.ceil(e)).getFullYear()%1e4,t,4)}function _i(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Gr(t/60|0,"0",2)+Gr(t%60,"0",2)}function Fi(e,t){return Gr(e.getUTCDate(),t,2)}function Bi(e,t){return Gr(e.getUTCHours(),t,2)}function Vi(e,t){return Gr(e.getUTCHours()%12||12,t,2)}function ji(e,t){return Gr(1+Rr.count(Fr(e),e),t,3)}function Ui(e,t){return Gr(e.getUTCMilliseconds(),t,3)}function Hi(e,t){return Ui(e,t)+"000"}function Yi(e,t){return Gr(e.getUTCMonth()+1,t,2)}function Wi(e,t){return Gr(e.getUTCMinutes(),t,2)}function Xi(e,t){return Gr(e.getUTCSeconds(),t,2)}function Ki(e){var t=e.getUTCDay();return 0===t?7:t}function Gi(e,t){return Gr(kr.count(Fr(e)-1,e),t,2)}function Ji(e){var t=e.getUTCDay();return t>=4||0===t?Pr(e):Pr.ceil(e)}function Zi(e,t){return e=Ji(e),Gr(Pr.count(Fr(e),e)+(4===Fr(e).getUTCDay()),t,2)}function Qi(e){return e.getUTCDay()}function eo(e,t){return Gr(wr.count(Fr(e)-1,e),t,2)}function to(e,t){return Gr(e.getUTCFullYear()%100,t,2)}function no(e,t){return Gr((e=Ji(e)).getUTCFullYear()%100,t,2)}function ro(e,t){return Gr(e.getUTCFullYear()%1e4,t,4)}function io(e,t){var n=e.getUTCDay();return Gr((e=n>=4||0===n?Pr(e):Pr.ceil(e)).getUTCFullYear()%1e4,t,4)}function oo(){return"+0000"}function ao(){return"%"}function so(e){return+e}function lo(e){return Math.floor(+e/1e3)}!function(e){Ur=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Zr(i),u=Qr(i),m=Zr(o),d=Qr(o),p=Zr(a),h=Qr(a),f=Zr(s),g=Qr(s),y=Zr(l),v=Qr(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:Mi,e:Mi,f:Ai,g:Pi,G:$i,H:Ei,I:xi,j:bi,L:Ci,m:Ni,M:Oi,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:so,s:lo,S:Ti,u:Li,U:Ri,V:ki,w:wi,W:Di,x:null,X:null,y:qi,Y:zi,Z:_i,"%":ao},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:Fi,e:Fi,f:Hi,g:no,G:io,H:Bi,I:Vi,j:ji,L:Ui,m:Yi,M:Wi,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:so,s:lo,S:Xi,u:Ki,U:Gi,V:Zi,w:Qi,W:eo,x:null,X:null,y:to,Y:ro,Z:oo,"%":ao},E={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:ui,e:ui,f:gi,g:ai,G:oi,H:di,I:di,j:mi,L:fi,m:ci,M:pi,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:li,Q:vi,s:Si,S:hi,u:ti,U:ni,V:ri,w:ei,W:ii,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:ai,Y:oi,Z:si,"%":yi};function x(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Yr[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function b(e,t){return function(n){var r,i,o=jr(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Vr(jr(o.y,0,1))).getUTCDay(),r=i>4||0===i?wr.ceil(r):wr(r),r=Rr.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Br(jr(o.y,0,1))).getDay(),r=i>4||0===i?Er.ceil(r):Er(r),r=vr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Vr(jr(o.y,0,1)).getUTCDay():Br(jr(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Vr(o)):Br(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=E[i in Yr?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return S.x=x(n,S),S.X=x(r,S),S.c=x(t,S),M.x=x(n,M),M.X=x(r,M),M.c=x(t,M),{format:function(e){var t=x(e+="",S);return t.toString=function(){return e},t},parse:function(e){var t=b(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=x(e+="",M);return t.toString=function(){return e},t},utcParse:function(e){var t=b(e+="",!0);return t.toString=function(){return e},t}}}(e),Ur.format,Ur.parse,Hr=Ur.utcFormat,Ur.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,uo=6e4,mo=36e5,po=864e5,ho=2592e6,fo=31536e6;function go(e){return new Date(e)}function yo(e){return e instanceof Date?+e:+new Date(+e)}function vo(e,t,n,r,i,o,a,s,l){var c=Un($n,$n),u=c.invert,m=c.domain,d=l(".%L"),p=l(":%S"),h=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),S=l("%Y"),M=[[a,1,co],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,uo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,mo],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,po],[r,2,1728e5],[n,1,6048e5],[t,1,ho],[t,3,7776e6],[e,1,fo]];function E(s){return(a(s)<s?d:o(s)<s?p:i(s)<s?h:r(s)<s?f:t(s)<s?n(s)<s?g:y:e(s)<s?v:S)(s)}function x(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Lt(function(e){return e[2]}).right(M,o);a===M.length?(i=qt(n/fo,r/fo,t),t=e):a?(i=(a=M[o/M[a-1][2]<M[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(qt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?m(jt.call(e,yo)):m().map(go)},c.ticks=function(e,t){var n,r=m(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=x(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?E:l(t)},c.nice=function(e,t){var n=m();return(e=x(e,n[0],n[n.length-1],t))?m(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):c},c.copy=function(){return jn(c,vo(e,t,n,r,i,o,a,s,l))},c}function So(){return Pt.apply(vo(Fr,_r,kr,Rr,Lr,Tr,yr,dr,Hr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Mo={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"}}},Eo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var xo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=Mo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Eo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Eo(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function bo({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Co;function Ao(){Co=Co||document.createElement("canvas").getContext("2d")}const No={measureTextWidth(e){Ao();const{width:t}=Co.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Ao();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,m,d=e?e.split(/\s+/):[],p=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Co.font=n),o=0;o<a.length;o++){for(m=a[o]||"",d=m.split(/\s+/),[p]=d,u="",i=1;i<d.length;i++)if(l=`${p} ${d[i]}`,c=No.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(p),p=d[i]):p=l,"number"==typeof r&&s.length>=r){u=d.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(p):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${p} ${u}`}return s},wordWrap(e,t,n,r,i){if(Ao(),!e||!e.length)return[];n&&(Co.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||No.measureTextWidth(c)<=t?o.push(c):(s=No.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?No.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return o.forEach((e,t,n)=>{n[t]=e?e.trim():e}),o.length>r?(o=o.splice(0,r),o[o.length-1]=No.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&No.measureTextWidth(c)>t&&(o[o.length-1]=No.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){Ao();let i,o,a,s,l=e;const c=No.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(Co.font=n),e&&t){if(No.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,No.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;Ao();let o,a=e,s="",l=[];if(No.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(No.measureTextWidth(a)<=t));i--);return(!i&&!a||No.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(No.measureTextWidth(s)>t?(s=No.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,r)=>(Ao(),e&&t?(n&&(Co.font=n),No.explodeWord(e,t,r,Math.max(1,No.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?No.lineWrap(e,t,n,r):[e],o=No.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Ao(),e&&(Co.font=e),1.5*No.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Ao(),t&&(Co.font=t);const s=No.getFontHeight(),l=a*s;let c=[],u=0,m=[];if(o<s)return[];const d=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(e=>{u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(e=>{c.push(Number.isNaN(e)||e<=0?d-u:e)})):c=[Number.isNaN(r)||r<=0?d:Math.min(d,r)],Array.isArray(e)?e.forEach((e,n)=>{m.length<d&&(m=m.concat(No.wrapText(e,i,t,c[n])))}):m=No.wrapText(e,i,t,c[0],n),m}},Oo={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,m=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,m=t<.5?180:0),a(re({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}},To=re.bind(null,!0),Lo={},{isArray:Ro}=Array;function Io(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ko(e){return void 0===e}function wo(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Do(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=ko(e[r||t])?o:e[t],e=e[r||t]}),e}function qo(e,t){return t?Object.keys(e).filter(t=>void 0!==e[t]).length:Object.keys(e).length}function Po(e,t,n){let r=!0;if(Io(e)&&Io(t))return qo(e,n)===qo(t,n)&&(Object.keys(e).forEach(i=>{Po(e[i],t[i],n)||(r=!1)}),r);if(Ro(e)&&Ro(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!Po(e[r],t[r],n))return!1;return!0}return e===t}Lo.compare=Po,Lo.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(i=>{const o=function(e){return e?To({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;Po(o,a)||wo(t,i)||(ko(a)?r.push({op:"add",path:s,value:o}):Io(o)&&Io(a)?r=r.concat(Lo.generate(a,o,s)):Ro(o)&&Ro(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&ko(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Po(t,i))return r;if(!ko(t[0])&&ko(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(Lo.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))}),Object.keys(e).forEach(i=>{ko(t[i])&&!wo(e,i)&&r.push({op:"remove",path:`${n}/${i}`})}),r},Lo.apply=function(e,t){t.forEach(t=>{let n=Do(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(Ro(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Ro(i)&&Ro(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(Io(i)&&Io(t.value))a=i,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!wo(a,e)&&delete a[e]}),To(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=Do(e,t.from);Ro(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(Ro(n)?n.splice(+r,1):delete n[r]);var a})},Lo.clone=function(e){return To({},e)},Lo.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Lo.updateObject=function(e,t){Object.keys(e).length?Lo.apply(e,Lo.generate(e,t)):To(e,t)};const zo=Math.log(10);function $o(e){return 10**e}const _o={pow10:$o,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/zo,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))/zo),r=e/$o(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*$o(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/zo);const r=e/$o(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*$o(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return $o(Math.floor(Math.log(Math.abs(e))/zo))},getFraction(e){if(0===e)return 0;return e/$o(Math.floor(Math.log(Math.abs(e))/zo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/zo),r=e/$o(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*$o(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},Fo=[[2,4,6],[2,4],[3]],Bo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Vo(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function jo(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Vo(e[r],t,n)}!function(){let e,t;for(jo(Fo,1,10),e=0;e<Bo.length;e++)if(Bo[e])for(t=0;t<Bo[e].length;t++)Array.isArray(Bo[e][t])&&jo(Bo[e][t])}();const Uo={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=Uo.findSegmentPositionMeetMin(e,t);return Uo.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=Uo.findSegmentPositionMeetMax(e,n);return Uo.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=Uo.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=Uo.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let c,u=0;for(o=i;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,Uo.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=i;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0)){if(0===i){const r=e[0];return void(r.position=Uo.findSegmentPositionMeetMaxThenMin(r,t,n))}Uo.layoutPositionFromMin(e,t,n,r),Uo.adjustPositionFromMax(e,t,n,r)}}},Ho=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},Yo=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,Wo=e=>e.filter(Yo),Xo=(e,t)=>Wo(de.getValue(e,t,[])),Ko=e=>Yo(e)&&(!1!==e.showValue||!1!==e.showLabel),Go=e=>e.filter(Ko),Jo=(e,t)=>Go(de.getValue(e,t,[])),Zo=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,Qo=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},ea=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},ta=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},na=({value:e,qMin:t})=>"NaN"!==t&&e<t,ra=({value:e,qMax:t})=>"NaN"!==t&&e>t,ia={isRefLineVisible:Yo,getVisibleRefLines:Wo,getRefLines:Xo,getMeasureRefLines:e=>Xo(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:Xo(e,"refLine.dimRefLines"),isRefLineLabelVisible:Ko,getVisibleRefLineLabels:Go,getRefLineLabels:Jo,getMeasureRefLineLabels:e=>Jo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:Jo(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=Ho(s,i,o,a.meta.groupSize??a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=Ho(s,i,o,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===c?s(n):c)+l}return l=Ho(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=de.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():de.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);if(void 0===l?.qArea?.qTop)return o;const c=s?"qData.0.qSubNodes":"qMatrix",u=de.getValue(l,c,[]),m=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+d,r=t[m];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+d,a=n[m];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}],dataNode:u[t]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+d,r=t[m];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:Zo,extractInfoFromInputValue:Qo,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Zo({refLineLayout:e,layoutService:n});return Qo(r,t,"id")},isDiscreteMinOutOfBounds:ea,isDiscreteMaxOutOfBounds:ta,isContinuousMinOutOfBounds:na,isContinuousMaxOutOfBounds:ra,isOutOfRange:({value:e,qMin:t,qMax:n})=>na({value:e,qMin:t})||ra({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&ta({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&ea({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},oa=({label:e,labelStyle:t})=>[e?.fontStyle||t?.fontStyle,e?.fontWeight||t?.fontWeight,e?.fontSize||t?.fontSize,e?.fontFamily||t?.fontFamily].filter(e=>!!e).join(" ");function aa(e){return e.showValue?`… ${e.valueString}`:"…"}function sa(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=oa({label:i,labelStyle:t});i.lines=No.tokenize(i.title,o,aa(i),3,n),i.maxNumLines=i.lines.length}}function la({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=No.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function ca({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map(e=>la({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i})),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function ua(e,t="value"){e.sort((e,n)=>e[t]-n[t])}const ma=3,da=2;function pa({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const ha=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ia.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ia.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ia.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ia.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},fa={hasEngineFormat:pa,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=ia.getInvert({orientation:i,rtl:o,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:m}=r.meta;let d,p;if(s&&m){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");d=e.qMin,p=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:c,valueInfo:m}=o,h=ha({label:o,dataPages:u,qMin:d,qMax:p});o.scaledValue=1===h?l?-.1:1.1:-1===h?l?1.1:-.1:ia.getScaledPosition({scale:t,size:n,value:s,valueInfo:m,align:c,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=pa({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Ne.lrm}(${o})${Ne.lrm}`,r.title=fa.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=pa({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Ne.lrm}(${o})${Ne.lrm}`,n.title=fa.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Ne.lrm}(${o})${Ne.lrm}`,n.title=fa.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map(n=>t(n,e).width)),getMaxTextWidth(e){const t=e.map(e=>e.totalWidth);return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach(e=>{t+=e.maxNumLines}),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter(e=>e.maxNumLines===t),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=fa.getTotalNumLines(e)-r;if(t<=0)return;fa.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,fa.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:m,rtl:d,layoutService:p,isContinuous:h,isDimension:f}){const g=e.map(e=>e),y=n;fa.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:p,orientation:u,rtl:d,isContinuous:h,isDimension:f}),ua(e,"center"),fa.addLabelsNeighborInfo(e,r,i,o),sa(e,a,s),fa.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===u&&(fa.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=oa({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=No.tokenize(i.title,o,aa(i),i.maxNumLines,n))}}(e,a,s)),fa.addLabelsSize(e,s,l,m),fa.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=i,{fontSize:m,fontFamily:d,fontStyle:p,fontWeight:h,textDecoration:f,background:g}=t;let y=[];return e.forEach(e=>{const{lines:t}=e,r=t.length,i=t.map((t,i)=>{const g={type:"text",text:t,title:la({title:e.title,font:a,ellipsis:aa(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||m,fontFamily:e.fontFamily||d,fontStyle:e.fontStyle||p,fontWeight:e.fontWeight||h,textDecoration:e.textDecoration||f,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g});e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=ma,padding:c={}}=a,{top:u=da,bottom:m=da,left:d=da,right:p=da}=c,h=s.length,f={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(d+p),height:i.height+(u+m),value:i.value,dock:r};return f[n]=e,f[t]=i.segment.position,f.x-=i.width/2+d,f.y-=h*o/2+u,f}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(i)}),y}};function ga(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function ya(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return fa.getMaxTextWidth(e)>o&&(sa(e,t,o),a=Math.max(...e.map(e=>e.lines.length))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,fa.getMaxTextWidth(e))+n+r}(t,n)}function va(e,t){return t?e.domain():[0,1]}function Sa(e,t,n,r="value"){let i=e.filter(e=>e[r]>=t);i=i.filter(e=>e[r]<=n);const o=e.filter(e=>e[r]<t),a=e.filter(e=>e[r]>n);return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function Ma(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ea(e,t){return e>9?t[1]:t[0]}function xa({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:m,majorAxis:d,minorAxis:p,minorDimension:h,dock:f}=s,g=i[h],y=Oo.createOob({oob:Oo.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:m,symbol:o});y.dock=f;const v=`c${d}`,S=`c${p}`,M={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:f};M[S]=g/2,M[v]=a;const E={type:"text",text:u>9?"9+":u,title:ca({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:f};return E[p]=g/2,E[d]=a,[y,M,E]}const ba=e=>{const t=oa({labelStyle:e}),n=No.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},Ca=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 Aa={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=Ca(this.settings.labels),s=ga(this.chart,this.settings.formatter,e);fa.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=va(t,n);return Sa(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Sa(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let m;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},u&&u.length){const e=ba(t.label),{dock:n}=this.settings.layout;return fa.measureLabelsWidth(u,this.measureText),m=ya(n,u,e),m}const d=Ma(this.measureText),p=l?Ea(l,d):0,h=c?Ea(c,d):0;return m=Math.max(p,h),m},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,c=Ca(this.settings.labels),{dock:u,rtl:m}=this.settings.layout,{padding:d}=n.label,p=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),h=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,p,d),{orientation:f,majorDimension:g}=p,{majorSize:y}=h,v=ba(n.label),{font:S,lineHeight:M,gap:E,maxLabelWidth:x}=v,b=ga(this.chart,this.settings.formatter,e),C=y;fa.addLabelTitles({labels:c,formatter:b,isContinuous:o,canBeContinuous:l,localeInfo:s}),fa.calculateLabelPositions({labels:c,scale:e,size:C,layoutService:r,orientation:f,rtl:m,isContinuous:o,isDimension:a});const[A,N]=va(e,o),{filteredLabels:O,lowerOobs:T,upperOobs:L,lowerCircleSize:R,upperCircleSize:I,lowerOobSpace:k,upperOobSpace:w}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:m,filteredLabels:d}=Sa(e,t,n,c),p="scaledValue"!==c&&ia.getInvert({orientation:r,rtl:i,isContinuous:o}),h=function(e,t,n){return n?t:e}(m,u,p),f=function(e,t,n){return n?e:t}(m,u,p),g=h.length,y=f.length,v=Ma(l),S=Ea(g,v),M=Ea(y,v),E=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,S,r,s),x=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,M,r,s);return{filteredLabels:d,lowerOobs:h,upperOobs:f,lowerCircleSize:S,upperCircleSize:M,lowerOobSpace:E,upperOobSpace:x}}({labels:c,minValue:A,maxValue:N,orientation:f,rtl:m,isContinuous:o,style:n,padding:d,measureText:this.measureText,prop:o?"value":"scaledValue"}),D=k,q=y-w;ua(T),ua(L);const P=xa({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+R/2,areaProps:p,radius:R/2,font:S}),z=xa({alignment:1,dockValue:1,oobs:L,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+I/2),areaProps:p,radius:I/2,font:S});fa.addLabelsInfo({labels:O,scale:e,majorSize:y,lowerLimit:D,upperLimit:q,labelStyle:v,lineHeight:M,gap:E,maxLabelWidth:x,majorDimension:g,orientation:f,measureText:this.measureText,rtl:m,layoutService:r,isContinuous:o,isDimension:a}),Uo.layout(O.map(e=>e.segment),D,q,n.label.gap);const $=O.filter(e=>Uo.isInside(e.segment,D,q,o));return fa.createLabels({labels:$,style:n.label,maxLabelWidth:x,areaProps:p,area:h,lineHeight:M,font:S,theme:i}).concat([...P,...z])}};var Na={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function Oa(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=re(!0,{},{...n,qHyperCube:{...s}}),{dataRelatedPropertiesPaths:c}=Na;function u(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==b(e,t)&&C(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;b(e,r,[]).forEach(e=>{o&&u(e,o)})}return c.forEach(e=>{u(l,e)}),l}var Ta={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,m=a.height-s.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)}),"left"!==i&&"right"!==i||o.forEach(e=>{"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","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"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","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)}):n||r?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+m)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach(e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}})}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Oa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Oa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:La,extractInfoFromInputValue:Ra,resolveValue:Ia}=ia;var ka={resolveValue:Ia,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=La({refLineLayout:e,layoutService:n});return Ra(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=La({refLineLayout:e,layoutService:n});return Ra(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=La({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=La({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const wa=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:m})=>{const d={dir:l,line:{strokeWidth:t?.style?.lineThickness||2,strokeDasharray:t?.style?.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(d.scale=s,d.value=t.refLineExpr.value):(d.valueInfo=ka.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),d.value=()=>{const e=ia.getScaledPosition({scale:a.scale(s),value:ka.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:d.valueInfo,size:a.component(u)?.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:m});return Number.isNaN(e)?void 0:e}),d};function Da({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:m,path:d,minimumLayoutMode:p}){const h=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!h.length)return!1;const f={key:u,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return h.forEach(o=>{f.lines[l].push(wa({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:m,isContinuous:y}))}),f}const qa=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:m,localeInfo:d})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:m,isDimension:e,localeInfo:d,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Ta.refLineLabels.trackBy,compensateForLayoutChanges:Ta.refLineLabels.compensateForLayoutChanges}}),Pa=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:m,fontStyle:d,fontWeight:p,textDecoration:h}=c||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:m,fontStyle:d,fontWeight:p,textDecoration:h,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(f.background={fill:s}),a?(f.scale=i,f.value=e.refLineExpr.value):(f.value=()=>ka.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>ka.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>ka.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function za({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:m,key:d,path:p}){const h=e?t.dimensionRefLineLabels:p?t.query.getRefLineLabels(p):t.measureRefLineLabels;if(!h.length)return[];const f=[],g=!e||n.meta.isContinuous,y=h.map(e=>Pa({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g}));return f.push(qa({isDimension:e,rtl:m,style:s,dock:o,key:d,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:c,isContinuous:g,localeInfo:u})),f}function $a({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=ge.dimensionless(o),l=ia.getMeasureRefLines(o),c=ia.getDimensionRefLines(o,s),u=ia.getMeasureRefLineLabels(o),m=ia.getDimensionRefLineLabels(o,s);let d={},p={};const h=()=>!(!c||!c.length)&&!c.every(t=>{const o=ia.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return ia.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!p[t])return!1;if(!n&&i){const n={valueInfo:p[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return ia.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)}),f={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:m,dimensionRefLineInfo:p,dimensionValuesInfo:d,query:{getRefLines:e=>ia.getRefLines(o,e),getRefLineLabels:e=>ia.getRefLineLabels(o,e)},update:()=>{p=f.dimensionRefLineInfo,h()&&(d=ia.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=d,c.forEach(t=>{const n=ia.getInputValue({refLineLayout:t,layoutService:e});d[n]&&(p[n]?(p[n].innerValues=d[n].innerValues,p[n].minOrder=Math.min(p[n].minOrder,d[n].minOrder),p[n].maxOrder=Math.max(p[n].maxOrder,d[n].maxOrder),p[n].isMinOrderOk=p[n].isMinOrderOk||d[n].isMinOrderOk,p[n].isMaxOrderOk=p[n].isMaxOrderOk||d[n].isMaxOrderOk):p[n]={id:d[n].id,qText:d[n].qText,innerValues:d[n].innerValues,minOrder:d[n].minOrder,maxOrder:d[n].maxOrder,isMinOrderOk:d[n].isMinOrderOk,isMaxOrderOk:d[n].isMaxOrderOk},p[n].numInnerValues=(p[n].maxOrder||0)-(p[n].minOrder||0)+1)}))}};return f.update(),f}function _a(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Fa({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=A(n);return r.setAlpha(e?.alpha>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}function Ba({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:r}=e,i=""===e.measureValue?void 0:+e.measureValue;if(_o.isNumber(i))return i;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;return _o.isNumber(s)&&!(s>=a||0===o)&&1===o?t[r]?.dataNode[s+1]?.qNum:void 0}const Va=2,ja=12,Ua={index:-1,color:"#595959"};function Ha({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:c,mainComponentKey:u,data:m,key:d}){if(!Array.isArray(m)||0===m.length)return!1;const p={resolveUIColor:r.getMain().getPaletteColor},h=i.getTheme(),f="horizontal"===a.meta.major.orientation,g=!(!f||!s),{canBeContinuous:y,isContinuous:v,isButterfly:S}=o.meta,M=o.getLayout(),E=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=A(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const r=n?.bgColor?.color;return Fa({color:r,colorModel:t})}({layout:M,colorModel:p})??h.getStyle("object","","backgroundColor"),x=ia.getDimensionValuesInfo({layout:M,canBeContinuous:y,discreteModel:n,layoutService:o}),b=v?m:m.filter(e=>!!x[e.dimensionValue]),C={};b.map(e=>e.dimensionValue).forEach(e=>{x[e]&&(C[e]?(C[e].innerValues=x[e].innerValues,C[e].minOrder=Math.min(C[e].minOrder,x[e].minOrder),C[e].maxOrder=Math.max(C[e].maxOrder,x[e].maxOrder),C[e].isMinOrderOk=C[e].isMinOrderOk||x[e].isMinOrderOk,C[e].isMaxOrderOk=C[e].isMaxOrderOk||x[e].isMaxOrderOk):C[e]={id:x[e].id,dataNode:x[e].dataNode,qText:x[e].qText,innerValues:x[e].innerValues,minOrder:x[e].minOrder,maxOrder:x[e].maxOrder,isMinOrderOk:x[e].isMinOrderOk,isMaxOrderOk:x[e].isMaxOrderOk},C[e].numInnerValues=(C[e].maxOrder||0)-(C[e].minOrder||0)+1)}),b.forEach(e=>{const t=Ba({point:e,dimensionValueInfo:C,layoutService:o});if(e.validMeasureValue=S&&1===e.measureIndex?-t:t,o?.meta?.isStacked){const t=C[e.dimensionValue]?.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){const n=t.slice(0,e.measureIndex+2),r=t[e.measureIndex+1]?.qNum;if("number"==typeof r&&0!==r){const t=Math.sign(r);e.validMeasureValue=n.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}}const n=Fa({colorModel:p,color:e.style?.label?.color||Ua}),r=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=r?n:void 0,e.labelColor=r?i.getTheme().getContrastingColorTo(n):n,e.hasBackground=r,e.maxLabelWidth=100});const N={scale:l,fn:({datum:t})=>{const n=e.scale(l),r=t.value.dimensionValue;if(v)return n("string"==typeof r?""===r?void 0:+r:r);if(void 0===C[r])return;return ia.getScaledPosition({scale:n,value:C[r].id,valueInfo:C[r],size:e.component(u)?.rect[f?"width":"height"],align:"center",invert:g,layoutService:o,isContinuous:v})}},O={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"point",data:b,settings:{x:f?N:O,y:f?O:N,strokeWidth:({datum:e})=>e.value.style?.outlineWidth??e.value.style?.lineThickness??Va,stroke:({datum:e})=>Fa({colorModel:p,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?Fa({colorModel:p,color:e.value.style?.fill}):E,size:({datum:e})=>`${e.value.style?.dataPointSize??ja}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:Ta.points.compensateForLayoutChanges}}}const Ya=3,Wa="monotone";const Xa=e=>e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0,Ka=!0,Ga=!1,Ja={index:0,color:"none"},Za={index:-1,color:"#595959"},Qa={index:-1,color:"#595959"},es=e=>{!e.dimensionValue?.qValueExpression&&e.dimensionValue?.qStringExpression&&(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},ts=e=>{e.dimensionValue?.qValueExpression&&!e.dimensionValue?.qStringExpression&&(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},ns=e=>{switch(e.type){case"image":break;case"point":delete e.points,delete e.style?.lineType,delete e.showPoints,delete e.style?.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.dataPointSize,delete e.style?.fill,delete e.style?.symbol,delete e.style?.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.lineType,delete e.style?.lineThickness,delete e.style?.lineColor,delete e.style?.dataPointSize,delete e.style?.fill}},rs=({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===Xa(n.layout),convertFunctions:{get:(e,t,n,r)=>void 0===r.measureValue?1:0,set(e,t,n,r,i){0===e?(i.measureValue=0,delete i.measureIndex):(i.measureIndex=0,delete i.measureValue)}},options:[{value:0,translation: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===Xa(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===Xa(n.layout),invalid:(e,t,n)=>{return e.measureIndex<0||e.measureIndex>=(r=n.layout,r?.qHyperCube?.qMeasureInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0);var r}}}),is=e=>({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:Ga,showAlpha:Ka,defaultValue:Ja},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:Ga,showAlpha:Ka,defaultValue:Za},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:Ga,showAlpha:Ka,defaultValue:Qa},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0},outlineWidth:{component:"slider",type:"number",expression:"optional",ref:"style.outlineWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:2,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:e?12:10,min:3,max:30,step:1}}),os=({translator:e,pluginOptions:t,supportNewStyles:n=!1})=>{const r={type:"array",ref:"plugins",filter:e=>e.filter(e=>["point","line"].includes(e.type)),translation:"properties.shapes",show:e=>(e?.qHyperCubeDef?.qDimensions||[]).length>0,itemTitleRef:e=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.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=[]),ns(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(ns),ce.canBeContinuous(n.layout)?e.plugins.forEach(e=>{switch(e.type){case"point":es(e);break;case"line":t=e,t.points?.forEach(es)}var t}):e.plugins.forEach(e=>{switch(e.type){case"point":ts(e);break;case"line":t=e,t.points?.forEach(ts)}var t}))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:rs({translator:e})},styleSection:{component:"items",items:is(n)}}},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)=>e.get("properties.plugins.Points.Point",n+1)+(t.label?.value?`: ${t.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:rs({translator:e})},styleSection:{component:"items",items:is(n),show:(e,t,n)=>{const r=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return r?.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:Ga,showAlpha:Ka,defaultValue:Za},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:n?3: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:n?"monotone":"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return r};var as=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,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},ss=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}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 as.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return as.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||as.newInstanceIfNeeded(e,t,this._value)}},ls=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 ss);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 ls;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="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["¬in"]="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[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"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 cs={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",PRIMARY_LINE:"stacked-collection-primary-line",SECONDARY_LINE:"stacked-collection-secondary-line",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_PRIMARY_LINE:"reduced-collection-primary-line",REDUCED_SECONDARY_LINE:"reduced-collection-secondary-line",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},us={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const ms={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 ds(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const ps={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise(a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout(()=>{i(s),a({height:20,width:20,imageError:!0})},3e3)})}};async function hs(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+r+i+o}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await ps.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function fs(e,t,n,r){const{app:i,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const m=r.data?.customTooltipAttrExps?.value||[];let d;if(-1!==u&&m[u]&&(d=m[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return hs(s,l,i);if("url"===c)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&e?.getImage&&ds(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await ps.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch{}else{const{height:e,width:t,imageError:n}=await ps.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(i,o,s,l,d);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&d&&d.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(ds(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await ps.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch{}return i}(i,n[u],l,d)}return[]}const gs={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(fs(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},ys={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await gs.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>gs.checkIfPromisesExist({customTooltipModel:e})};const vs=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,r=e?.qHyperCubeDef?.qMeasures,i=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:ms.CHART.CHART_PARENT_TYPE,qId:ms.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},Ss=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:ms.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const Ms={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",r=ms.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:ms.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{const a=i,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Ms.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=ms.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const s=await async function({app:e,properties:t,customTooltipModel:n}){const r=n;r.miniChartToken.sessionObj?.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=ms.CHART.STATE,o=vs(t,i),a=await e.createSessionObject(o),s=Ss(t);if(a.id!==ms.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);r.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===a.id)return r.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:i});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(ms.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await i.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch{await Ms.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(Ms.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ms.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=ms.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function Es(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function xs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=ms.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function bs(e){const t=xs();return e.filter(e=>t[e.id])}const Cs={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach(t=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||i[t.type]){if(t.data?.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach(t=>{n=n.concat(e.findShapes(t).filter(e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]))}));const t=n.filter(e=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.label});t.length>0&&(r=r.concat(t[0]))}}),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=Cs.getAttrExprData(a);o.length||n.length?ys.handlePromises({customTooltipModel:i,nodes:Cs.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then(()=>{t.emit("show",e,n.length?{nodes:n}:void 0)}):t.emit("show",e,n.length?{nodes:n}:void 0)}else i?.miniChartToken?.alternateState&&Ms.hide({app:r.app,customTooltipModel:i}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>ys.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,r=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[r]||(n[r]=[]),n[r]},getAttrExprData(e){let t=[],n="";const r=e.qHyperCube?.qDimensionInfo||[];if(r.length>0){const i=r.length-1;t=e.qHyperCube?.qDimensionInfo?.[i]?.qAttrExprInfo||[],n=`qDimensionInfo/${i}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[ms.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[ms.CUSTOM.QUARANTINE]=[],e.forEach(e=>{r.quarantine[ms.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=r}(bs(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[ms.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[ms.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Es(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===bs(i).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...i,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=Es(e)||[];[...i,t].forEach(e=>{const t=bs(e.qAttributeExpressions||[]);t.length>0&&(r=t)});const o=xs(),a=i.map(e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter(e=>!o[e.id]),t}),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:e=>e.tooltip?.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:Ne.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ne.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function As(e,t,n,r){const i=t.qHyperCube?.[n]?.[r]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return a?(i.forEach((e,t)=>{const i=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===i?"NaN":function(e,t){let n;switch(e.id){case ms.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ms.CUSTOM.TITLE:case ms.CUSTOM.DESCRIPTION:case ms.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);o.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const Ns={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>As(t,e,r,n)}}};const Os={getCustomAttrExps(e,t,n){const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(i))return r;return function(e,t,n,r){const i={[ms.CUSTOM.TITLE]:!0,[ms.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=Cs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===ms.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===ms.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),r}(n,i.map(t=>Oe.getMeasure(e,t)),e,r)}};function Ts({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach(e=>{r.push(Os.getCustomAttrExps(n,e,t))}),r}(e,t,n);return r.reduce((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Ls}=ms;function Rs({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},m=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Cs,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),d="rtl"===c.direction,p=()=>{const e=!!u.properties?.qHyperCubeDef?.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return!(!t.tooltip||t.tooltip.auto||e)};return{setProperties:e=>{u.properties=e},isEnabled:()=>p(),hideBasic:()=>p()&&b(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{const r=Ts({dataset:e,nodes:n,layout:t});return{title:r.customTooltipInfoAttrExpsArr.find(e=>e.id===Ls.TITLE)?.title,description:r.customTooltipInfoAttrExpsArr.find(e=>e.id===Ls.DESCRIPTION)?.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>Cs.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>Cs.getImageRow(e,{h:t,rtl:d}),addImages:({nodes:r})=>{const i=Cs.getDataNodes(o,r),{attrExps:a}=Cs.getAttrExprData(t);return ys.handlePromises({customTooltipModel:m,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>!!(p()&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof r?.getEffectiveProperties),hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>Ms.createContainer({layout:t,ctx:{h:e,rtl:d}}),createLimitationRow:()=>Cs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),d),show:({nodes:e,properties:t})=>Ms.show({app:n,properties:t,selectedNodes:e,customTooltipModel:m,rtl:d}),hasAlternateState:()=>!!m.miniChartToken?.alternateState,hide:()=>Ms.hide({app:n,customTooltipModel:m}),destroy:()=>Ms.destroyVisualization({customTooltipModel:m})}}}function Is({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter(e=>e.type===us.TYPE.BAR),c=n.meta.isContinuous?s:a,u=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map(({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,reduceLabel:"none"},null:{fields:l.map(e=>({field:e.ref})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:Ns.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 ks({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1,isLineSeries:s=!1}){if(t.length||a){const{major:a,majorNumeric:l}=r.main,{isContinuous:c,isLineStacked:u}=o.meta,m=e=>"NaN"!==e.qNum?e.qNum:0,d=c?l:a,p=o.getLayoutValue("separateStacking",!0),h=[{key:e,data:{extract:t.map(({ref:e,refIndex:t,typeIndex:r,options:s},l)=>({source:n,field:a,value:c?e=>e.qNum:void 0,props:{major:{field:d},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?m:void 0,reduceLabel:"none"},start:0,line:l,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:Ns.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}}))}}];return s&&u&&(h[0].data.stack={stackKey:e=>e.value,value:e=>e.end.value,offset:p?"diverging":"none"},t.forEach((e,t)=>{const{props:n}=h[0].data.extract[t];n.point={field:n.end.field,label:n.end.label},n.end.value&&(n.point.value=n.end.value)})),h}return[]}function ws({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter(e=>e.type===us.TYPE.BAR),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map(e=>({field:e.ref})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"},sumOfPositives:{fields:a.map(e=>({field:e.ref})),value:e=>e.reduce((e,t)=>t>0?e+t:e,0),reduceLabel:"none"},sumOfNegatives:{fields:a.map(e=>({field:e.ref})),value:e=>e.reduce((e,t)=>t<0?e+t:e,0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const Ds={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var qs={OPTIONS:Ds,DEFAULT:Ds.MINI_CHART};function Ps({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,m=a.qArea.qHeight/s*c;if(m<o){const e=(o-m)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+m+e-c)),m=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:m}:{top:u,left:0,height:m}}})}}function zs({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const $s=e=>({miniChart:e===qs.OPTIONS.MINI_CHART.value,bar:e===qs.OPTIONS.BAR.value,none:e===qs.OPTIONS.NONE.value}),_s=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return $s(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return $s(qs.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return $s(!n&&(r||!r&&i)?qs.OPTIONS.NONE.value:qs.OPTIONS.MINI_CHART.value)};function Fs({layoutService:e,override:t}){const n=_s({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===qs.OPTIONS.MINI_CHART.value,n.bar=t.value===qs.OPTIONS.BAR.value,n.none=t.value===qs.OPTIONS.NONE.value),n}function Bs({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),m=t.component(e),d="horizontal"===o.meta.major.orientation,p=d?l-u.left-m.rect.computedInner.x:c-u.top-m.rect.computedInner.y,h=d?m.rect.computedInner.width:m.rect.computedInner.height,f=d&&a?h-p:p,g=Math.max(0,Math.min(f/h,1)),[y,v]=zs({layoutService:i,viewState:n,viewCache:r}),S=g<y,M=g>v,E=!S&&!M;return{pixel:f,relative:g,thumb:E?f-y*h:0,beforeThumb:S,afterThumb:M,onThumb:E}}}function Vs({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[m,d]=zs({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(d-m)*u}}}function js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Bs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Vs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Us="data-scrollbar-handle";function Hs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Us)||""}const Ys="scrollbarResize",Ws=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function Xs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Bs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Ys}`,options:{event:Ys,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Ys]=this[Ys]||{},Ws(t)&&Hs({e:t})&&(this[Ys].panningEvent=t.srcEvent),!!this[Ys].panningEvent))}},events:{[`${Ys}start`](n){n.preventDefault(),this[Ys]=this[Ys]||{},this[Ys].panningEvent&&t.component(e).emit("dragStart",this[Ys].panningEvent)},[`${Ys}move`](n){if(n.preventDefault(),this[Ys]=this[Ys]||{},!this[Ys].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,m=Hs({e:this[Ys].panningEvent});let d="start"===m?Math.min(u,o.max):o.min,p="end"===m?Math.max(u,o.min):o.max;d===p&&(d-="start"===m?c:0,p+="end"===m?c:0),r.set("zoom",{min:d,max:p}),t.component(e).emit("render")},[`${Ys}end`](n){n.preventDefault(),this[Ys]=this[Ys]||{},delete this[Ys].panningEvent,t.component(e).emit("dragEnd")},[`${Ys}cancel`](n){n.preventDefault(),this[Ys]=this[Ys]||{},delete this[Ys].panningEvent,t.component(e).emit("dragEnd")}}}}const Ks="scrollbarPan";function Gs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Bs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Vs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Ks}`,options:{event:Ks,threshold:0,enable(r,i){return this[Ks]=this[Ks]||{},!(i&&!this[Ks].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e))}},events:{[`${Ks}start`](n){n.preventDefault();const a=c(n);if(this[Ks]=this[Ks]||{},this[Ks].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Ks].relative=a.relative,this[Ks].zoom=r.get("zoom"),this[Ks].zoom.span=this[Ks].zoom.max-this[Ks].zoom.min,this[Ks].zoom.fullSpan=o-n}else if(a.onThumb)this[Ks].offset=a.thumb;else{const e=u();this[Ks].offset=a.beforeThumb?0:e.thumbSize}},[`${Ks}move`](n){n.preventDefault();const a=c(n);if(this[Ks]=this[Ks]||{},o.meta.isContinuous){const e=a.relative-this[Ks].relative,{fullSpan:t,span:n,min:o,max:s}=this[Ks].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Ks].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Ks}end`](n){n.preventDefault(),this[Ks]=this[Ks]||{},this[Ks].isPanning=!1,t.component(e).emit("unlockState")},[`${Ks}cancel`](n){n.preventDefault(),this[Ks]=this[Ks]||{},this[Ks].isPanning=!1,t.component(e).emit("unlockState")}}}}function Js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),Xs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),Gs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Zs({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const Qs={background:"rgba(0, 0, 0, 0.1)"},el={top:-1,bottom:-1,width:6},tl={width:2,background:"#595959"};var nl={before:Qs,after:Qs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:el,endHandle:el,startHandleBorder:tl,endHandleBorder:tl};const rl={background:"rgba(0, 0, 0, 0.1)"},il={top:-1,bottom:-1,width:6},ol={width:2,background:"#595959"};var al={before:rl,after:rl,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:il,endHandle:il,startHandleBorder:ol,endHandleBorder:ol};const sl={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},ll={pointerEvents:"initial"},cl={pointerEvents:"none"};const ul="ew-resize",ml="default";function dl(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function pl(){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?ul:ml}function hl(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function fl(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function gl(){const{size:e,start:t,end:n}=dl.call(this);this.renderer.render(this.elements(this.h,hl.call(this,e,t,n)))}function yl(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?al:nl;return{container:{...sl},before:{...sl,...n.before,...t.before},after:{...sl,...n.after,...t.after},thumb:{...sl,...n.thumb,...t.thumb},startHandle:{...sl,...ll,...n.startHandle},endHandle:{...sl,...ll,...n.endHandle},startHandleBorder:{...sl,...cl,...n.startHandleBorder},endHandleBorder:{...sl,...cl,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var vl={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(){gl.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||!fl.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Hs({e:e});t&&(this.state.hover[t]=!0),pl.call(this),gl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),pl.call(this),gl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Hs({e:e});t&&(this.state.drag[t]=!0),pl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),pl.call(this),gl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=dl.call(this);return this.elements(e,hl.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map(t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min}));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const m={[i.end]:t-n},d={[i.start]:r},p={left:-3},h={left:1},f={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?d:m},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?m:d},class:"scrollbar--after"}),S=[];if(l){const t=e("div",{style:{...s.startHandle,...c?f:p},class:"scrollbar--start-handle",[Us]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:h}}):void 0);S.push(t);const n=e("div",{style:{...s.endHandle,...c?p:f},class:"scrollbar--end-handle",[Us]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?h:g}}):void 0);S.push(n)}const M=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},S);return e("div",{style:{...s.container}},[y,M,v,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:yl.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function Sl({layoutService:e}){return e.meta.isContinuous&&Fs({layoutService:e}).miniChart}function Ml({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(us.TYPE.LINE),l=s.filter(e=>e.isPrimary),c=s.filter(e=>!e.isPrimary),u=[...ks({forceCreate:!0,key:cs.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...ks({key:cs.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...ks({key:cs.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...ks({key:cs.COLLECTION.PRIMARY_LINE,series:l,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0}),...ks({key:cs.COLLECTION.SECONDARY_LINE,series:c,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0}),...Is({key:cs.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...Is({key:cs.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...ws({key:cs.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...ws({key:cs.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return Sl(e)&&(u.push(...ks({key:cs.COLLECTION.REDUCED,source:cs.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),u.push(...ks({key:cs.COLLECTION.REDUCED_PRIMARY_LINE,source:cs.DATA.REDUCED,series:l,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0})),u.push(...ks({key:cs.COLLECTION.REDUCED_SECONDARY_LINE,source:cs.DATA.REDUCED,series:c,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0})),u.push(...ks({key:cs.COLLECTION.REDUCED_PRIMARY,source:cs.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),u.push(...ks({key:cs.COLLECTION.REDUCED_SECONDARY,source:cs.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),u.push(...Is({key:cs.COLLECTION.REDUCED_STACKED_PRIMARY,source:cs.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter(e=>e.type===us.TYPE.BAR),colorService:i})),u.push(...Is({key:cs.COLLECTION.REDUCED_STACKED_SECONDARY,source:cs.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter(e=>e.type===us.TYPE.BAR),colorService:i}))),u}const El=({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 xl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const bl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:El({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:xl({models:e})}},Cl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:El({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:xl({models:e})}};function Al({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function Nl({viewCache:e,mainMajor:t}){return re(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function Ol({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map(e=>e.qName);return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Tl({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,m=l.getStyles(),d={type:"time",data:{field:u},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:u,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>c({text:e,fontFamily:m.axis.label.name.fontFamily,fontSize:m.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:Ol({viewState:t,viewCache:n,layoutService:o})};return{[cs.SCALE.MAJOR]:re(!0,{},d,{ticks:{level:"outer"}}),[cs.SCALE.MAJOR_INNER]:re(!0,{},d,{ticks:{level:"inner"}})}}function Ll({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Tl({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[cs.SCALE.MAJOR]:Al({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[cs.SCALE.MAJOR]:Cl({models:t,environment:i})}:{[cs.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?Cl({models:t,environment:i}):bl({models:t,environment:i})};return Sl(t)?{...a,[cs.SCALE.REDUCED]:Nl({viewCache:r,mainMajor:a[cs.SCALE.MAJOR]})}:a}function Rl({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function Il({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!Sl({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}var kl={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 wl=["all","labels"];function Dl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:i,styleModel:o,animationsModel:a}=e,s=t.getLayoutValue("measureAxes");if(!s||!s.length)return[];const l=i.getStyles(),c=o.query.axis.label.getStyle(),{measureAxes:u}=r.meta;return u.filter(e=>{const t=e.isPrimary?0:1;return wl.some(e=>s[t].show===e)}).map(e=>({type:"axis",key:e.isPrimary?cs.COMPONENT.AXIS.MINOR.PRIMARY:cs.COMPONENT.AXIS.MINOR.SECONDARY,renderer:_a(),scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:kl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:Ta.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock})}}))}var ql={INACTIVE:.5},Pl={LOWER:3,UPPER:13};const zl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return xe.getAdjustedMaxGlyphCount(t,r,0,"qText")};function $l({models:e,environment:t}){const{layoutService:n,dockService:r,styleModel:i,themeService:o,animationsModel:a}=e,s="rtl"===t.options.direction,l=n.getLayoutValue("dimensionAxis"),c=i.query.axis.label.getStyle(),u=zl({layoutService:n}),{orientation:m}=r.meta.major,d="horizontal"===m,p=d?l.label:"auto",h=o.getStyles(),{auto:f,spacing:g}=n.getLayoutValue("gridLine",{});return{type:"axis",key:cs.COMPONENT.AXIS.MAJOR,renderer:_a(),scale:cs.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:kl.AXIS.MAJOR[m.toUpperCase()]},settings:{labels:{mode:l.label,tiltAngle:s?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===p?void 0:r.meta.minor.size/4,maxGlyphCount:u,tiltThreshold:u>Pl.LOWER&&u<Pl.UPPER?1:void 0,fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},line:{show:!f&&0===g,stroke:h.axis.line.major.color},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:ql.INACTIVE}}}]},animations:{enabled:a.enabled,trackBy:Ta.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isHorizontal:d})}}}function _l({models:e}){const{dockService:t,styleModel:n,themeService:r,layoutService:i,animationsModel:o}=e,{orientation:a}=t.meta.major,s=n.query.axis.label.getStyle(),l=r.getStyles(),{auto:c,spacing:u}=i.getLayoutValue("gridLine",{});return{type:"axis",key:cs.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:_a(),scale:cs.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:kl.AXIS.MAJOR[a.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:s.fontFamily,fontSize:s.fontSize,fill:s.fill},line:{show:!c&&0===u,stroke:l.axis.line.major.color}},animations:{enabled:o.enabled,trackBy:Ta.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Fl({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:i}=r;return"none"===i||"title"===i?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:i,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,c="bottom"===n.meta.major.dock?0:1,u=r.getStyles(),m=i.query.axis.label.getStyle(),d=s?1:0,{auto:p,spacing:h}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:kl.AXIS.MAJOR[l]},preferredSize:()=>({size:2*parseFloat(m.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:s?"end":"start",label:{align:c,justify:d},guideLine:{major:{justify:d},minor:{align:c}},line:{show:!1}},style:{label:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},majorGuideLine:{stroke:u.axis.line.major.color},minorGuideLine:{stroke:u.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:Ta.axes.trackBy({isTime:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isTime:!0})}};return[re(!0,{},f,{key:cs.COMPONENT.AXIS.TIME_INNER,scale:cs.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!p&&0===h}},style:{majorGuideLine:{stroke:u.axis.line.minor.color},minorGuideLine:{stroke:u.axis.line.major.color},line:{stroke:u.axis.line.major.color}}}),re(!0,{},f,{key:cs.COMPONENT.AXIS.TIME_OUTER,scale:cs.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[_l({models:e})]:[$l({models:e,environment:t})]}const Bl=({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,Vl=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function jl({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=>!0===e.data?.null?.value?0:1,...t},inactive:{opacity:e=>!0===e.data?.null?.value?0:ql.INACTIVE,...n}}}]}}function Ul(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Hl=(e,t)=>`${e}-${t.id}`,Yl=4,Wl=12,Xl=4;function Kl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${Xl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(cs.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Yl,Math.min(Wl,l));o.size=`${"bar"===i?2*c:c}px`}return o.size}}const Gl=({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:Jl}=Nt;const Zl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m=a.getColor(),{fill:d,marker:p}=n.options,{isContinuous:h}=i.meta,f="rtl"===r.options.direction,{orientation:g}=s.meta.major,y="horizontal"===g,v=(n.isPrimary?l:c).query.getExtrema(),S=({end:e})=>{const{value:t}=e;return Ul(t,v)},M=Hl(cs.COMPONENT.MARKER,n);return{type:"point",key:M,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:cs.SCALE.MAJOR,fn:Vl({layoutService:i,seriesModel:o,rtl:f,orientation:g}),ref:h?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return r=n,Math.min(Math.max(0,r),1);var r}},fill:d||"bar"===p?m:"none",opacity:e=>!0===e.datum.null?.value||S(e.datum)?0:1,stroke:e=>{const t=m(e);return d?Jl(t)?Ge(t).brighter(.5).toString():function(e){return Ge(e).darker().toString()}(t):t},size:Kl({chart:e,layoutService:i,dockService:s,markerKey:M,markerType:p}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:p,horizontal:y,rtl:f})},brush:jl({layoutService:i,active:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:ql.INACTIVE}}),animations:{enabled:u.enabled,isMainComponent:Gl({series:n}),trackBy:Ta.markers.trackBy,compensateForLayoutChanges:Ta.markers.compensateForLayoutChanges}}};function Ql({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(cs.SCALE.MAJOR),c=s(cs.SCALE.COLOR),u=t&&i?[...a.points].reverse():a.points,m=u.reduce((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=u[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t},[]),d="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),p=m.map(d),h=Math.min(...p),f=Math.max(...p)-h,g=0===f?1:f,y=p.map((e,t)=>0===t?0:t===p.length-1?1:(e-h)/g),v=[];for(let t=0;t<m.length;t++){const i=m[t],o=i.color&&i.color.value,a=n?o||r:c(o)||r,s=0===t,l=t===m.length-1,u=y[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=m[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-y[t-1])/2).toFixed(5)))}):v.push({color:a,offset:u});const r=m[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(y[t+1]-u)/2).toFixed(5)))}):v.push({color:a,offset:u})}}const S=v.reduce((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e},[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:S}}}function ec({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:c,nil:u}=i.getSettingsForMeasure(n),m="horizontal"===o.meta.major.orientation;if(!l||"constant"===c)return i.getColor();if("measure"===l&&"categorical"===c)return i.getColor();const d=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(d?.on)return"byExpression"===d.mode?Ql({isHorizontal:m,isColor:!0,fallback:u,rtl:a}):i.getColor();const p=r.getLayoutValue("color",{}),h=!p.auto&&"byExpression"===p.mode,f=!!p.colorExpression;if(h&&!f)return u;const g=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex;return s||!g?Ql({isHorizontal:m,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(cs.SCALE.COLOR),a=r.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))}));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:m}}}({isHorizontal:m,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(cs.SCALE.COLOR),l=o.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),c=Math.min(...l),u=Math.max(...l),m=t?Math.min(0,c):c,d=(t?Math.max(0,u):u)-m,p=0===d?1:d,h=s.domain(),f=[];for(let e=0;e<h.length-1;e++){const t=h[e],r=s(t)||n;f.push({color:r,offset:Math.min(1,Math.max(0,(t-m)/p))});const i=h[e+1];f.push({color:r,offset:Math.min(1,Math.max(0,(i-m)/p))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:m,fallback:u,rtl:a})}const tc=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a,animationsModel:s,colorService:l}=e,c="rtl"===t.options.direction,{orientation:u}=o.meta.major,m=Vl({layoutService:r,seriesModel:i,rtl:c,orientation:u}),{isArea:d,isLineStacked:p}=r.meta,h=r.getLayoutValue("separateStacking",!0),{fieldType:f}=l.getSettings(),g={key:Hl(cs.COMPONENT.LINE,n),type:"line",data:{filter:p?e=>n.ref===e.point.source.field:e=>n.ref===e.end.source.field,collection:n.isPrimary?cs.COLLECTION.PRIMARY_LINE:cs.COLLECTION.SECONDARY_LINE},settings:{coordinates:{major:{scale:cs.SCALE.MAJOR,fn:m},minor:{scale:n.scale,ref:"end",fn:e=>{if(p&&h){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}return e.scale(e.datum.end.value)}}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:ec({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round",showMinor0:!1}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:jl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:ql.INACTIVE},inactive:{opacity:ql.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!Gl({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}};return p&&(g.settings.coordinates.minor0={scale:n.scale,fn:e=>{if(h){const t=e.datum.point.value<0?e.datum.end.value:e.datum.start.value;return e.scale(t)}return e.scale(e.datum.start.value)}}),d&&(g.settings.layers.area={fill:ec({models:e,environment:t,measureIndex:n.refIndex}),opacity:"measure"===f||"expression"===f?.6:.3},g.brush.consume.push({context:"selection",data:["selectionDimension","end","color","major"],filter:e=>(e=>void 0===e.strokeLinejoin)(e),style:{active:{opacity:.15},inactive:{opacity:.15}}})),g};var nc={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone"},WIDTH:{FULL:{DEFAULT:2},LESS:{DEFAULT:1},DEFAULT:3},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4,NEW_DEFAULT:8}}};function rc({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some(e=>!r({item:e})):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some(e=>!r({item:e})):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const ic=3,oc=20;function ac({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u,animationsModel:m}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:p}=a.meta.major,h="horizontal"===p,f="SPARK"===a.meta.chart.mode,g=i.getColor(),{POINT:y}=nc,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=rc({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:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:c}=r({index:s,items:o.items});return!l&&!c}}({series:t,layoutService:r}),S="rtl"===n.options.direction,M=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:E,isLineStacked:x}=r.meta,b=r.getLayoutValue("separateStacking",!0),C=({end:e})=>{const{value:t}=e;return Ul(t,M)};return{type:"point",key:Hl(cs.COMPONENT.POINT,t),data:{filter:x?void 0:e=>t.ref===e.end.source.field,collection:t.isPrimary?cs.COLLECTION.PRIMARY_LINE:cs.COLLECTION.SECONDARY_LINE},preferredSize:()=>({edgeBleed:{top:h?y.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{if(x&&b){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return r=n,Math.min(Math.max(0,r),1);var r}},[h?"x":"y"]:{scale:cs.SCALE.MAJOR,fn:Vl({layoutService:r,seriesModel:o,rtl:S,orientation:p}),ref:"major"},sizeLimits:{minPx:ic,maxPx:oc},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:g,opacity:({datum:e,data:t})=>e.null?.value||C(e)?0:f?v({item:e,items:t.items})?1:0:d||v({item:e,items:t.items})?1:0},brush:jl({layoutService:r,active:{r:e=>e.r+nc.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{if(!0===e.data.null?.value||C(e.data))return 0;if(!E||d)return 1;const{event:t,components:n=[]}=u?.getSelectionInfo()||{};if("continuousRange"===t)return 0;if("tap"!==t)return 1;return[cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some(e=>n.indexOf(e)>=0)?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:m.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.points.compensateForLayoutChanges}}}const sc=(e,{dataset:t},n=!1)=>{const{value:r,label:i,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return de.shouldUseFormat(a.raw())?a.formatter()(r):i};function lc({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,styleModel:a,primaryExtremumModel:s,secondaryExtremumModel:l,animationsModel:c}=t,u="rtl"===n.options.direction,m=i.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;if(!r.length)return!1;const d=i.meta.isLineStacked?t=>((e,{dataset:t})=>{const{value:n,label:r,source:i}=e.point,o=t(i.key).field(i.field);return de.shouldUseFormat(o.raw())?o.formatter()(n):r})(t,e):t=>sc(t,e),p=a.query.point.label.getStyle();return{type:"point-label",key:cs.COMPONENT.POINT_LABEL,renderer:_a(),layout:{displayOrder:2,minimumLayoutMode:kl.VALUE_LABEL},settings:{orientation:o.meta.major.orientation,rtl:u,label:d,pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map(e=>({key:`${cs.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?s:l).query.getExtrema();return!Ul(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(cs.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,fill:p.fill},animations:{enabled:c.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}}const cc=({chart:e,models:t,environment:n,markerSeries:r})=>{const{layoutService:i,dockService:o,styleModel:a,primaryExtremumModel:s,secondaryExtremumModel:l,animationsModel:c}=t,u="rtl"===n.options.direction,m=a.query.marker.label.getStyle(),d=i.getLayoutValue("dataPoint");return!!d?.showMarkerLabels&&(!!r.length&&{type:"point-label",key:cs.COMPONENT.MARKER_LABEL,renderer:_a(),layout:{displayOrder:2,minimumLayoutMode:kl.VALUE_LABEL},settings:{orientation:o.meta.major.orientation,rtl:u,label:t=>sc(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map(e=>({key:`${cs.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?s:l).query.getExtrema();return!Ul(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(cs.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},animations:{enabled:c.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}})};var uc="max",mc="min";const dc=({chart:e,dock:t})=>{let n=t;const r=e.component(`${cs.COMPONENT.SLICED_HAT}-${uc}`),i=e.component(`${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.PRIMARY}`),o=e.component(`${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.SECONDARY}`);return r?n=`@${cs.COMPONENT.SLICED_HAT}-${uc}`:i?n=`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.PRIMARY}`:o&&(n=`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.SECONDARY}`),n},pc=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${cs.COMPONENT.SLICED_HAT}-${uc}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.PRIMARY}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${cs.COMPONENT.SLICED_HAT}-${mc}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${mc}-${us.AXIS.PRIMARY}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${mc}-${us.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function hc({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===o.meta.major.orientation,{show:m}=i.getLayoutValue("dimensionAxis",{});if("none"!==m){const{dock:e}=o.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const d=c?"left":"right";return{type:"label-space",key:cs.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:kl.LABEL_SPACE,dock:dc({chart:e,dock:u?"top":d})},settings:{size:10},preferredSize:()=>{const t=e.component(`${cs.COMPONENT.LINE}-${r[0].id}`);if(!t?.rect)return 0;const n=(u?17:34)/t.rect[u?"height":"width"],i=a.query.getExtrema(),o=e.scale(cs.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=u||c?o:1-o,m=r.filter(e=>e.isPrimary).length>0,d=s.query.getExtrema(),p=e.scale(cs.SCALE.MINOR.SECONDARY)(d.implicit.line.max),h=u||c?p:1-p,f=r.filter(e=>!e.isPrimary).length>0;return m&&l<n||f&&h<n?10:0}}}const fc={min:"Min",max:"Max"};function gc(e,t,n){return function(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}(e,t,n)||function(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}(e,t,n)}function yc(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function vc(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function Sc(e,t){return yc(e,t)||vc(e,t)}function Mc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${fc[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===uc?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===uc?!yc(r,e):!vc(r,e)}({extrema:e,type:t}))}var Ec=Object.freeze({__proto__:null,isMaxOutOfBounds:yc,isMinOutOfBounds:vc,isOutOfBounds:Sc,isSegmentOutOfBounds:gc,shouldShowOob:Mc});const xc={min:"Min",max:"Max"},bc=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:m,layoutService:d,seriesModel:p,themeService:h,fieldModel:f,animationsModel:g}=t,y="rtl"===o.options.direction,{dock:v,opposite:S,orientation:M}=s.meta.major,E=l.query.getExtrema(),x=c.query.getExtrema(),b=a===uc,{isBarSeriesGrouped:C,isLineStacked:A}=d.meta,N=d.getLayoutValue("separateStacking",!0),O=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===uc?n:r;const o=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),s=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`),l=e.component(cs.COMPONENT.LABEL_SPACE),c=e.component(`${cs.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`),m=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.SECONDARY}`);return o?i=`@${cs.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`:s?i=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`:c||u||m?l&&t===uc?i=`@${cs.COMPONENT.LABEL_SPACE}`:c?i=`@${cs.COMPONENT.BAR_OOB}-${t}`:u?i=`@${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`:m&&(i=`@${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.SECONDARY}`):l&&t===uc&&(i=`@${cs.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:S,dock:v}),T=Vl({layoutService:d,seriesModel:p,rtl:y,orientation:M}),L=r?.length>0&&A,R=r.concat(n);if(!R.length)return!1;const I=b?E.implicit.bar.max:E.implicit.bar.min,k=Number(I.toFixed(13));if(!C&&i.length&&Ec[`is${xc[a]}OutOfBounds`](k,E))return!1;if(!E.meta.hasExplicit&&!x.meta.hasExplicit)return!1;const w=b?"max":"min",D=Math[w](Number(E.implicit.line[w].toFixed(13)),Number(E.implicit.marker[w].toFixed(13))),q=Math[w](Number(x.implicit.line[w].toFixed(13)),Number(x.implicit.marker[w].toFixed(13))),P=R.filter(e=>e.isPrimary),z=R.filter(e=>!e.isPrimary),$=P.length>0,_=z.length>0,{major:F,majorNumeric:B}=f.main,V=e=>"NaN"!==e.qNum?e.qNum:0,j=d.meta.isContinuous?B:F;return{type:"data-out-of-bounds-marker",key:`${cs.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:O,minimumLayoutMode:kl.OUT_OF_BOUNDS_MARKER},data:{extract:[...P.map(({ref:e,typeIndex:t,options:n,type:r})=>({field:F,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:r===us.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"primary"}})),...z.map(({ref:e,typeIndex:t,options:n,type:r})=>({field:F,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:r===us.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"secondary"}}))],stack:L?{stackKey:e=>e.value,value:e=>e.end.value,offset:N?"diverging":"none",stackByKey:["primary","secondary"]}:void 0},settings:{type:a,primaryExtremum:b?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:b?()=>m.query.getMax():()=>m.query.getMin(),isLineStacked:A,separateStacking:A&&N,primarySeries:P,secondarySeries:z,orientation:M,rtl:y,major:{scale:cs.SCALE.MAJOR,fn:T},markerOffset:pc({dockPosition:O,orientation:M,rtl:y})},brush:jl({layoutService:d}),show:()=>{if(b){if($&&D>u.query.getMax())return!0;if(_&&q>m.query.getMax())return!0}if(!b){if($&&D<u.query.getMin())return!0;if(_&&q<m.query.getMin())return!0}return!1},style:{fill:h.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:Ta.lineOobs.compensateForLayoutChanges}}},Cc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Ac({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=N(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${cs.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=Cc[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=Cc[a.meta.chart.mode],c=Math.min(s/i/.2,1),u=2*(1-(m=1-c))+l*m;var m;return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Nc=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Oc(e){return Math.min(Math.max(0,e),1)}const Tc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:m,secondaryExtremumModel:d,animationsModel:p}=t,{isContinuous:h,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:y}=o.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),S=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY,M=i?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const E=f?{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return Oc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return Oc(e.scale(t))}}}:{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return Oc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=!0===e.datum.null?.value?v(e):e.datum.end.value;return Oc(e.scale(t))}}},x=(i?m:d).query.getExtrema(),b=f?({start:e,end:t})=>gc(e.value,t.value,x):({end:e})=>Sc(e.value,x);return{type:"box",key:`${cs.COMPONENT.BAR}-${S}`,data:{filter:(()=>{if(f)return;const e=l.query.series(us.TYPE.BAR).filter(e=>e.isPrimary===i).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:f?i?cs.COLLECTION.STACKED_PRIMARY:cs.COLLECTION.STACKED_SECONDARY:i?cs.COLLECTION.PRIMARY:cs.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:cs.SCALE.MAJOR,fn:Bl({layoutService:o,axis:S}),ref:h?{start:"major",end:"major"}:void 0},minor:E,box:{width:Nc({isContinuous:h,isBarSeriesGrouped:g,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:y}),minWidthPx:h?Ac({chart:e,models:t,viewState:n,viewCache:r,axis:S}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>!0===e.datum?.null?.value||b(e.datum)?0:1},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:jl({layoutService:o,active:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:ql.INACTIVE}}),animations:{enabled:p.enabled,isMainComponent:Gl({isPrimary:i,seriesModel:l}),trackBy:Ta.bars.trackBy,compensateForLayoutChanges:Ta.bars.compensateForLayoutChanges}}},Lc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:m,isContinuous:d,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:h}=o.meta,f=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY,g=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!m||0===g)return!1;return{key:`${cs.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:i?cs.COLLECTION.STACKED_TOTAL_PRIMARY:cs.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:cs.SCALE.MAJOR,fn:Bl({layoutService:o,axis:f}),ref:d?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Nc({isContinuous:d,isBarSeriesGrouped:p,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:h}),minWidthPx:d?Ac({chart:e,models:t,viewState:n,viewCache:r,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Rc(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,i=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map(e=>{const t=i.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Nt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):i.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:t,isHorizontal:n})}),label:t.label}}function Ic(e,t,n,r){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const kc=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!i||!o&&!!r},wc=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!!i&&(!!o||!1!==r)};function Dc(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}const qc=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:i,styleModel:o,themeService:a,animationsModel:s}=e,{meta:l}=r,{isBarSeriesStacked:c}=l,u="rtl"===t.options.direction,m=a.getStyles(),d=o.query.bar.label.getStyle(),p=e.layoutService.getLayoutValue("dataPoint",{}),h=n?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(!(n?i.meta.primaryBarSeriesCount:i.meta.secondaryBarSeriesCount)||!kc(p,l))return!1;let f;!c&&(f=c?1:0);const g={label:e=>sc(e.data,e,c),simplifiedPlacements:Dc(f,0===f?1:0,c?.5:1,l.isContinuous),style:m.label.value},y=[Rc(e,g)],v=[{component:`${cs.COMPONENT.BAR}-${h}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Ic(t.data.end.value,e.dockService.meta.minor.orientation,u,0),labels:y,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily}}}];return{type:"labels",key:`${cs.COMPONENT.BAR_LABEL}-${h}`,renderer:_a(),layout:{minimumLayoutMode:kl.VALUE_LABEL},settings:{sources:v},animations:{enabled:s.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}};function Pc(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function zc({chart:e,models:t,environment:n,isPrimary:r}){const{meta:i}=t.layoutService,o="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.styleModel.query.bar.label.getStyle(),l=t.layoutService.getLayoutValue("dataPoint",{}),c=r?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!wc(l,i))return!1;const u=!kc(l,i),m=s.useContrastColor,d=e.formatter(r?cs.FORMATTER.PRIMARY:cs.FORMATTER.SECONDARY)||(e=>e),p=e=>d(e),h={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value),simplifiedPlacements:Pc("outside",u,m,i.isContinuous),style:a.label.value},f={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value),simplifiedPlacements:Pc("opposite",u,m,i.isContinuous),style:a.label.value},g=[Rc(t,h),Rc(t,f)];return{type:"labels",key:`${cs.COMPONENT.STACK_BAR_LABEL}-${c}`,renderer:_a(),layout:{displayOrder:2,minimumLayoutMode:kl.VALUE_LABEL},settings:{sources:[{component:`${cs.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Ic(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,o),labels:g,fontSize:parseInt(s.fontSize,10),fontFamily:s.fontFamily}}}]},animations:{enabled:t.animationsModel.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}}var $c=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const _c={min:"Min",max:"Max"};function Fc({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:m}=t,{isBarSeriesStacked:d,isContinuous:p,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:f}=a.meta,g=d?Lc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Tc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():c.query.getExtrema(),v=n===uc,S=o?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${_c[t]}`]}(y,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!$c[`has${_c[t]}Hat`](i,e)}(y,n,v)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${_c[t]}`]&&r(e.explicit[t])}(y,n,v))return!1;let M="end";d&&(M=v?"sumOfPositives":"sumOfNegatives");const E=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(()=>e.scale(o?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY)[n]());const x=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),a=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${cs.COMPONENT.SLICED_HAT}-${n}-${S}`,layout:{dock:x},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:re({},g.settings.box,{fill:d?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=E(),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 v?n>t:n<t},width:Nc({isContinuous:p,isBarSeriesGrouped:h,styleModel:u,discreteModel:m,isBarSeriesStackedInBothAxis:f}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:jl({layoutService:a})}}const Bc={min:"Min",max:"Max"},Vc={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function jc({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u,animationsModel:m}=t,{end:d,start:p}=s.meta.minor,{isBarSeriesStacked:h}=a.meta,f=h?Lc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Tc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),g=o?l.query.getExtrema():c.query.getExtrema(),y=n===uc?g.implicit.bar.max:g.implicit.bar.min,v=Number(y.toFixed(13)),S=o?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(!f)return!1;if(!Ec[`is${Bc[n]}OutOfBounds`](v,g))return!1;const M=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===uc?n:r;const a=e.component(cs.COMPONENT.LABEL_SPACE),s=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),l=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`),c=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`),u=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.SECONDARY}`);return s?o=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`:l?o=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`:c&&u&&!i?o=`@${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`:a&&t===uc&&(o=`@${cs.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:d,start:p,isPrimary:o});let E="end";h&&(E=n===uc?"sumOfPositives":"sumOfNegatives");const x={type:"box-out-of-bounds",key:`${cs.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:Se.getDockValue(n===uc?d:p),oob:re({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){if(!0===e.datum.null?.value)return!1;const t=h&&0===e.datum[E].value,r=Ec[`is${Bc[n]}OutOfBounds`](e.datum[E].value,g,n),i=(!t||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Vc[n]].value;return 0!==i&&Ec[`is${Bc[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:E,extrema:g}))&&r;return i}})},brush:jl({layoutService:a}),animations:{enabled:m.enabled,compensateForLayoutChanges:Ta.barOobs.compensateForLayoutChanges}};return x}function Uc(e){return Math.min(Math.max(0,e),1)}const Hc=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:m}=s.meta,d=e.scale(r?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY),p=r?us.AXIS.PRIMARY:us.AXIS.SECONDARY,h=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===uc;if(!Mc({extrema:h,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e);return{type:"box",key:`${cs.COMPONENT.GHOST_BAR_OOB}-${n}-${p}`,data:{filter:(()=>{if(l)return;const e=a.query.series(us.TYPE.BAR).filter(e=>e.isPrimary===r).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:l?r?cs.COLLECTION.STACKED_TOTAL_PRIMARY:cs.COLLECTION.STACKED_TOTAL_SECONDARY:r?cs.COLLECTION.PRIMARY:cs.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:cs.SCALE.MAJOR,fn:Bl({layoutService:s,axis:p}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Uc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=y(e,"sumOfPositives");return Uc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=y(e,"sumOfNegatives");return Uc(e.scale(t))}}:{ref:"end",fn:e=>{const t=y(e);return Uc(e.scale(t))}}},box:{width:Nc({isContinuous:c,isBarSeriesGrouped:u,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:m}),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:d.max();return f?n>d.max():n<d.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Yc(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Wc=({chart:e,models:t,type:n,environment:r,isPrimary:i})=>{const{layoutService:o,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,styleModel:c,seriesModel:u,themeService:m,animationsModel:d}=t,p=m.getStyles(),h=c.query.bar.label.getStyle(),{meta:f}=o,{isBarSeriesStacked:g}=f,y=e.formatter(i?cs.FORMATTER.PRIMARY:cs.FORMATTER.SECONDARY),v=o.getLayoutValue("dataPoint",{}),S="horizontal"===a.meta.major.orientation,M="rtl"===r.options.direction;if(!(i?u.meta.primaryBarSeriesCount:u.meta.secondaryBarSeriesCount)||!g&&!kc(v,f)||g&&!wc(v,f))return!1;const E=i?s.query.getExtrema():l.query.getExtrema();if(!E.meta.hasExplicit)return!1;const x=n===uc?E.implicit.bar.max:E.implicit.bar.min;if(!(n===uc?yc(x,E):vc(x,E)))return!1;let b=e=>sc(e.data,e);f.isBarSeriesStacked&&(b=n===uc?function(e){if(!0===e.data.null?.value)return"";if(yc(e.data.sumOfNegatives.value,E)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return y?y(t):t}return""}:function(e){if(!0===e.data.null?.value)return"";if(vc(e.data.sumOfPositives.value,E)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return y?y(t):t}return""});const C={label:b,simplifiedPlacements:Yc("outside",0,f.isContinuous,S,M),style:p.label.value},A={label:b,simplifiedPlacements:Yc("opposite",0,f.isContinuous,S,M),style:p.label.value},N=[Rc(t,C),Rc(t,A)],O=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY,T="horizontal"===a.meta.major.orientation?"down":"right",L=[{component:`${cs.COMPONENT.GHOST_BAR_OOB}-${n}-${O}`,selector:"rect",strategy:{type:"bar",settings:{direction:T,labels:N,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{key:`${cs.COMPONENT.BAR_OOB_LABEL}-${n}-${O}`,type:"labels",renderer:_a(),layout:{minimumLayoutMode:kl.VALUE_LABEL},settings:{sources:L},animations:{enabled:d.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}},Xc=({chart:e,models:t,viewState:n,viewCache:r})=>[Tc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Tc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Kc=({chart:e,models:t,viewState:n,viewCache:r})=>[Lc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Lc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Gc=({chart:e,models:t,environment:n,flags:r})=>{const i=zc({chart:e,models:t,environment:n,isPrimary:!0}),o=zc({chart:e,models:t,environment:n,isPrimary:!1});return[qc({models:t,environment:n,isPrimary:!0}),qc({models:t,environment:n,isPrimary:!1}),i,o]},Jc=({chart:e,models:t,viewCache:n,viewState:r})=>[Fc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Fc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Fc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Fc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Zc=({chart:e,models:t,viewCache:n,viewState:r})=>[jc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),jc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),jc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),jc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Qc=({chart:e,models:t})=>[Hc({chart:e,models:t,type:"max",isPrimary:!0}),Hc({chart:e,models:t,type:"min",isPrimary:!0}),Hc({chart:e,models:t,type:"max",isPrimary:!1}),Hc({chart:e,models:t,type:"min",isPrimary:!1})],eu=({chart:e,models:t,environment:n,flags:r})=>[Wc({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),Wc({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),Wc({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),Wc({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],tu=({chart:e,environment:t,models:n,viewState:r,viewCache:i})=>{const{seriesModel:o}=n,a=o.query.series(us.TYPE.BAR).slice(-1),s=o.query.series(us.TYPE.LINE),l=o.query.series(us.TYPE.MARKER);return[...Xc({chart:e,models:n,viewState:r,viewCache:i}),...Kc({chart:e,models:n,viewState:r,viewCache:i}),...s.map(e=>tc({models:n,environment:t,series:e})),...s.map(e=>ac({models:n,series:e,environment:t})),...l.map(r=>Zl({chart:e,models:n,series:r,environment:t})),lc({chart:e,models:n,environment:t,lineSeries:s}),cc({chart:e,models:n,environment:t,markerSeries:l}),...Gc({chart:e,models:n,environment:t}),...Jc({chart:e,models:n,viewCache:i,viewState:r}),...Zc({chart:e,models:n,viewCache:i,viewState:r}),...Qc({chart:e,models:n}),...eu({chart:e,models:n,environment:t}),bc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),bc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),hc({chart:e,models:n,environment:t,lineSeries:s})]},nu={NONE:0,WIDE:1,NARROW:3};function ru({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=r.getLayoutValue("gridLine",{});if(!a&&s===nu.NONE)return!1;const c=i.getStyles(),u=n.meta.primarySeries.length>0;return{key:cs.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:kl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===nu.WIDE)||((e,t)=>t%2==0),stroke:c.grid.line.major.color},minorTicks:{show:!a&&s===nu.NARROW,stroke:c.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(l??0)&&u?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}}}function iu({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o,secondaryExtremumModel:a,secondaryTickModel:s,layoutService:l,animationsModel:c}=e,u=0===(l.getLayoutValue("gridLine",{})?.axis??0),m=t.query.getExtrema(),d=a.query.getExtrema();if(!m.meta.includesZero&&!d.meta.includesZero)return!1;return{key:cs.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:kl.GRID_LINE},show:()=>(()=>{const e=o.meta.primarySeries.length>0,t=o.meta.secondarySeries.length>0;return u&&e&&n.query.getMin()<=0&&n.query.getMax()>=0||!u&&t&&s.query.getMin()<=0&&s.query.getMax()>=0})(),lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:u?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]},animations:{enabled:c.enabled,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}}}function ou({models:e}){const{layoutService:t,themeService:n,animationsModel:r}=e,{isContinuous:i,isTime:o}=t.meta;if(!i)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:kl.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:r.enabled,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}};return o?[re(!0,{},s,{key:"time-inner-grid",x:{scale:cs.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),re(!0,{},s,{key:"time-outer-grid",x:{scale:cs.SCALE.MAJOR}})]:[re(!0,{},s,{key:"continuous-grid",x:{scale:cs.SCALE.MAJOR},minorTicks:{show:!0}})]}function au({models:e}){return[ru({models:e}),iu({models:e}),...ou({models:e})]}function su({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,appModel:s,genericObjectModel:l,selectionService:c,styleModel:u}=e,m=o.getLayoutValue("dimensionAxis");if(!m)return!1;const{show:d}=m;if("all"!==d&&"title"!==d)return!1;const p=i.getAlternatives(),{orientation:h}=a.meta.major,f=u.query.axis.title.getStyle();return{type:"axis-title",key:cs.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:a.meta.major.dock,minimumLayoutMode:kl.AXIS_TITLE.MAJOR[h.toUpperCase()]},data:{infos:o.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:s,cache:r,model:l,selections:c.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:f.color,fontFamily:f.fontFamily,fontSize:f.fontSize}}}}const lu=(e,t,n)=>e.query.seriesByAxis(n).map(e=>({...t[e.refIndex],explicitColumn:e.refIndex}));function cu({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,seriesModel:s,appModel:l,genericObjectModel:c,selectionService:u,styleModel:m}=e,d=o.getLayoutValue("measureAxes");if(!d||!d.length)return[];const p=i.getAlternatives(),h=m.query.axis.title.getStyle(),{measureAxes:f}=s.meta;return f.filter(e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show).map(e=>{const i=o.getHyperCube(),{isPrimary:m}=e;return{type:"axis-title",key:m?cs.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:cs.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:m?a.meta.minor.dock:a.meta.minorSecondary.dock,minimumLayoutMode:kl.AXIS_TITLE.MINOR},data:{infos:lu(s,i.qMeasureInfo,m),alternatives:p.measures},resources:{app:l,cache:r,model:c,selections:u.getSelectionsObject(),translator:t.translator},callbacks:{onChange:({fromItem:e,toItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex(e=>"colorByExpression"===e.id);if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}}}})}function uu({models:e,environment:t,actions:n,viewCache:r}){return[su({models:e,environment:t,actions:n,viewCache:r}),...cu({models:e,environment:t,actions:n,viewCache:r})]}function mu({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:m}=o.meta,d="rtl"===t.options.direction;return!(c&&!m)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const m=Fs({layoutService:e,override:l});if(m.none)return!1;const{orientation:d}=t.meta.major,p={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===d?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:d,rtl:s,isContinuous:e.meta.isContinuous,range:()=>zs({layoutService:e,viewState:i,viewCache:o})}};m.bar&&(p.settings.style="slim",p.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(p.settings.size.thumb={min:4}));const h=a.getStyles();return h.color&&(p.style={standard:{thumb:{"border-color":h.color,opacity:.4},before:{background:h.color,opacity:.1},after:{background:h.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(p.settings.injections=()=>[Ps({layoutService:e,discrete:n})]),p}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:d,scrollbarOverride:{predicate:()=>u,value:qs.OPTIONS.BAR.value},deviceType:t.deviceType})}function du({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Tc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY;return a.key=`${cs.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?cs.COLLECTION.REDUCED_STACKED_PRIMARY:cs.COLLECTION.REDUCED_STACKED_SECONDARY:i?cs.COLLECTION.REDUCED_PRIMARY:cs.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?cs.SCALE.MINOR.REDUCED_PRIMARY:cs.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=cs.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}const pu=e=>e.isPrimary?cs.COLLECTION.REDUCED_PRIMARY_LINE:cs.COLLECTION.REDUCED_SECONDARY_LINE;function hu({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(us.TYPE.LINE).map(r=>{const i=tc({models:t,environment:e,series:r});return i.key=Hl(cs.COMPONENT.MINI_CHART.LINE,r),i.data.collection=pu(r),i.settings.coordinates.minor.scale=r.isPrimary?cs.SCALE.MINOR.REDUCED_PRIMARY:cs.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=cs.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i})}function fu({models:e,environment:t}){return e.seriesModel.query.series(us.TYPE.MARKER).map(n=>{const r=Zl({models:e,environment:t,series:n});return r.key=Hl(cs.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=cs.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?cs.SCALE.MINOR.REDUCED_PRIMARY:cs.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=cs.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r})}function gu({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return Sl(t)?[du({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),du({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...hu({environment:i,models:t}),...fu({models:t,environment:i})]:[]}function yu({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=kl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:cs.SCALE.MAJOR_INNER,layout:{dock:`@${cs.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:cs.SCALE.MAJOR,layout:{dock:`@${cs.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:cs.SCALE.MAJOR,layout:{dock:`@${cs.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function vu({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c,animationsModel:u}=t,m=l.qLocaleInfo,{options:d,theme:p}=n,h="rtl"===d.direction,f=c.query.series(us.TYPE.BAR).filter(e=>e.isPrimary),g=c.query.series(us.TYPE.BAR).filter(e=>!e.isPrimary),y=c.query.series(us.TYPE.LINE),v=c.query.series(us.TYPE.MARKER),S=c.query.all(),M=S.some(e=>e.isPrimary),E=S.some(e=>!e.isPrimary),x=M&&E,b={resolveUIColor:o.getPaletteColor},C=u.enabled,A=M?za({refLineModel:r,layoutService:i,colorModel:b,dock:x?a.meta.minor.dock:a.meta.minor.opposite,scale:cs.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:cs.FORMATTER.PRIMARY,theme:p,localeInfo:m,rtl:h,key:cs.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],N=E?za({refLineModel:r,layoutService:i,colorModel:b,dock:x?a.meta.minor.opposite:a.meta.minor.dock,scale:cs.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:cs.FORMATTER.SECONDARY,theme:p,localeInfo:m,rtl:h,key:cs.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!M&&Da({refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:cs.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:cs.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:kl.REFERENCE_LINE,animationsEnabled:C}),!!E&&Da({refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:cs.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:cs.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:kl.REFERENCE_LINE,animationsEnabled:C}),Da({isDimension:!0,refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:cs.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:cs.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`:g.length?`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`:y.length?`${cs.COMPONENT.LINE}-${y[0].id}`:v.length?`${cs.COMPONENT.MARKER}-${v[0].id}`:`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,minimumLayoutMode:kl.REFERENCE_LINE,animationsEnabled:C}),...A,...N,...za({isDimension:!0,refLineModel:r,layoutService:i,colorModel:b,dock:a.meta.major.opposite,scale:cs.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:m,rtl:h,key:cs.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function Su({layoutService:e}){return!!Sl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:cs.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Mu(e){return e?.type||us.TYPE.BAR}function Eu({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u,isLineStacked:m}=n.meta;if(!s)return!1;const{options:d}=t,p=n.getLayoutValue("color",{}),h=e=>e.filter(e=>Mu(e)===us.TYPE.LINE).map(e=>({key:Hl(cs.COMPONENT.LINE,e),typeIndex:e.typeIndex})),f=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex,g=n.getHyperCubeValue("qMeasureInfo").map(e=>e.color?.on);return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:cs.COLLECTION.LINE},settings:{getSelectionInfo:()=>a?.getSelectionInfo?.()||{},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=>r.getSettingsForMeasure(e),colorByData:e=>!g[e]&&f,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:o.meta.barSeriesCount,isLineStacked:m,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function xu({models:{fieldModel:e}}){return{[cs.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[cs.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var bu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Cu}=bu;function Au({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Cu}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Nu}=bu,Ou=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Nu}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!Au({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Tu}=bu,{MAX_NUM_POINTS:Lu,DEFAULT_NUM_POINTS:Ru,DEFAULT_NUM_LINES:Iu}=bu,{DEFAULT_NUM_POINTS:ku}=bu,wu=({layoutService:e,largeDataService:t})=>{if(!Au({layoutService:e,largeDataService:t})){const{maxNumPoints:e=ku}=t?.meta||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{const{dimensions:n=[]}=e?.meta?.size||{},{maxNumLines:r=Iu,maxNumPoints:i=Ru,hasInjectedData:o=!1}=t?.meta||{};if(Ou({layoutService:e,largeDataService:t})*n[0]<=i)return n[0];const a=Math.max(1,Math.min(r,n[1])),s=i/a,l=Math.floor(n[0]<=s?s:s/4),c=2*a*(a+1);return o&&(a>Iu||i>Ru)?Math.min(l,Math.ceil(Lu/c)):l})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Tu}=t?.meta||{},{measureCount:r=1}=e?.meta||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function Du({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Au({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>wu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Ou({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:wu({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:Ou({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function qu(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Pu({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function zu(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach((t,r)=>e(n[t],r))},e.has=e=>e in n,e}function $u(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=zu(),o=zu();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach((e,t)=>r.splice(t,0,e)),o.forEach(e=>r.push(e)),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function _u(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Fu(e,t,n){const r={qDataPages:(n.qDataPages||[]).map(n=>{const r=$u(e,t,n.qMatrix),i=_u(n.qArea,r);return{...n,qArea:i,qMatrix:r}})};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map(n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n),[])}))}}(e,t,n.qAxisData)),r}const Bu=2**.5,Vu=1/Bu,ju=Vu**44;function Uu(e){return e.qIsOtherCell}function Hu({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach(e=>{if(!e.some(Uu)){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(Uu)||t++}),t}(n)}const Yu={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Wu={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter(e=>!e.isMinor),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map(t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height}));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function Xu(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Ku(e,t){return e.x<t.x?e.x+e.width>=t.x:t.x+t.width>=e.x}function Gu(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:m}=r;e.start===e.end&&(m=c.width+2*i,1===e.end&&(u-=m));const d={x:u+i,y:i,width:m-2*i,height:t.height-2*i},p=s(`${l[0]}…`).width,h=Math.max(0,d.width-c.width),f=Math.max(0,d.height-c.height),g=o*h,y=a*f;return{show:d.width>=Math.min(p,c.width),text:l,dx:g,dy:y,rect:d,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Xu(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:Xu(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map(e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}});return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&!Ku(n.segment,i.segment)}}(e,a),a}function Ju(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Xu(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Xu(i,n.minorGuideLine.strokeWidth),x2:o,y2:Xu(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Zu(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 Qu={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter(e=>!e.isMinor),r=t.filter(e=>e.isMinor);this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Xu(1,t.line.strokeWidth);return{show:n.line.show,x1:Xu(0,t.line.strokeWidth),y1:r,x2:Xu(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Gu(n,this),this.state.minor=Ju(r,this)},render(){return[...Zu([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}))),...Zu(this.state.major.map(e=>e.guideLine)),...Zu(this.state.minor.map(e=>e.guideLine))];var e}};function em(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 tm(e){return e.qTags.indexOf("$qualified")>-1}function nm({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];em(o,a)?(tm(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function rm({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function im({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map(e=>Math.abs(r(e.qStart)-r(e.qEnd)))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map(e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+16})),r.clamp(n),i.rangeAndWidth}}}function om({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 am({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=im,queryFactory:s=om}={attributesFactory:im,queryFactory:om}){const l=n.map((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t)),c=e.map(e=>l[e]),u=t.map(e=>l[e]);return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function sm({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=am,mapper:a=nm,resolver:s=rm}={metaFactory:am,mapper:nm,resolver:rm}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:m}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),d=s({qualifiedMeta:u,nonQualifiedMeta:m});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every(e=>0===e.qTicks.length)}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=d.resolve(t);return n.set(r,i),i}}}function lm(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const cm=lm(0).getTime();function um(e){return(e.getTime()-cm)/86400/1e3}const mm=new Date,dm=new Date;function pm(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>pm(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(mm.setTime(+t),dm.setTime(+r),e(mm),e(dm),Math.floor(n(mm,dm))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const hm=1e3,fm=6e4,gm=36e5,ym=864e5,vm=6048e5,Sm=pm(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*hm)},(e,t)=>(t-e)/hm,e=>e.getUTCSeconds());Sm.range;const Mm=pm(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hm)},(e,t)=>{e.setTime(+e+t*fm)},(e,t)=>(t-e)/fm,e=>e.getMinutes());Mm.range;const Em=pm(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fm)},(e,t)=>(t-e)/fm,e=>e.getUTCMinutes());Em.range;const xm=pm(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hm-e.getMinutes()*fm)},(e,t)=>{e.setTime(+e+t*gm)},(e,t)=>(t-e)/gm,e=>e.getHours());xm.range;const bm=pm(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*gm)},(e,t)=>(t-e)/gm,e=>e.getUTCHours());bm.range;const Cm=pm(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fm)/ym,e=>e.getDate()-1);Cm.range;const Am=pm(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ym,e=>e.getUTCDate()-1);Am.range;const Nm=pm(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ym,e=>Math.floor(e/ym));function Om(e){return pm(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())*fm)/vm)}Nm.range;const Tm=Om(0),Lm=Om(1),Rm=Om(2),Im=Om(3),km=Om(4),wm=Om(5),Dm=Om(6);function qm(e){return pm(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)/vm)}Tm.range,Lm.range,Rm.range,Im.range,km.range,wm.range,Dm.range;const Pm=qm(0),zm=qm(1),$m=qm(2),_m=qm(3),Fm=qm(4),Bm=qm(5),Vm=qm(6);Pm.range,zm.range,$m.range,_m.range,Fm.range,Bm.range,Vm.range;const jm=pm(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());jm.range;const Um=pm(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());Um.range;const Hm=pm(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());Hm.every=e=>isFinite(e=Math.floor(e))&&e>0?pm(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,Hm.range;const Ym=pm(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());Ym.every=e=>isFinite(e=Math.floor(e))&&e>0?pm(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,Ym.range;const Wm=1,Xm=2,Km=3,Gm=4,Jm=5,Zm=6;function Qm({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return Ym.filter(t=>(t.getUTCFullYear()-o.getUTCFullYear())%e===0)}const s=Sm.count(e,t),l=Em.count(e,t),c=bm.count(e,t),u=Am.count(e,t),m=Pm.count(e,t),d=Um.count(e,t),p=Ym.count(e,t),h=n/r.second.width-1,f=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:p,interval:Ym.every(1),formatter:r.year.formatter,offset:e=>Ym.offset(e,-1),floor:Ym.floor};if(s<=h)v.type=Wm,v.desc="second",v.count=s,v.interval=Sm.every(1),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-1),v.floor=Sm.floor;else if(s/2<=h)v.type=Wm,v.desc="every other second",v.count=s/2,v.interval=Sm.every(2),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-2),v.floor=Sm.floor;else if(s/5<=h)v.type=Wm,v.desc="every 5 second",v.count=s/5,v.interval=Sm.every(5),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-5),v.floor=Sm.floor;else if(s/15<=h)v.type=Wm,v.desc="every 15 second",v.count=s/15,v.interval=Sm.every(15),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-15),v.floor=Sm.floor;else if(s/30<=h)v.type=Wm,v.desc="every 30 second",v.count=s/30,v.interval=Sm.every(30),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-30),v.floor=Sm.floor;else if(l<=f)v.type=Xm,v.desc="minute",v.count=l,v.interval=Em.every(1),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-1),v.floor=Em.floor;else if(l/2<=f)v.type=Xm,v.desc="every 2 minute",v.count=l/2,v.interval=Em.every(2),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-2),v.floor=Em.floor;else if(l/5<=f)v.type=Xm,v.desc="every 5 minute",v.count=l/5,v.interval=Em.every(5),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-5),v.floor=Em.floor;else if(l/10<=f)v.type=Xm,v.desc="every 10 minute",v.count=l/10,v.interval=Em.every(10),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-10),v.floor=Em.floor;else if(l/15<=f)v.type=Xm,v.desc="every 15 minute",v.count=l/15,v.interval=Em.every(15),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-15),v.floor=Em.floor;else if(l/30<=f)v.type=Xm,v.desc="every 30 minute",v.count=l/30,v.interval=Em.every(30),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-30),v.floor=Em.floor;else if(c<=f)v.type=Km,v.desc="hour",v.count=c,v.interval=bm.every(1),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-1),v.floor=bm.floor;else if(c/2<=f)v.type=Km,v.desc="every 2 hour",v.count=c/2,v.interval=bm.every(2),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-2),v.floor=bm.floor;else if(c/3<=f)v.type=Km,v.desc="every 3 hour",v.count=c/3,v.interval=bm.every(3),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-3),v.floor=bm.floor;else if(c/6<=f)v.type=Km,v.desc="every 6 hour",v.count=c/6,v.interval=bm.every(6),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-6),v.floor=bm.floor;else if(c/12<=f||i)v.type=Km,v.desc="every 12 hour",v.count=c/12,v.interval=bm.every(12),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-12),v.floor=bm.floor;else if(u<=g)v.type=Gm,v.desc="day",v.count=u,v.interval=Am.every(1),v.formatter=r.date.formatter,v.offset=e=>Am.offset(e,-1),v.floor=Am.floor;else if(u/2<=g)v.type=Gm,v.desc="every 2 day",v.count=u/2,v.interval=Am.every(2),v.formatter=r.date.formatter,v.offset=e=>Am.offset(e,-2),v.floor=Am.floor;else if(u/3<=g)v.type=Gm,v.desc="every 3 day",v.count=u/3,v.interval=Am.every(3),v.formatter=r.date.formatter,v.offset=e=>Am.offset(e,-3),v.floor=Am.floor;else if(m<=g)v.type=Gm,v.desc="week",v.count=m,v.interval=Pm.every(1),v.formatter=r.date.formatter,v.offset=e=>Pm.offset(e,-1),v.floor=Am.floor;else if(m/2<=g)v.type=Gm,v.desc="every 2 week",v.count=m/2,v.interval=Pm.every(2),v.formatter=r.date.formatter,v.offset=e=>Pm.offset(e,-2),v.floor=Am.floor;else if(d<=g)v.type=Jm,v.desc="month",v.count=d,v.interval=Um.every(1),v.formatter=r.date.formatter,v.offset=e=>Um.offset(e,-1),v.floor=Am.floor;else if(d/3<=g)v.type=Jm,v.desc="quarter",v.count=d/3,v.interval=Um.every(3),v.formatter=r.date.formatter,v.offset=e=>Um.offset(e,-3),v.floor=Am.floor;else if(d/6<=g)v.type=Jm,v.desc="half year",v.count=d/6,v.interval=Um.every(6),v.formatter=r.date.formatter,v.offset=e=>Um.offset(e,-6),v.floor=Am.floor;else if(p<=y)v.type=Zm,v.desc="year",v.count=p,v.interval=Ym.every(1),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-1),v.floor=Ym.floor;else if(p/2<=y)v.type=Zm,v.desc="every 2 year",v.count=p/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-2),v.floor=Ym.floor;else if(p/5<=y)v.type=Zm,v.desc="every 5 year",v.count=p/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-5),v.floor=Ym.floor;else if(p/10<=y)v.type=Zm,v.desc="every 10 year",v.count=p/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-10),v.floor=Ym.floor;else{const e=Math.max(1,Math.floor(p/y));v.type=Zm,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Ym.offset(t,-e),v.floor=Ym.floor}return v}(s,l,n,t.all(),r,a),i.set(c,u,1));const m=e.ticks(u.interval);m.length?s.getTime()!==m[0].getTime()&&m.unshift(u.offset(m[0])):m.push(u.floor(s));const d=m.map((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}});let p=[];if(!o&&u.type<=Km){const n=t.getFormat("date"),r=e.ticks(Am.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(Am.offset(r[0],-1)),p=(r.length?r:[Am.floor(s)]).map((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}})}return{inner:d,outer:p}}const ed=86400,td=1440,nd={};function rd(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function id(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=So().domain([lm(l),lm(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const m="object"==typeof r?r:{type:r};let d;d="d3"===m.type?(e,i)=>Qm({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===m.initialMin?u.domain()[0]:lm(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(nd[[t,n,r,r,o]])return nd[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=lm(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),m=r-n,d=t/(i-r),p=d/1440,h=d/ed,f=366*d,g=3*d*30,y=a.second.width/h,v=a.minute.width/p,S=a.date.width/g,M=a.year.width/f;let E,x,b,C=0,A=0,N=null,O=null,T=null,L=null,R=null,I=null;const k={outer:[],inner:[]};for(y<1?(N=1,A=1/ed):y<2?(N=2,A=1/ed*2):y<5?(N=5,A=1/ed*5):y<10?(N=10,A=1/ed*10):y<30?(N=30,A=1/ed*30):v<1?(O=1,A=1/td):v<2?(O=2,A=1/td*2):v<5?(O=5,A=1/td*5):v<10?(O=10,A=.006944444444444445):v<30?(O=30,A=.020833333333333336):v<60?(T=1,A=1/24):v<120?(T=2,A=2/24):v<360?(T=6,A=.25):v<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?(R=1,A=31):S<1?(R=3,A=90):M<1?(I=1,A=366):M<2?(I=2,A=732):M<5?(I=5,A=1826.25):(I=10,A=3652.5),x=Math.floor((m+n%1)/A);C<i;){b=x+1,E=I?rd("year",[l+x*I,0,1],[l+b*I,0,1],a.year.formatter):R?rd("month",[l,c+x*R,1],[l,c+b*R,1],a.date.formatter):L?rd("day",[l,c,u+x*L],[l,c,u+b*L],a.date.formatter):T?rd("hour",[l,c,u,0+x*T],[l,c,u,0+b*T],a.minute.formatter):O?rd("minute",[l,c,u,0,0+x*O],[l,c,u,0,0+b*O],a.minute.formatter):rd("second",[l,c,u,0,0,0+x*N],[l,c,u,0,0,0+b*N],a.second.formatter),C=um(E.start),k.inner.push(E);const e=Math.floor(C);if(!(o||I||R||L)){const t={type:"day",start:lm(e),end:lm(e+1),formatter:a.date.formatter,qStart:e};k.outer[k.outer.length-1]&&k.outer[k.outer.length-1].qStart===t.qStart||k.outer.push(t)}x++}return k.min=r,k.max=i,nd[[t,n,r,r,o]]=k,k}(n,e,m.min,l,c,"T"===s.qType);const p={transform:(t=[],{isMinor:n=!1}={})=>t.map(t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1),generate:(t=100,n)=>d(t,n)[a].map(t=>{let n;return n="start"===i?um(t.start):"end"===i?um(t.end):(um(t.start)+um(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:um(t.start),end:um(t.end),scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1)};return p}const od=/t+/i;const ad={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 sd(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 ld="continuousPan";var cd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Yu,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Du,snapshotFetcherFactory:c=Pu,cacheFetcherFactory:u=qu,cache:m={initial:{},merged:{}}}=s,d=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),p=c({layoutService:t,viewCache:i}),h=u({cache:m}),f=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,r;({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",(n=y,r=v,Math.max(1e-6,(r-n)*ju))),g=t.meta.isSnapshot?p:d,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=p.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then(e=>{const t=function(e){return{qDataPages:e.qDataPages.map(e=>{const t=_u(e.qArea,e.qMatrix);return{...e,qArea:t}}),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),m.initial=t,m.merged=t,e}).then(e=>Fu(y,v,e)).then(e=>this.updateLayout(e)).catch(f)},fetch:(e,t)=>g.fetch(e,t).then(e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=_u(e.qArea,r);return{...e,qArea:i,qMatrix:r}}),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every(e=>!e.qTicks.length))return e;const n=t.qAxis.map(e=>e.qName),r=t.qAxis.map(e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart})),i=t.qAxis.map(e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]}));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(m.initial,e)).then(e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),m.merged=e,e)).then(n=>Fu(e,t,n)).catch(f),fetchFromCache:(e,t)=>h.fetch(e,t).then(n=>Fu(e,t,n)),fetchMinMaxData:()=>Promise.resolve(m.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return re({},e,{...m.initial})},getInitialLayout(){const e=this.getInitialCube();return re({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Hu(m.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:m.merged.qDataPages[0]})]:m.merged.qDataPages;t.qDataPages=n,t.qAxisData=m.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then(e=>(r.updateLayout(e),t(),e))}const o=O((e,t)=>i("fetch",e,t),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then(n=>(o(e,t),n))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return T((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter(e=>e.key===o)[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=i?1-o:o,{min:u,max:m}=t.get("zoom"),d=Math.abs(m-u),p=d-(r>0?Vu:Bu)*d,h=u+p*c,f=m-p*(1-c),g=h<a?a-h:0,y=f>s?f-s:0;t.set("zoom",{min:Math.max(h-y,a),max:Math.min(f+g,s)})}},r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:ld,pointers:1,threshold:10,enable(r,i){return this.started===ld||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)}},events:{[`${ld}start`](n){n.preventDefault(),this.started=ld;const{min:i,max:o}=r.get("zoom");this[ld]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${ld}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[ld],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${ld}end`](e){e.preventDefault(),this.started=!1},[`${ld}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Wu,timeAxis:Qu},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach(i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=re(!0,{},t[i],o)}),r}(t,ad,n),{qAxis:i}=r,o=lr(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map(e=>e.qStart)),r=Math.max(...t[t.length-1].qTicks.map(e=>e.qEnd))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let c,u,m=[];const d=function(e){return Number.isNaN(+e)?NaN:o(e)};d.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(m=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});m=m.concat(e)}return"auto"===o&&(m=u.generate(e,n.isDayOrShorter)),m},d.invert=e=>o.invert(e),d.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),d.range=e=>Array.isArray(e)?o.range(e):o.range(),d.norm=e=>(sd(a,d),a.instance(e)),d.normInvert=e=>(sd(a,d),a.instance.invert(e)),d.copy=()=>e(t,n),d.clamp=(e=!0)=>(o.clamp(e),o.clamp()),d.min=()=>Math.min(s,l),d.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const p=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&od.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach(e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)}),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter(e=>!e.isMinor),{length:n}=t;if(!n)return o.date;const r=lm(t[0].data.start),i=lm(t[n-1].data.start);return Am.count(r,i)/n>=1?o.date:bm.count(r,i)/n>0?o.minute:Em.count(r,i)/n>0?o.second:o.date},t}(r);return u=id(o.copy(),r,p),c=sm({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:r.cache,scale:d}),d.data=()=>({fields:[{formatter:d.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:b(n,"fields.0.raw",()=>({}))}]}),d.formatter=()=>p.getFormatFromTicks(m).formatter,d}}};const ud=e=>e.meta.seriesComponentKeys[0],md=(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 dd({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=cd,{layoutService:s,seriesModel:l}=t,c=ud(l),u=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:c}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter(e=>e.key===cs.COMPONENT.LEGEND_CATEGORICAL);md(t,e)}if(n.scroll.enabled()){const[e]=i.filter(e=>e.key===c);e&&(u(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const pd="continuousPinchZoom";function hd({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=cd.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:m,tooltipService:d}=t,p="rtl"===n.options.direction,h=d.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Zs({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:u,layoutService:l,dockService:c,rtl:p}),g={type:"hammer",enable:!0,gestures:[...m.custom.legendInteractions(),...a.gestures.sort((e,t)=>(t.prio||0)-(e.prio||0)),...f.gestures,...h.gestures]},y=[dd({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native,h.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),y.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:ud(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0},s=cd.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:pd,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)},events:{[`${pd}start`](e){a.last=e.scale,e.preventDefault()},[`${pd}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:ud(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:p})),[g,...y]}const fd=({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}}}),gd="lasso",yd=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:gd,enable(e,n){if(this.started===gd||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(e=>e.key===t).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==gd&&(i.actions.select.emit("start",gd),this.chart.component(e).emit("lassoStart",t),this.started=gd)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",gd),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const vd=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(t=>-1!==e.indexOf(t.key)),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,m=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map(e=>({key:e,propagation:"stop"})),propagation:"stop"}),d=this.chart.component("tooltip"),p="mouse"!==t.pointerType&&d&&d.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(!m.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),m.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,m):r;this.chart.brushFromShapes(m,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{(e?.meta||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(d&&o.actions.tooltip.enabled())if(m.length){const{customTooltipModel:e}=o;if(e?.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,d,{nodes:n,opts:o,customTooltipModel:e})}else d.emit("show",t,{nodes:m})}else p&&d.emit("hide")}}}};const Sd=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const Md=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter(e=>-1!==n.indexOf(e.key)),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function Ed(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:m,onEdited:d}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:d?{bubbleEnd(){d()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:m},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=Md(e,t,"range");return{interactions:[e.onEdited?Sd(e,t):null,r].filter(Boolean),components:[n]}}const xd=/axis|legend/,bd=e=>e.some(e=>xd.test(e.type));function Cd({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s=[`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,...n.query.series(us.TYPE.MARKER).map(e=>Hl(cs.COMPONENT.MARKER,e)),...n.query.series(us.TYPE.LINE).map(e=>Hl(cs.COMPONENT.POINT,e)),cs.COMPONENT.AXIS.MAJOR,cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER,cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,cs.COMPONENT.LEGEND_CATEGORICAL],l=(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[cs.COMPONENT.AXIS.MAJOR,cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER,cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,cs.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]},c={targets:s,components:l},u=e=>e.some(e=>"legend-cat"===e.type)?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,m={actions:e,isLocked:u,hitRadius:e=>bd(e)?0:3,debouncer:O,flags:o};return o.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?L({actions:e,components:l,hitRadius:e=>bd(e)?0:3,isLocked:u,targets:s}):function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[vd(e,t)],components:[]}}(c,m)}function Ad({actions:e,models:t}){const{flags:n,layoutService:r,dockService:i,seriesModel:o}=t,{isDiscrete:a,isDimensionLocked:s}=r.meta;if(!a||s)return!1;const l=[...o.meta.seriesComponentKeys,cs.COMPONENT.AXIS.MAJOR],c=[{key:l[0],contexts:["selection"],action:"set",data:["selectionDimension"]}];return n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?I({actions:e,componentKey:"discrete-range-brush",components:c,dock:i.meta.major.dock,eventKey:"discreteRange",fillTargets:[cs.COMPONENT.AXIS.MAJOR],targets:l}):function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map(e=>`@${e}`).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[Md(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:c,targets:l,fillTargets:[cs.COMPONENT.AXIS.MAJOR],dock:i.meta.major.dock},{actions:e})}const Nd={components:[],interactions:[]};function Od({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const i=function({actions:e,models:t,isUnsupportedFeature:n}){const{flags:r,dockService:i,seriesModel:o,layoutService:a}=t,{isDimensionLocked:s,isBarSeriesStacked:l,isLineStacked:c}=a.meta;if(s||l||c||n?.("rangeSelections"))return!1;const u=[cs.COMPONENT.AXIS.MINOR.PRIMARY,`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,...o.query.series(us.TYPE.MARKER).filter(e=>e.isPrimary).map(e=>Hl(cs.COMPONENT.MARKER,e)),...o.query.series(us.TYPE.LINE).filter(e=>e.isPrimary).map(e=>Hl(cs.COMPONENT.POINT,e))];return r.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,componentKey:"minor-range-brush",dock:i.meta.minor.dock,eventKey:"minorRange",fillTargets:[cs.COMPONENT.AXIS.MINOR.PRIMARY],onEdited:()=>{e.select.emit("end","minorRange")},scale:cs.SCALE.MINOR.PRIMARY,targets:u}):Ed({eventName:"minorRange",key:"minor-range-brush",targets:u,fillTargets:[cs.COMPONENT.AXIS.MINOR.PRIMARY],dock:i.meta.minor.dock,scale:cs.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Nd,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{flags:r,dockService:i,seriesModel:o,layoutService:a}=t;if(a.meta.isDimensionLocked||a.meta.isBarSeriesStacked||n?.("rangeSelections"))return!1;const s=[cs.COMPONENT.AXIS.MINOR.SECONDARY,`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,...o.query.series(us.TYPE.MARKER).filter(e=>!e.isPrimary).map(e=>Hl(cs.COMPONENT.MARKER,e)),...o.query.series(us.TYPE.LINE).filter(e=>!e.isPrimary).map(e=>Hl(cs.COMPONENT.POINT,e))];return r.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,componentKey:"minor-secondary-range-brush",dock:i.meta.minorSecondary.dock,eventKey:"minorRange-secondary",fillTargets:[cs.COMPONENT.AXIS.MINOR.SECONDARY],onEdited:()=>{e.select.emit("end","minorRange-secondary")},scale:cs.SCALE.MINOR.SECONDARY,targets:s}):Ed({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:s,fillTargets:[cs.COMPONENT.AXIS.MINOR.SECONDARY],dock:i.meta.minorSecondary.dock,scale:cs.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Nd,a=Ad({actions:e,models:n})||Nd,s=function({actions:e,chart:t,models:n}){const{flags:r,layoutService:i,dockService:o,seriesModel:a}=n,{isContinuous:s,isTime:l}=i.meta;if(!s)return!1;const c=l?[cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS],u=[`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,...a.query.series(us.TYPE.MARKER).map(e=>Hl(cs.COMPONENT.MARKER,e)),...a.query.series(us.TYPE.LINE).map(e=>Hl(cs.COMPONENT.POINT,e)),...c],m=({datum:e,data:n,scale:r})=>{const i=l?r.formatter():r.data().fields[0].formatter(),o=t.scale(cs.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`};return r.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,componentKey:"continuous-range-brush",dock:o.meta.major.dock,eventKey:"continuousRange",fillTargets:c,multiple:!0,observeBrush:!0,scale:l?cs.SCALE.MAJOR_INNER:cs.SCALE.MAJOR,targets:u,toLabel:m}):Ed({eventName:"continuousRange",key:"continuous-range-brush",targets:u,fillTargets:c,dock:o.meta.major.dock,scale:l?cs.SCALE.MAJOR_INNER:cs.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel:m},{actions:e})}({actions:e,chart:t,models:n})||Nd,l=function({actions:e,models:t}){const{flags:n,colorService:r,layoutService:i}=t,[o]=r.custom.legendComponents(),a=r.custom.wrappedScales(),{isDimensionLocked:s}=i.meta;if(s||!o)return!1;const l=`${cs.SCALE.COLOR}Range`,{type:c,key:u}=o,m=a[l];return!("legend-seq"!==c||!m||m.min>=m.max)&&(n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,bubblesPlacement:"outside",componentKey:"legend-range-brush",dock:o.layout.dock,eventKey:"legendRange",fillTargets:[u],onEdited:()=>{e.select.emit("end","legendRange")},scale:l,targetFillSelector:'[id="legend-seq-ticks"]',targets:[u],targetSelector:'[id="legend-seq-target"]'}):Ed({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:o.layout.dock,scale:l,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e}))}({actions:e,models:n})||Nd;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function Td({actions:e,models:t}){const{flags:n,layoutService:r,seriesModel:i}=t,{seriesComponentKeys:o}=i.meta;if(r.meta.isDimensionLocked)return{components:[],interactions:[]};const a={key:"lasso",componentTargetKey:o[0],components:o.map(e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]}))},s={actions:e};return n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?k({actions:e,componentKey:"lasso",components:o.map(e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})),targetKeys:[o[0]]}):function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=fd(n);return{interactions:[yd(n,t)],components:[r]}}(a,s)}function Ld({chart:e,chartModel:t,colorService:n,context:r,resources:i,viewCache:o,scales:a,models:s}){const{layoutService:l,dockService:c,themeService:u,discreteModel:m,seriesModel:d}=s,p={...n,getMain:()=>({getPaletteColor:n.getPaletteColor.bind(n)})},h=[],f=l.getLayoutValue("plugins");if(!Array.isArray(f)||0===f.length)return h;const{allSeries:g,seriesComponentKeys:y}=d.meta,[v]=y;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=de.generateId)})}(f);const E=[{key:cs.COMPONENT.POINT,lines:!0,labels:!1,labelKeys:[cs.COMPONENT.POINT_LABEL]},{key:cs.COMPONENT.FORECAST_POINT,lines:!0,labels:!1,labelKeys:[cs.COMPONENT.FORECAST_POINT_LABEL]}],x=function(e){const t=[];return e.forEach(e=>{const n=t[t.length-1],r=n?.[0],i=e?.type===r?.type,o=e?.scale===r?.scale;let a=!1;"point"===e?.type?a=o&&i:"line"===e?.type&&(a=i&&o&&!e?.showPoints&&!r?.showPoints),a?n.push(e):t.push([e])}),t}(M);return x.forEach((n,i)=>{const o=`points-addon-combo-chart-${i}`,s=`lines-addon-combo-chart-${i}`;switch(S="point"===n[0].type?n[0]?.scale||g[0]?.scale:n[0]?.points?.[0]?.scale??g[0]?.scale,n[0]?.type){case"point":h.push(Ha({chart:e,chartModel:t,discreteModel:m,colorService:p,themeService:u,layoutService:l,dockService:c,rtl:r.rtl,majorScale:cs.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:o})),E.push({key:o,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":h.push(function({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:i,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:c,data:u,key:m,scales:d={}}){if(!Array.isArray(u)||0===u.length)return!1;const p={resolveUIColor:r.getMain().getPaletteColor},h="horizontal"===o.meta.major.orientation,f=!(!h||!a),{canBeContinuous:g,isContinuous:y}=i.meta,v=i.getLayout(),S=ia.getDimensionValuesInfo({layout:v,canBeContinuous:g,discreteModel:n,layoutService:i}),M=[];u.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,style:0===r?e.style:void 0}));M.push(...n)});const E={},x=[];u.forEach(e=>x.push(...(e?.points??[]).map(e=>e.dimensionValue))),x.forEach(e=>{S[e]&&(E[e]?(E[e].innerValues=S[e].innerValues,E[e].minOrder=Math.min(E[e].minOrder,S[e].minOrder),E[e].maxOrder=Math.max(E[e].maxOrder,S[e].maxOrder),E[e].isMinOrderOk=E[e].isMinOrderOk||S[e].isMinOrderOk,E[e].isMaxOrderOk=E[e].isMaxOrderOk||S[e].isMaxOrderOk):E[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},E[e].numInnerValues=(E[e].maxOrder||0)-(E[e].minOrder||0)+1)});const b=M[0];M.forEach(t=>{const n=Ba({point:t,dimensionValueInfo:E,layoutService:i}),r=t?.scale,o=b?.scale,a=i?.meta?.isButterfly,s=i?.meta?.isStacked,l=E[t.dimensionValue]?.dataNode;let c=n;const u=o&&r&&o!==r,m=a&&1===t.measureIndex,p=s&&Array.isArray(l);if(u)c=function(e,t,n){const r=t.min(),i=t.max(),o=n.min(),a=n.max();return i===r?o:o+(e-r)/(i-r)*(a-o)}(n,d[r]||e.scale(r),d[o]||e.scale(o));else if(m)c=-n;else if(p&&void 0!==t.measureIndex&&Array.isArray(l)){const e=l.slice(0,t.measureIndex+2),n=l[t.measureIndex+1]?.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);c=e.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}t.validMeasureValue=c});const C={scale:s,fn:({datum:t})=>{const n=e.scale(s),r=t.value.dimensionValue;return y?n("string"==typeof r?""===r?void 0:+r:r):void 0!==E[r]?ia.getScaledPosition({scale:n,value:E[r].id,valueInfo:E[r],size:e.component(c)?.rect[h?"width":"height"],align:"center",invert:f,layoutService:i,isContinuous:y}):void 0}},A={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:m,type:"line",data:M,settings:{connect:!0,coordinates:{major:h?C:A,minor:h?A:C,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.style?.lineCurve??Wa,line:{strokeWidth:({datum:e})=>e.value.style?.lineThickness??Ya,stroke:({datum:e})=>Fa({colorModel:p,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.style?.lineType}}},animations:{enabled:t.query.animationsEnabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:m,colorService:p,layoutService:l,dockService:c,rtl:r.rtl,majorScale:cs.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:s,scales:a})),n.forEach(n=>{n?.showPoints&&n?.points?n.points.forEach((n,i)=>{const o=`points-${i}-for-${s}`;h.push(Ha({chart:e,chartModel:t,discreteModel:m,colorService:p,themeService:u,layoutService:l,dockService:c,rtl:r.rtl,majorScale:cs.SCALE.MAJOR,minorScale:n.scale,mainComponentKey:v,data:[n],key:o})),E.push({key:o,lines:!0,labels:!0,duplicates:!0})}):n?.points&&E.push({key:s,lines:!0,labels:!1,duplicates:!0,points:n.points})})}}),h.push(function({layoutService:e,dockService:t,chartModel:n,themeService:r,configs:i,cache:o}){const a=e.getLayoutValue("plugins"),{rtl:s}=t.config,{orientation:l}=t.meta.major,{isOneDimensional:c,isStacked:u}=e.meta,m=r.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:_a(),settings:{all:!0,cache:o,configs:i,label:e=>e.value?.label?.value?e.value?.label?.value:u?e.point?.label:e.end?.label,lineId:({data:e})=>{for(let t=0;t<a.length;t++){const n=a[t];switch(n.type){case"point":if(n.cId===e.value?.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value?.cId))return n.cId}}return e.value?.cId||e.line?.value},majorValue:e=>e.value?.dimensionValue?e.value.dimensionValue:c?e.value:e.major?.value,orientation:l,pointValue:e=>e.value?.validMeasureValue,rtl:s},style:m.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}}({layoutService:l,dockService:c,chartModel:t,themeService:u,configs:E,cache:o})),h}function Rd({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:c,pluginService:u}=n,m=n.layoutService.getLayout(),{options:d}=r,p=function({layout:e,options:t={}}){return!(!e?.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:m,options:d}),h=(f={logicalSize:p,minCenterRatio:0},{layoutModes:ae.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,viewState:r,viewCache:i,actions:o}){const{colorService:a,layoutService:s,dockService:l,tooltipService:c,disclaimerService:u}=t,m=function({environment:e,models:t}){const{translator:n,options:r}=e,{themeService:i,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=i.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:a.alignment},settings:{isRTL:"rtl"===r.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return u.getHasSuppressingDisclaimer()?[m]:[...au({models:t}),...Dl({models:t}),...tu({chart:e,models:t,environment:n,viewState:r,viewCache:i}),Eu({models:t,environment:n}),...Fl({models:t,environment:n}),...uu({models:t,environment:n,actions:o,viewCache:i}),bo({viewState:r,viewCache:i,layoutService:s,dockService:l}),...yu({models:t}),...vu({chart:e,models:t,environment:n}),mu({models:t,environment:n,viewState:r,viewCache:i}),...a.custom.legendComponents(),Su(t),...gu({chart:e,models:t,viewState:r,viewCache:i,environment:n}),...c.getComponents(),m].filter(Boolean)}({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s}),y=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:i}=n,o=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=Cd({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=Od({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=Td({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:s,chart:t,models:n,isUnsupportedFeature:l}),v=function({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...Ll({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[cs.SCALE.MINOR.PRIMARY]:Rl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:i}),[cs.SCALE.MINOR.SECONDARY]:Rl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:i}),[cs.SCALE.MINOR.REDUCED_PRIMARY]:Il({layoutService:o,tickModel:s,dockService:u,environment:i}),[cs.SCALE.MINOR.REDUCED_SECONDARY]:Il({layoutService:o,tickModel:l,dockService:u,environment:i}),...c.custom.wrappedScales()}}({picasso:e,models:n,viewState:o,viewCache:a,environment:r}),S=Ld({chart:t,chartModel:{query:{animationsEnabled:n.animationsModel.enabled}},colorService:c,context:{},resources:{},viewCache:a,scales:v,models:n}),M=u.extendComponents([...g,...y.components,...S]);return{collections:Ml({models:n}),scales:v,components:M,formatters:xu({models:n}),interactions:hd({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s,selectables:y}),strategy:h,palettes:c.getPalettes()}}const Id=({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})=>{const{width:m,height:d}=i(),[,p]=o(async()=>{if(!(t?.update&&n&&r&&s))return;const{colorService:i,discreteModel:o,dockService:p,layoutService:h,refLineModel:f,animationsModel:g,styleModel:y}=n;function v(){t.update({settings:Rd({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})})}p.update({width:m,height:d}),i.custom.updateLegend(y),f.update({picasso:e,chart:t,models:n,environment:r,viewState:s,viewCache:l,actions:c});const S=h.getDataPages();g.meta.isSizeChanging=!0,h.setDataPages([]),v(),h.setDataPages(S),h.meta.isContinuous||await o.command.initialize(),v()},[m,d]);if(p)throw p},kd=[cs.COMPONENT.AXIS_TITLE.MAJOR,cs.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,cs.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,cs.COMPONENT.GRID_LINE,cs.COMPONENT.ZERO_LINE],wd=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:cs.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Dd=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:cs.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[];const qd={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Pd(e){return qd[e]||e}function zd(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach(t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=Pd(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach(e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])}),l.push(t))}),i.gestures.forEach(t=>{const n=Pd(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 m(){l.forEach(e=>{Object.keys(e.events).forEach(t=>{a.off(t,e.events[t])}),a.remove(e.options.event)}),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),m(),c&&u()},off(){c=!1,m()},on(){c=!0,0===l.length&&u()},destroy(){m(),a&&a.destroy(),a=null,o=null,i=null}}}}function $d(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map(t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:$d(i,t,n)},i}function _d(e){const t=e.scale("band");e.scale("group-by-measure",function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)}),s.splice(-1),i.domain(s),$d(i,a,l,e.invert)})}const Fd={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,m=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,m=t<.5?180:0),a(re({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}};function Bd({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const m=re({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach(t=>{m[t]=r[t].items[e]});const d=o?n:t,p=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:m[a].width,minWidthPx:m[a].minWidthPx,maxWidthPx:m[a].maxWidthPx,maxMajorWidth:d}),h=(u-p)/2,f=h+m.major+p/2;return{item:m,boxCenter:f,boxWidth:p,boxPadding:h,rendWidth:t,rendHeight:n}}function Vd({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=re(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.major;let m;m="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:re(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:re(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const d=i.minor||{};let p;const h={major:m,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:re(!0,{},{start:{scale:d.scale,ref:"start"},end:{scale:d.scale,ref:"end"},min:{scale:d.scale,ref:"min"},max:{scale:d.scale,ref:"max"},med:{scale:d.scale,ref:"med"}},d)})};for(let n=0,r=e.length;n<r;n++)p=e[n],h[p]=s.resolve({data:t,defaults:l[p],settings:i[p],scaled:c});return h}const jd=["oob"];const Ud={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Vd({keys:jd,data:i,defaultSettings:{oob:Fd.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,m=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Bd}){const l=[],{items:c}=r.major;for(let u=0,m=c.length;u<m;u++){const{item:m,boxCenter:d,rendWidth:p,rendHeight:h}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),f=c[u].data,g=[];if(m.oob.show){g.push(Fd.createOob({oob:m.oob,dockValue:a,boxCenter:d,rendWidth:p,rendHeight:h,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:jd,symbol:s,dockValue:n});return m}},Hd={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Yd=["hat"];function Wd(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function Xd({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const m=(n+e.major)*l;let d=[{[a]:m,[s]:0+c},{[a]:m+t*u*l,[s]:8},{[a]:m+t*l,[s]:0+c},{[a]:m+t*l,[s]:0+c+10},{[a]:m,[s]:0+c+10}];const p=re({},e.hat,{type:"path",d:Wd(d)});d=[{[a]:m,[s]:0},{[a]:m+t*(1-u)*l,[s]:0+c-8},{[a]:m+t*l,[s]:0},{[a]:m+t*l,[s]:-10},{[a]:m,[s]:-10}];return[p,re({},e.hat,{type:"path",d:Wd(d)})]}const Kd={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=Vd({keys:Yd,data:r,defaultSettings:Hd,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=Bd}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:p}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),h=s[l].data,f=[];c.hat.show&&f.push(...Xd({item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:p,flipXY:n}));const g={type:"container",data:h,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Yd});return c}};var Gd={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var Jd={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],separateStacking:!1,orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10,isLineStacked:!1},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l,separateStacking:c,isLineStacked:u}=this.settings.settings,m=this.settings.settings.primaryExtremum(),d=this.settings.settings.secondaryExtremum(),p=s.length&&void 0!==m,h=l.length&&void 0!==d;if(!p&&!h)return[];const f=s.map(e=>e.ref),g=l.map(e=>e.ref),y=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[],isLineStacked:s,separateStacking:l}){const c=[],u=[];return o.length&&u.push({isPrimary:!0}),a.length&&u.push({isPrimary:!1}),u.forEach(o=>{const a=o.isPrimary?t:n,u=o.isPrimary?r:i;c.push((({type:e,extremum:t,separateStacking:n,items:r,isLineStacked:i})=>{const o="max"===e?e=>e>t:e=>e<t,a=r.filter(e=>o(((e,t,n)=>{const r=n.isMarker?.value;return t?r?n.point.value:n.point.value<0?n.start.value:n.end.value:e&&r?n.point.value:n.end.value})(i,n,e)));return a})({type:e,extremum:a,items:u,isLineStacked:s,separateStacking:l}))}),(({items:e})=>{const t=[],n=[];return e.forEach(e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))}),n})({items:c.reduce((e,t)=>e.concat(t),[])})}({type:t,primaryExtremum:m,secondaryExtremum:d,primaryItems:e.filter(e=>f.includes(e.end?.source?.field||e.point?.source?.field)),secondaryItems:e.filter(e=>g.includes(e.end?.source?.field||e.point?.source?.field)),primarySeries:s,secondarySeries:l,separateStacking:c,isLineStacked:u});if(!y.length)return[];const v="horizontal"===n,S=this.rect[v?"width":"height"],M=this.resolver.resolve({data:{items:y},settings:{major:a},scaled:{major:S}}),E=("max"===t?90:-90)-(v?0:90)-(!v&&r?180:0),x=o/2*i,{fill:b}=this.settings.style,C=M.items.map(e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:b,startAngle:E,x:v?S*e.major:x,y:v?x:S*e.major,data:e.data}));return C}};function Zd({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function Qd({chart:e,seriesInfo:t}){const n={primary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}},secondary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}}},r=[...t.primary.map(e=>e.key),...t.secondary.map(e=>e.key)];return e.findShapes("path").filter(e=>r.some(t=>t===e.key)).reduce((e,n)=>{let r=t.primary.some(e=>e.key===n.key)?e.primary:e.secondary;return r=Object.hasOwnProperty.call(n.attrs,"stroke-linejoin")?r.linePaths:r.areaPaths,r.push(n),e},n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.lineMap[e]){const[t]=r.linePaths.filter(t=>t.data&&t.data.typeIndex.value===e);r.lineMap[e]=t}return r.lineMap[e]},getArea:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.areaMap[e]){const[t]=r.areaPaths.filter(t=>t.data&&t.data.typeIndex.value===e);r.areaMap[e]=t}return r.areaMap[e]}}}function ep({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function tp({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(cs.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some(t=>t.min<=e&&o(e,t.max))}}function np({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:c,legendTap:u}=t,m=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let d=[c?e=>e.color.value:r[m]].filter(Boolean);if(i&&l&&d.push(e=>e.color.value),!i&&u&&(d=[e=>e.color.value]),!d.length)return[];const p=function({brush:e,chart:t}){return("value"===e.type?ep:tp)({brush:e,chart:t})}({brush:s,chart:o});return p?n.reduce((e,t,n)=>(d.some(e=>p({value:e(t)}))&&e.push({item:t,index:n}),e),[]):[]}function rp({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map(e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n})}function ip({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(cs.SCALE.COLOR),a=t.filter(e=>-1!==n.indexOf(e.index)).map(e=>e.item.end.value),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/u))})),d=m.map(e=>e.offset),p=d.lastIndexOf(0),h=d.indexOf(1),f=m.slice(-1===p?0:p,-1===h?m.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function op({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(cs.SCALE.COLOR),a=t.filter(e=>-1!==n.indexOf(e.index)).map(e=>e.item.end.value),s=Math.min(...a),l=Math.max(...a)-s,c=0===l?1:l,u=o.domain(),m=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=o(t)||i;m.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const r=u[e+1];m.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/c))})}const d=m.map(e=>e.offset),p=d.lastIndexOf(0),h=d.indexOf(1),f=m.slice(-1===p?0:p,-1===h?m.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function ap({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:m}){const d=r[e];if("gradient"!==d.type)return d;const{type:p,nil:h}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:c}){const u=e.scale(cs.SCALE.MAJOR),m=e.scale(cs.SCALE.COLOR),d=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),p=t.filter(e=>-1!==n.indexOf(e.index)),h=("vertical"===o&&c?p.reverse():p).map(e=>e.item),f=h.map(e=>d(e.major.value)),g=Math.min(...f),y=Math.max(...f)-g,v=0===y?1:y,S=f.map((e,t)=>0===t?0:t===f.length-1?1:(e-g)/v),M=[];for(let e=0;e<h.length;e++){const t=h[e],n=a?t.color.value:m(t.color.value)||i,r=S[e];M.push({color:n,offset:0===e?0:Math.max(0,M[M.length-1].offset)}),M.push({color:n,offset:e===h.length-1?1:Math.max(0,parseFloat((r+(S[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:M}}({chart:t,selected:a,connection:n,gradient:d,fallback:h,orientation:u,isColorCode:"color"===p,groupedByMeasure:l,itemsPerGroup:c,rtl:m});return("continuous"===p?ip:op)({chart:t,selected:a,connection:n,gradient:d,fallback:h})}function sp({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:p}){const h=t.getLine(l,c),{attrs:f}=h,g=rp({d:f.d}),y=m.map(t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:m,count:d}){return{path:l.map((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`}).join(""),attrs:u,stroke:ap({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:m})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:f,rtl:d,count:p}));return{lines:y,commands:g}}function lp({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,rtl:p,highlightArea:h,isLineStacked:f}){const g=function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter(e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some(t=>t.typeIndex===e.typeIndex.value)})}({items:o,selectionInfo:i,seriesInfo:n}),y=function({items:e,seriesInfo:t}){const n=e.reduce((e,n,r)=>{const i=n.typeIndex.value;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:n.colorMeasureIdx?.value,primary:t.primary.some(e=>e.typeIndex===i)}),e[i].items.push(n),e},{});return Object.keys(n).map(e=>n[e]).sort((e,t)=>e.index-t.index).map(e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx}))}({items:g,seriesInfo:n}),{lines:v,areas:S}=y.reduce((n,o)=>{const g=np({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l(o.measureIx),chart:e});if(g.length<2)return n;const y=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:g});if(!y.length)return n;const{lines:v,commands:S}=sp({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:p,count:o.items.length});n.lines.push(...v);const M=function({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:p,commands:h,isLineStacked:f}){const g=t.getArea(l,c);if(!g)return[];const{attrs:y,key:v}=g,S="horizontal"===s,M=e.component(v).rect.computedInner[S?"height":"width"]*e.scale(c?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY)(0),E=[];let x;return m.forEach(e=>{e.forEach((t,n)=>{const r=h[t],i={x:r.x,y:r.y,raw:r.raw};if(0===n||"M"===r.letter||e[n-1]!==e[n]-1)E.push({lines:[i],first:{x:i.x,y:i.y},connection:[e[n]]});else{const t=E[E.length-1];t.lines.push(i),t.connection.push(e[n])}})}),f&&(x=rp({d:y.d}).reduce((e,t,n)=>(0===n||"M"===t.letter?e.push([t]):e[e.length-1].push(t),e),[])),E.map(t=>{const{lines:l}=t,c=l.map((e,t)=>0===t?`M${e.x},${e.y}`:e.raw);if(f){const e=t.connection[0],n=x.reduce((t,n)=>(t.found||(t.counted+=n.length/2,e<t.counted&&(t.areaCommand=n,t.found=!0)),t),{counted:0,found:!1}),r=x.indexOf(n.areaCommand),i=x.reduce((e,t,n)=>(n<r&&(e+=t.length/2),e),0),o=n.areaCommand,a=o.slice(o.length/2,o.length).reverse();t.connection.map(e=>a[e-i].raw).reverse().forEach((e,t)=>{if(0===t&&"C"===e.charAt(0)){const t=e.substring(1).split(","),n={x:0,y:0};[,,,,n.x,n.y]=t,c.push(`L${n.x},${n.y}`)}else c.push(e)})}else{const e=l[l.length-1],n=S?e.x:M,r=S?M:e.y;c.push(`L${n},${r}`);const i=S?t.first.x:M,o=S?M:t.first.y;c.push(`L${i},${o}`)}return c.push("Z"),{path:`M${c.join("").substring(1)}`,attrs:y,fill:ap({property:"fill",chart:e,connection:t.connection,attrs:y,selected:u,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,rtl:d}),key:v}})}({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:p,count:o.items.length,commands:S,isLineStacked:f});return h&&n.areas.push(...M),n},{lines:[],areas:[]}),M=[];return v.forEach(e=>M.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"})),h&&S.forEach(e=>M.push({type:"path",d:e.path,fill:e.fill,opacity:e.attrs.opacity})),M}var cp={require:["chart","renderer"],defaultSettings:{settings:{highlightArea:()=>!0,seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1,isLineStacked:!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:Qd({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=lp({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked});this.renderer.render(e)}),this.addListener("end",()=>{this.renderer.render([])})},render(){this.state.pathModel=Qd({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return lp({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked})},destroyed(){this.removeListeners()}};const up=()=>{const e=Y();return e.use(W),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",zd(e))};e.interaction("hammer",zd(Hammer))}(H)),e.use(_d),e.renderer("react-qcm",X),e.component("axis-title",K),e.component("disclaimer",G),e.component("scrollbar",vl),e.component("point-label",w),e.component("label-space",Gd),e.component("time-axis",cd.picassoComponents.timeAxis),e.component("axis-overlay",cd.picassoComponents.axisOverlay),e.component("reference-line-labels",Aa),e.component("box-sliced-hat",Kd),e.component("box-out-of-bounds",Ud),e.component("data-out-of-bounds-marker",Jd),e.component("scroll-hint",xo),e.component("brush-highlighter",cp),e.scale("time",cd.picassoScales.time),e.symbol("line-point",Zd),e},mp=e=>"[object Object]"===Object.prototype.toString.call(e),dp=e=>Array.isArray(e);function pp(e,t){if(e===t)return!0;if(dp(e)){if(!dp(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!pp(e[n],t[n]))return!1;return!0}if(mp(e)){if(!mp(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!pp(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function hp({enable:e=!0}={}){const t=a(),i=()=>Date.now().toString()+Math.random(),[o,s]=n(i()),l={properties:void 0};return r(()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then(e=>{const t=re(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){const n={properties:!1,exclude:!1};if(e===t)return n;const r=re(!0,{},e),i=re(!0,{},t);return n.exclude=!pp(r.qHyperCubeDef?.qLayoutExclude,i.qHyperCubeDef?.qLayoutExclude),delete r.qHyperCubeDef?.qLayoutExclude,delete i.qHyperCubeDef?.qLayoutExclude,n.properties=!pp(r,i),n}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(i())})};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}},[e]),o}const fp={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},gp=e=>void 0===e.marker?fp.circle:fp[e.marker],yp=e=>void 0===e.markerFill||e.markerFill;function vp({series:e,layoutService:t}){switch(Mu(e)){case us.TYPE.MARKER:return(e=>({marker:gp(e),fill:yp(e)}))(e);case us.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case us.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function Sp(e=us.NOPE_SERIES,t=!0){return t?e.axis===us.AXIS.PRIMARY:e.axis===us.AXIS.PRIMARY||Mu(e)===us.TYPE.BAR}var Mp,Ep,xp,bp,Cp,Ap,Np,Op,Tp,Lp,Rp,Ip,kp,wp,Dp,qp,Pp,zp,$p,_p,Fp,Bp,Vp,jp,Up,Hp,Yp,Wp,Xp,Kp,Gp,Jp,Zp,Qp,eh,th,nh,rh,ih,oh,ah,sh,lh,ch,uh,mh,dh,ph,hh,fh,gh,yh,vh,Sh,Mh,Eh,xh,bh,Ch,Ah,Nh,Oh,Th,Lh,Rh,Ih,kh,wh,Dh,qh,Ph,zh,$h,_h,Fh,Bh,Vh,jh,Uh,Hh,Yh,Wh,Xh,Kh,Gh,Jh,Zh,Qh,ef,tf,nf,rf={exports:{}};function of(){if(Ep)return Mp;Ep=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return Mp={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function af(){if(bp)return xp;bp=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return xp=e}function sf(){return Cp||(Cp=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=of(),o=af(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let m=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",i],[d,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=m++;o(e,i,t),u[e]=i,l[i]=t,c[i]=r,a[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),h("FULL",`^${l[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),h("LOOSE",`^${l[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),h("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(rf,rf.exports)),rf.exports}function lf(){if(Np)return Ap;Np=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ap=n=>n?"object"!=typeof n?e:n:t}function cf(){if(Tp)return Op;Tp=1;const e=/^[0-9]+$/,t=(t,n)=>{if("number"==typeof t&&"number"==typeof n)return t===n?0:t<n?-1:1;const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return Op={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function uf(){if(Rp)return Lp;Rp=1;const e=af(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=of(),{safeRe:r,t:i}=sf(),o=lf(),{compareIdentifiers:a}=cf();class s{constructor(a,l){if(l=o(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=c[5]?c[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(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof s||(t=new s(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 r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,i)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,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?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];if(!1===n&&(r=[t]),((e,t)=>{const n=t.split(".");if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(0!==a(e[t],n[t]))return!1;return!0})(this.prerelease,t)){const e=this.prerelease[t.split(".").length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Lp=s}function mf(){if(kp)return Ip;kp=1;const e=uf();return Ip=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}}}function df(){if(Gp)return Kp;Gp=1;const e=uf();return Kp=(t,n,r)=>new e(t,r).compare(new e(n,r))}function pf(){if(nh)return th;nh=1;const e=uf();return th=(t,n,r)=>{const i=new e(t,r),o=new e(n,r);return i.compare(o)||i.compareBuild(o)}}function hf(){if(lh)return sh;lh=1;const e=df();return sh=(t,n,r)=>e(t,n,r)>0}function ff(){if(uh)return ch;uh=1;const e=df();return ch=(t,n,r)=>e(t,n,r)<0}function gf(){if(dh)return mh;dh=1;const e=df();return mh=(t,n,r)=>0===e(t,n,r)}function yf(){if(hh)return ph;hh=1;const e=df();return ph=(t,n,r)=>0!==e(t,n,r)}function vf(){if(gh)return fh;gh=1;const e=df();return fh=(t,n,r)=>e(t,n,r)>=0}function Sf(){if(vh)return yh;vh=1;const e=df();return yh=(t,n,r)=>e(t,n,r)<=0}function Mf(){if(Mh)return Sh;Mh=1;const e=gf(),t=yf(),n=hf(),r=vf(),i=ff(),o=Sf();return Sh=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return i(a,l,c);case"<=":return o(a,l,c);default:throw new TypeError(`Invalid operator: ${s}`)}}}function Ef(){if(Th)return Oh;Th=1;const e=/\s+/g;class t{constructor(n,o){if(o=r(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(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&&y(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){e=e.replace(f,"");const t=((this.options.includePrerelease&&p)|(this.options.loose&&h))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,l=a?s[c.HYPHENRANGELOOSE]:s[c.HYPHENRANGE];e=e.replace(l,L(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[c.COMPARATORTRIM],u),o("comparator trim",e),e=e.replace(s[c.TILDETRIM],m),o("tilde trim",e),e=e.replace(s[c.CARETTRIM],d),o("caret trim",e);let y=e.split(" ").map(e=>S(e,this.options)).join(" ").split(/\s+/).map(e=>T(e,this.options));a&&(y=y.filter(e=>(o("loose invalid filter",e,this.options),!!e.match(s[c.COMPARATORLOOSE])))),o("range list",y);const v=new Map,M=y.map(e=>new i(e,this.options));for(const e of M){if(g(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const E=[...v.values()];return n.set(t,E),E}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(t=>v(t,n)&&e.set.some(e=>v(e,n)&&t.every(t=>e.every(e=>t.intersects(e,n)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}Oh=t;const n=new(Nh?Ah:(Nh=1,Ah=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}})),r=lf(),i=xf(),o=af(),a=uf(),{safeRe:s,src:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:m,caretTrimReplace:d}=sf(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:h}=of(),f=new RegExp(l[c.BUILD],"g"),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,v=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},S=(e,t)=>(e=e.replace(s[c.BUILD],""),o("comp",e,t),e=b(e,t),o("caret",e),e=E(e,t),o("tildes",e),e=A(e,t),o("xrange",e),e=O(e,t),o("stars",e),e),M=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{const n=t.loose?s[c.TILDELOOSE]:s[c.TILDE],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,i,a,s)=>{let l;return o("tilde",e,t,n,i,a,s),M(n)?l="":M(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:M(a)?l=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:s?(o("replaceTilde pr",s),l=`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`):l=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,o("tilde return",l),l})},b=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{o("caret",e,t);const n=t.loose?s[c.CARETLOOSE]:s[c.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),M(n)?l="":M(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:M(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l})},A=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map(e=>N(e,t)).join(" ")),N=(e,t)=>{e=e.trim();const n=t.loose?s[c.XRANGELOOSE]:s[c.XRANGE];return e.replace(n,(n,r,i,a,s,l)=>{if(o("xRange",e,n,r,i,a,s,l),((e,t,n)=>M(e)&&!M(t)||M(t)&&n&&!M(n))(i,a,s))return e;const c=M(i),u=c||M(a),m=u||M(s),d=m;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(a=0),s=0,">"===r?(r=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):u?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:m&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n})},O=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[c.STAR],"")),T=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),L=e=>(t,n,r,i,o,a,s,l,c,u,m,d)=>`${n=M(r)?"":M(i)?`>=${r}.0.0${e?"-0":""}`:M(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=M(c)?"":M(u)?`<${+c+1}.0.0-0`:M(m)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${m}-${d}`:e?`<${c}.${u}.${+m+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return Oh}function xf(){if(Rh)return Lh;Rh=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}Lh=t;const n=lf(),{safeRe:r,t:i}=sf(),o=Mf(),a=af(),s=uf(),l=Ef();return Lh}function bf(){if(kh)return Ih;kh=1;const e=Ef();return Ih=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Ih}function Cf(){if(Vh)return Bh;Vh=1;const e=Ef();return Bh=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Bh}function Af(){if(Uh)return jh;Uh=1;const e=uf(),t=xf(),{ANY:n}=t,r=Ef(),i=bf(),o=hf(),a=ff(),s=Sf(),l=vf();return jh=(c,u,m,d)=>{let p,h,f,g,y;switch(c=new e(c,d),u=new r(u,d),m){case">":p=o,h=s,f=a,g=">",y=">=";break;case"<":p=a,h=l,f=o,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(c,u,d))return!1;for(let e=0;e<u.set.length;++e){const r=u.set[e];let i=null,o=null;if(r.forEach(e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,o=o||e,p(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)}),i.operator===g||i.operator===y)return!1;if((!o.operator||o.operator===g)&&h(c,o.semver))return!1;if(o.operator===y&&f(c,o.semver))return!1}return!0},jh}var Nf=function(){if(nf)return tf;nf=1;const e=sf(),t=of(),n=uf(),r=cf(),i=mf(),o=function(){if(Dp)return wp;Dp=1;const e=mf();return wp=(t,n)=>{const r=e(t,n);return r?r.version:null}}(),a=function(){if(Pp)return qp;Pp=1;const e=mf();return qp=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null}}(),s=function(){if($p)return zp;$p=1;const e=uf();return zp=(t,n,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,o).version}catch(e){return null}}}(),l=function(){if(Fp)return _p;Fp=1;const e=mf();return _p=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),o=r.compare(i);if(0===o)return null;const a=o>0,s=a?r:i,l=a?i:r,c=!!s.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"},_p}(),c=function(){if(Vp)return Bp;Vp=1;const e=uf();return Bp=(t,n)=>new e(t,n).major}(),u=function(){if(Up)return jp;Up=1;const e=uf();return jp=(t,n)=>new e(t,n).minor}(),m=function(){if(Yp)return Hp;Yp=1;const e=uf();return Hp=(t,n)=>new e(t,n).patch}(),d=function(){if(Xp)return Wp;Xp=1;const e=mf();return Wp=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null}}(),p=df(),h=function(){if(Zp)return Jp;Zp=1;const e=df();return Jp=(t,n,r)=>e(n,t,r)}(),f=function(){if(eh)return Qp;eh=1;const e=df();return Qp=(t,n)=>e(t,n,!0)}(),g=pf(),y=function(){if(ih)return rh;ih=1;const e=pf();return rh=(t,n)=>t.sort((t,r)=>e(t,r,n))}(),v=function(){if(ah)return oh;ah=1;const e=pf();return oh=(t,n)=>t.sort((t,r)=>e(r,t,n))}(),S=hf(),M=ff(),E=gf(),x=yf(),b=vf(),C=Sf(),A=Mf(),N=function(){if(xh)return Eh;xh=1;const e=uf(),t=mf(),{safeRe:n,t:r}=sf();return Eh=(i,o)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let a=null;if((o=o||{}).rtl){const e=o.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!a||a.index+a[0].length!==i.length);)a&&t.index+t[0].length===a.index+a[0].length||(a=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else a=i.match(o.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===a)return null;const s=a[2],l=a[3]||"0",c=a[4]||"0",u=o.includePrerelease&&a[5]?`-${a[5]}`:"",m=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${s}.${l}.${c}${u}${m}`,o)}}(),O=function(){if(Ch)return bh;Ch=1;const e=mf(),t=of(),n=uf(),r=(t,r)=>{const i=t instanceof n?t.version:t;return e(i,r)},i=(e,t)=>{if(o(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0}return e.format()},o=e=>e.startsWith("pre");return bh=(e,n,o)=>{if(!t.RELEASE_TYPES.includes(n))return null;const a=r(e,o);return a&&i(a,n)}}(),T=xf(),L=Ef(),R=bf(),I=function(){if(Dh)return wh;Dh=1;const e=Ef();return wh=(t,n)=>new e(t,n).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" ")),wh}(),k=function(){if(Ph)return qh;Ph=1;const e=uf(),t=Ef();return qh=(n,r,i)=>{let o=null,a=null,s=null;try{s=new t(r,i)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&-1!==a.compare(t)||(o=t,a=new e(o,i)))}),o},qh}(),w=function(){if($h)return zh;$h=1;const e=uf(),t=Ef();return zh=(n,r,i)=>{let o=null,a=null,s=null;try{s=new t(r,i)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&1!==a.compare(t)||(o=t,a=new e(o,i)))}),o},zh}(),D=function(){if(Fh)return _h;Fh=1;const e=uf(),t=Ef(),n=hf();return _h=(r,i)=>{r=new t(r,i);let o=new e("0.0.0");if(r.test(o))return o;if(o=new e("0.0.0-0"),r.test(o))return o;o=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let a=null;i.forEach(t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":a&&!n(r,a)||(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}),!a||o&&!n(o,a)||(o=a)}return o&&r.test(o)?o:null},_h}(),q=Cf(),P=Af(),z=function(){if(Yh)return Hh;Yh=1;const e=Af();return Hh=(t,n,r)=>e(t,n,">",r),Hh}(),$=function(){if(Xh)return Wh;Xh=1;const e=Af();return Wh=(t,n,r)=>e(t,n,"<",r),Wh}(),_=function(){if(Gh)return Kh;Gh=1;const e=Ef();return Kh=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r))}(),F=function(){if(Zh)return Jh;Zh=1;const e=bf(),t=df();return Jh=(n,r,i)=>{const o=[];let a=null,s=null;const l=n.sort((e,n)=>t(e,n,i));for(const t of l)e(t,r,i)?(s=t,a||(a=t)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),m="string"==typeof r.raw?r.raw:String(r);return u.length<m.length?u:r},Jh}(),B=function(){if(ef)return Qh;ef=1;const e=Ef(),t=xf(),{ANY:n}=t,r=bf(),i=df(),o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],s=(e,t,s)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=s.includePrerelease?o:a}if(1===t.length&&t[0].semver===n){if(s.includePrerelease)return!0;t=a}const u=new Set;let m,d,p,h,f,g,y;for(const t of e)">"===t.operator||">="===t.operator?m=l(m,t,s):"<"===t.operator||"<="===t.operator?d=c(d,t,s):u.add(t.semver);if(u.size>1)return null;if(m&&d){if(p=i(m.semver,d.semver,s),p>0)return null;if(0===p&&(">="!==m.operator||"<="!==d.operator))return null}for(const e of u){if(m&&!r(e,String(m),s))return null;if(d&&!r(e,String(d),s))return null;for(const n of t)if(!r(e,String(n),s))return!1;return!0}let v=!(!d||s.includePrerelease||!d.semver.prerelease.length)&&d.semver,S=!(!m||s.includePrerelease||!m.semver.prerelease.length)&&m.semver;v&&1===v.prerelease.length&&"<"===d.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,m)if(S&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===S.major&&e.semver.minor===S.minor&&e.semver.patch===S.patch&&(S=!1),">"===e.operator||">="===e.operator){if(h=l(m,e,s),h===e&&h!==m)return!1}else if(">="===m.operator&&!e.test(m.semver))return!1;if(d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(f=c(d,e,s),f===e&&f!==d)return!1}else if("<="===d.operator&&!e.test(d.semver))return!1;if(!e.operator&&(d||m)&&0!==p)return!1}return!(m&&g&&!d&&0!==p||d&&y&&!m&&0!==p||S||v)},l=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return Qh=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=s(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0}}();return tf={parse:i,valid:o,clean:a,inc:s,diff:l,major:c,minor:u,patch:m,prerelease:d,compare:p,rcompare:h,compareLoose:f,compareBuild:g,sort:y,rsort:v,gt:S,lt:M,eq:E,neq:x,gte:b,lte:C,cmp:A,coerce:N,truncate:O,Comparator:T,Range:L,satisfies:R,toComparators:I,maxSatisfying:k,minSatisfying:w,minVersion:D,validRange:q,outside:P,gtr:z,ltr:$,intersects:_,simplifyRange:F,subset:B,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}(),Of=te(Nf),Tf={BAR_IN_SECONDARY_AXIS:"0.23.1"};const Lf=e=>!e||Of.lt(Of.coerce(e),Of.coerce(Tf.BAR_IN_SECONDARY_AXIS)),Rf=({layoutService:e})=>{const t=!Lf(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[us.TYPE.BAR]:0,[us.TYPE.LINE]:0,[us.TYPE.MARKER]:0};return({series:r=us.NOPE_SERIES},i)=>{const o=Sp(r,t),a=Mu(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,collection:o?cs.COLLECTION.PRIMARY:cs.COLLECTION.SECONDARY,options:vp({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter(e=>Mu(e)===t).length,i=n.filter(e=>e.isPrimary),o=n.filter(e=>!e.isPrimary),a=[!!i.length&&i[0],!!o.length&&o[0]].filter(e=>!!e),s=r(n,us.TYPE.BAR),l=r(i,us.TYPE.BAR),c=r(o,us.TYPE.BAR),u=e=>n.filter(t=>Mu(t)===e),m=u(us.TYPE.LINE).map(e=>Hl(cs.COMPONENT.POINT,e)),d=u(us.TYPE.MARKER).map(e=>({key:Hl(cs.COMPONENT.MARKER,e),type:e.options.marker})),p=d.map(e=>e.key),h=[];l>0&&h.push(`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`),c>0&&h.push(`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`);const f=[...h,...m,...p],{MINI_CHART:g}=cs.COMPONENT,y=u(us.TYPE.LINE).map(e=>Hl(g.LINE,e)),v=u(us.TYPE.MARKER).map(e=>Hl(g.MARKER,e)),S=e.meta.isContinuous?[`${g.BAR}-${us.AXIS.PRIMARY}`,`${g.BAR}-${us.AXIS.SECONDARY}`,...y,...v]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:m,markerComponentKeys:p,barComponentKeys:h,seriesComponentKeys:f,miniComponentKeys:S,markers:d},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:u,isPrimary:Sp}}},If=(e,t)=>e.filter(({series:e=us.NOPE_SERIES})=>Mu(e)===t),kf=({series:e=us.NOPE_SERIES})=>e.axis!==us.AXIS.SECONDARY,wf=({series:e=us.NOPE_SERIES})=>e.axis===us.AXIS.SECONDARY;function Df({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 qf({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(ve).then(e=>{const n=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),i="K"===n&&r.length>1&&e[0]?.qIsReduced,o=e.slice(),a=t.getHyperCubeValue("qMeasureInfo"),s=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:o,qDimensionInfo:r.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[a[0],a[0]]:a.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:s}}})}(e,t,{path:"/qHyperCubeDef",rect:Df({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function Pf({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):qf({genericObjectModel:e,layoutService:t})}const zf=e=>"number"==typeof e&&!Number.isNaN(e);function $f({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map(e=>r[e.refIndex]),o=i.filter(e=>Mu(e.series)===us.TYPE.BAR),a=i.filter(e=>Mu(e.series)===us.TYPE.LINE),s=i.filter(e=>Mu(e.series)===us.TYPE.MARKER);return{min:Math.min(...i.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...i.filter(e=>zf(e.qMax)).map(e=>e.qMax)),bar:{min:Math.min(...o.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...o.filter(e=>zf(e.qMax)).map(e=>e.qMax))},line:{min:Math.min(...a.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...a.filter(e=>zf(e.qMax)).map(e=>e.qMax))},marker:{min:Math.min(...s.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...s.filter(e=>zf(e.qMax)).map(e=>e.qMax))}}}}function _f({seriesModel:e,isPrimary:t,type:n}){return function({dataPage:r}){const i=e.query.series(n).filter(e=>e.isPrimary===t).map(e=>e.refIndex),{qMatrix:o}=r,a={min:NaN,max:NaN};return o.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}),a.min=Number.isNaN(a.min)?t:Math.min(t,a.min),a.max=Number.isNaN(a.max)?n:Math.max(n,a.max)}),a}}function Ff({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r,isLineStacked:i}=t.meta,o=n.query.series(us.TYPE.BAR).filter(t=>t.isPrimary===e).length,a=n.query.series(us.TYPE.LINE).filter(t=>t.isPrimary===e).length,s=r&&o>=2,l=i&&a>=2;return s||l?function({isPrimary:e,layoutService:t,seriesModel:n,hasBarStacked:r,hasLineStacked:i}){const o=$f({isPrimary:e,layoutService:t,seriesModel:n}),a=r?_f({seriesModel:n,isPrimary:e,type:us.TYPE.BAR}):()=>({min:1/0,max:-1/0}),s=i?_f({seriesModel:n,isPrimary:e,type:us.TYPE.LINE}):()=>({min:1/0,max:-1/0});return function({dataPage:e}){const t=o({dataPage:e});r&&(t.bar=a({dataPage:e})),i&&(t.line=s({dataPage:e}));const n=[t.bar.min,t.line.min,t.marker.min].filter(e=>void 0!==e),l=[t.bar.max,t.line.max,t.marker.max].filter(e=>void 0!==e);return t.min=n.length?Math.min(...n):NaN,t.max=l.length?Math.max(...l):NaN,t}}({isPrimary:e,layoutService:t,seriesModel:n,hasBarStacked:s,hasLineStacked:l}):$f({isPrimary:e,layoutService:t,seriesModel:n})}function Bf({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=Ff({isPrimary:e,layoutService:n,seriesModel:i}),{isArea:s}=n.meta;return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:l,max:c}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=l,o.explicit.max=c,o.meta.hasExplicitMin=!Number.isNaN(l),o.meta.hasExplicitMax=!Number.isNaN(c),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then(e=>({dataPage:e[0]}))}({continuousModel:t,layoutService:n,reducedModel:r}).then(({dataPage:t})=>{const{min:n,max:r,bar:l,line:c,marker:u}=a({dataPage:t}),m=i.query.seriesByAxis(e).some(e=>Mu(e)===us.TYPE.BAR),d=i.query.seriesByAxis(e).some(e=>Mu(e)===us.TYPE.LINE),p=m||s&&d,h=Number((p?Math.min(n,0):n).toFixed(13)),f=Number((p?Math.max(r,0):r).toFixed(13)),g=Number((p?Math.min(l.min,0):l.min).toFixed(13)),y=Number((p?Math.max(l.max,0):l.max).toFixed(13)),v=Number((p?Math.min(c.min,0):c.min).toFixed(13)),S=Number((p?Math.max(c.max,0):c.max).toFixed(13)),M=Number((p?Math.min(u.min,0):u.min).toFixed(13)),E=Number((p?Math.max(u.max,0):u.max).toFixed(13));o.implicit.min=Number.isFinite(h)?h:0,o.implicit.max=Number.isFinite(f)?f:0,o.implicit.bar.min=Number.isFinite(g)?g:0,o.implicit.bar.max=Number.isFinite(y)?y:0,o.implicit.line.min=Number.isFinite(v)?v:0,o.implicit.line.max=Number.isFinite(S)?S:0,o.implicit.marker.min=Number.isFinite(M)?M:0,o.implicit.marker.max=Number.isFinite(E)?E: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 Vf({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 jf({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=lr().domain([e,t]);return r.nice(n),r}(e,t,n),a={start:!0,stop:!0};if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const Uf=50,Hf=100,Yf=200,Wf=125;function Xf({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return Uf;case 1:return Hf;case 2:return Yf;default:return e*Wf}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/r))}function Kf({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=Xf({config:e,layoutService:n,size:o}),c=jf({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),m={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},d="horizontal"===r.meta.major.orientation?"height":"width",p=e=>i(e)[d],h=t.formatter(e.formatter),f=()=>{const e=m.ticks.map(h);return!e.some((t,n)=>e.indexOf(t)!==n)&&(e=>{const t=o/m.ticks.length;return Math.max(...e.map(p))<=t})(e)};for(let e=l-1;e>0&&!f();e--)c.domain([a,s]),c.nice(e),[m.roundedMin,m.roundedMax]=c.domain(),m.ticks=c.ticks(e);return m}function Gf({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function Jf({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function Zf({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=jf({min:r,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some(e=>0===e)}({ticks:s}),c=l?Gf:Jf;o.ticks=s.filter((e,t,n)=>c({tick:e,index:t,ticks:n}));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const u=t.formatter(e.formatter),m=o.ticks.map(u);return m.some((e,t)=>m.indexOf(e)!==t)&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function Qf({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 eg({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:m}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const c=Kf({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return Vf({extrema:i,ticks:c.ticks})?c:Zf({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),d=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({ticks:c,count:1});return{min:u,max:m,values:[...Qf({ticks:c,extrema:i}).map(e=>({value:e,isMinor:!1})),...d.map(e=>({value:e,isMinor:!0}))].sort((e,t)=>e.value-t.value)}}function tg({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return eg({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function ng({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,c=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=Y.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){const r=n.component(t.meta.seriesComponentKeys[0]),i=r?.rect??e.meta.chart.size;return"horizontal"===e.meta.major.orientation?i.height:i.width}({chart:e,dockService:n,seriesModel:o}),u=r.query.getExtrema();return tg({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function rg({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return ge.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then(e=>({properties:e}))}({layout:t.getLayout(),model:e}).then(e=>{const{properties:t}=e??{};n.properties=t})}}}function ig({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:us.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===us.TYPE.LINE?2:t!==us.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==us.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function og({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function ag({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:c}){let u;const{theme:m,translator:d}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return u=D({picasso:s,model:o,app:n,translator:d,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map(e=>e.color);return{theme:m,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:cs.SCALE.COLOR}},config:{auto:og,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:t=>{const{components:n,interactions:o,scales:s}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,c={eventName:"legend-c",key:cs.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:ig({layoutService:n,seriesModel:r,colorService:o})},{components:u,interactions:m}=o.getLegend(c,{actions:a,navigationDisabled:!a.interact.enabled()}),d=o.getScales();return{components:u.filter(Boolean).map(e=>{const{layout:t}=e,{dock:n}=t,r=d[`${cs.SCALE.COLOR}Range`];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e}),interactions:m,scales:d}}({viewState:c,chart:r,environment:i,colorService:u,seriesModel:l,layoutService:a,actions:e,styleModel:t});p.wrappedScales=s,p.legendComponents=n,p.legendInteractions=o}}}),u}const sg="REJECTED",lg=()=>{},cg=2,ug=20,mg=200,dg=10;var pg={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-dg<=t.qTop,i=n.qLeft+n.qWidth+dg>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+dg>=t.qTop+t.qHeight,a=n.qLeft-dg<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var hg={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-dg<=t.qTop,i=n.qTop+n.qHeight+dg>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var fg={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 gg="pages";const yg="discretePan";function vg({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:yg,pointers:1,threshold:10,enable(r,i){return this.started===yg||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some(e=>e.key===n)}},events:{[`${yg}start`](e){e.preventDefault(),this.started=yg;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${yg}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${yg}end`](e){e.preventDefault(),this.started=!1},[`${yg}cancel`](e){e.preventDefault(),this.started=!1}}}}function Sg({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter(e=>e.key===t);if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function Mg({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(mg,n));return{width:e,height:Math.max(ug,Math.min(n*cg,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function Eg(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then(e=>{if(t.canceled||n)return t.reject(sg),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null})},i=e=>new Promise((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(sg),n=e})(a):r(a)});return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(sg),n=null)},i}const xg={command:{update:()=>{}}};function bg({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=xg,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(u)).then(n=>(s(n),e.add(n),t(n,l)))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:Mg({layoutService:r}),request:c({definitionPath:o}),process:Eg(n),connectionless:r.meta.isSnapshot,processDataPage:a}),m=T((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then(e=>n(e)).catch(e=>{if(e!==sg)throw e})},50);return function(e,{onProcessing:t=lg,onDataPage:n=lg}={}){m(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var Cg={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var Ag={inTotal:function({layoutService:e,getReducedCube:t}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const n=t();if(n){const[t]=b({qHyperCube:n},e.refs.dataPages);if(t)return t.qArea.qHeight}const[r]=e.getDataPages();if(r)return r.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function Ng(e){const{groupSize:t,measureCount:n}=e.meta;return t??n}function Og(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function Tg(e){return Og(e.qMatrix,e=>e[0].qElemNumber)-1}var Lg={inTotal:function({layoutService:e}){const t=Ng(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=Ng(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=Ng(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=Tg(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const Rg=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function Ig(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return Rg(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:Rg(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return Rg(e,n);return Og(t.qMatrix.slice(0,r.qTop+1),e=>e[0].qElemNumber)-1}}}var kg={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=Ig(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=Ig(t).area(e(),l,a.qArea),m=Tg(a),d=a.qArea.qHeight+m,p=c===o?(r.inView-d)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[p,r.inView>=r.inTotal?p+1:p+d/r.inView]}};function wg({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:m,SQUEEZE:d,LABELLESS:p}=r[n.meta.chart.mode],h="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:y}=s,v=h?t.width:t.height;if(!v||!Number.isFinite(v))return 0;const S=v/l>=d;switch(f){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/p:S?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:m}=s.settings.settings.labels,{height:d}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return d>o;const p=(90-m)*(Math.PI/180);return d>Math.cos(p)*o}({chart:e,isHorizontal:h,axisKey:i,renderer:o,isGrouped:a,itemSize:d,label:y})?v/m:l:v/m}}function Dg({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c,getReducedCube:u}){const{inTotal:m,area:d,scaleRange:p}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?Cg:n?r?Lg:kg:Ag}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,f=e=>e?h()/e:0,g=(e,t)=>-(e-t)*f(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=m({layoutService:r,getReducedCube:u});return{inTotal:l,inView:wg({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return f(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,g(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return g(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:h(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=p({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:g(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=g(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*f(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(f(r)*n)}}}}function qg({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:m,viewState:d,rtl:p,getReducedCube: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 f=Dg({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:m,rtl:p,getReducedCube:h}),g=()=>{const e=f.getItems();return n.set("items",e),e},y=({pixelOffset:e,items:t})=>{const r=f.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},v=e=>{const t=Date.now(),r=g(),a=y({pixelOffset:e,items:r}),s=f.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every(n=>e[n]===t[n])})(s))return void((f.validate.offset({pixelOffset:e,items:r})||d.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:a.start,items:r})),d.preventSet("viewRange",f.getViewRange({pixelOffset:a.start.pixel,items:r})),d.set("scrollOffset",{start:a.start.item,end:a.end.item})));d.preventSet("viewRange",f.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:a.start,items:r})),d.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=g();n.set("itemSize",f.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=d.get("scrollOffset");if(void 0===n)return 1===t?f.getUpperBound({items:e}):0;if("number"==typeof n)return f.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return f.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=y({pixelOffset:c,items:a});d.preventSet("viewRange",f.getViewRange({pixelOffset:u.start.pixel,items:a}));const m=f.getArea({itemOffset:u.start.item,items:a});return new Promise(e=>{i(m,{onDataPage:()=>{n.set("scaleRange",f.getScaleRange({offsets:u.start,items:a})),d.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})})},scroll(e){const t=n.get("offsets").start.pixel+e;v(t)},scrollToRelative(e){const t=n.get("items"),r=f.convert.relativeToPixelOffset({relativeOffset:e,items:t});v(r)}}}function Pg({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:m,axisKey:d,renderer:p,areaBuffer:h,processDataPage:f=()=>{},getReducedCube:g=()=>{}}={}}){const y=N(),v=function({qMode:e}){switch(e){case"K":return hg;case"T":return fg;default:return pg}}({qMode:i.getHyperCubeValue("qMode")}),S=function({state:e,contains:t}){return e.set(gg,[]),{add:t=>{const n=e.get(gg);n.length=0,n.push(t)},getCurrent:()=>e.get(gg)[0],getAll:()=>e.get(gg),contains:n=>t(e.get(gg)[0],n)}}({state:y,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:S,composition:v});const M=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:h}),E=bg({dataStore:S,composition:v,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:f}),x=qg({chart:e,componentKey:n,state:y,dataStore:S,pageData:E,layoutService:i,dockService:o,itemWidths:s,getRect:m,axisKey:d,renderer:p,areaBuffer:M,viewState:l,rtl:c,getReducedCube:g}),C=function({layoutService:e,dataStore:t}){return function(n){const r=b(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:S}),A=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[vg({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:Sg({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:x});return{interactions:A,query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>S.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>C(e)}}}var zg={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 $g({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 _g({layoutService:e,dockService:t,themeService:n,colorService:r,flags:i}){const{BAR:o,LINE:a,POINT:s}=nc,l=n.getStyles(),c=(e=>!!e&&Of.gt(Of.coerce(e),Of.coerce("1.36.3")))(e.getLayoutValue("version"))&&i.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS"),u=$g({layoutService:e,key:"bar"}),m=$g({layoutService:e,key:"line"}),d=()=>{const e=u({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},p=t=>i.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find(e=>e.key===t):void 0,h=(e,t)=>{const n=r.getPaletteColor;if(e?.color&&n){const r=n(e);return"none"===r&&e.index>0?e?.color??t:r??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:()=>{const e=p("bar")?.bar?.label?.value;return{fill:h(e?.color,l.label.value.color),useContrastColor:e?.useContrastColor??!0,fontSize:e?.fontSize??12,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>m({property:"lineCurve",defaultValue:c?a.CURVE.MONOTONE:a.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>m({property:"lineThickness",defaultValue:c?a.WIDTH.DEFAULT:"FULL"===t.meta.chart.mode?a.WIDTH.FULL.DEFAULT:a.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=m({property:"lineType",defaultValue:a.TYPE.SOLID});return e&&a.TYPE[e.toUpperCase()]}},point:{getSize:()=>m({property:"dataPointSize",defaultValue:c?s.SIZE.NEW_DEFAULT:s.SIZE.DEFAULT}),label:{getStyle:()=>{const e=p("line")?.line?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{const e=p("marker")?.marker?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{const e=p("axis")?.axis?.title;return{fontFamily:e?.fontFamily??l.axis.title.fontFamily,fontSize:e?.fontSize??l.axis.title.fontSize,color:h(e?.color,l.axis.title.color)}}},label:{getStyle:()=>{const e=p("axis")?.axis?.label?.name;return{fill:h(e?.color,l.axis.label.name.color),fontSize:e?.fontSize??l.axis.label.name.fontSize,fontFamily:e?.fontFamily??l.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{const e=p("legend")?.legend?.title;return{fontFamily:e?.fontFamily??l.legend.title.fontFamily,fontSize:e?.fontSize??l.legend.title.fontSize,color:h(e?.color,l.legend.title.color)}}},label:{getStyle:()=>{const e=p("legend")?.legend?.label;return{fontFamily:e?.fontFamily??l.legend.label.fontFamily,fontSize:e?.fontSize??l.legend.label.fontSize,color:h(e?.color,l.legend.label.color)}}}}}}}function Fg({layoutService:e}){return q({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function Bg({dataset:e,data:t,valueData:n}){const{source:r,label:i,value:o}=n,a=e(r.key).field(r.field);return de.shouldUseFormat(a.raw())?"-"===i||""===o||Number.isNaN(o)||"NaN"===o||t.null?.value?"-":a.formatter()(o):i}function Vg({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,layoutService:l,propertiesModel:c,custom:u}){const m=s.getStyles(),{isLineStacked:d}=l.meta,p=({data:e})=>e.major.value,h=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:f}=cs.COMPONENT,{PRIMARY:g,SECONDARY:y}=us.AXIS,v=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=cs.COMPONENT,{PRIMARY:a,SECONDARY:s}=us.AXIS,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[m]=t,{triggerer:d}=l,p=d===n.MAJOR?m.data.value:m.data.major.value;if(c){const t=e.findShapes("container").find(e=>(e.key===`${o}-max-${a}`||e.key===`${o}-max-${s}`)&&e.data&&e.data.value===p&&e.children.length);if(t)return{key:t.key,bounds:t.bounds}}const h=e.findShapes("path").find(e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===`${i}-max`)&&e.data.major.value===p);if(c&&h)return{key:h.key,bounds:h.bounds};const f=e.findShapes("path").find(e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===`${i}-min`)&&e.data.major.value===p),g=e.findShapes("*").filter(e=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===p);if(c&&f&&!g.find(e=>e.data.end?.source?.field!==f.data.end?.source?.field)&&!g.find(e=>e.data.segment?.source?.field!==f.data.source?.field))return{key:f.key,bounds:f.bounds};const y=h||f;return!(c||!y||g.find(e=>e.data.end?.source?.field!==y.data.end?.source?.field)||g.find(e=>e.data.segment?.source?.field!==y.data.source?.field))&&{key:y.key,bounds:y.bounds}},"collectible"]}({dockService:i,seriesModel:o});return P({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:m.fontFamily},main:{key:cs.COMPONENT.TOOLTIP,getGroupByValue:p,collectibles:[...o.meta.barComponentKeys.map(e=>({key:e,type:"bar",major:p})),...o.meta.pointComponentKeys.map(e=>({key:e,type:"point",major:p})),...o.meta.markers.map(e=>({key:e.key,type:e.type,major:p}))],triggers:[{keys:[cs.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:h},placement:v},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${f}-max-${g}`,`${f}-max-${y}`,`${f}-min-${g}`,`${f}-min-${y}`,`${cs.COMPONENT.BAR_OOB}-max-${g}`,`${cs.COMPONENT.BAR_OOB}-max-${y}`,`${cs.COMPONENT.BAR_OOB}-min-${g}`,`${cs.COMPONENT.BAR_OOB}-min-${y}`,`${cs.COMPONENT.DATA_OOB_MARKER}-max`,`${cs.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:p,filter:h},placement:v},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:p,filter:h},placement:v}],section:({h:e,nodes:t,dataset:n,create:r,util:i})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(r.text({value:a,style:{bold:!0}})),s&&c.push(r.text({value:s}));const m=u.hideBasic();m&&!l.length&&(a||s)||c.push(r.text({value:o.data.label,style:{bold:!0}})),m||(c.push(r.color({nodes:t,property:cs.SCALE.COLOR})),c.push(...t.map(e=>{const{segment:t,end:o,point:a}=e.data,s=e.key.includes("point-component")&&d?a:t||o,{key:l,field:c}=s.source;return r.measure({label:i.dataset.title(l,c),value:Bg({dataset:n,data:e.data,valueData:s})})}))),l&&c.push(...l.map(e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}}))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(r.raw({value:u.chart.createLimitationRow()}))):c.push(r.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:p}=o.data;return u.isEnabled()&&p&&c.push(...p.map(t=>r.raw({value:u.createImageRow({value:t,h:e})}))),c},layout:{grouping:!0,single:()=>!(!u.isEnabled()||!u.hasImages())||u.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>u.isEnabled()&&u.hasImages()?u.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{u.chart.isEnabled()&&!u.chart.hasLimitation()&&u.chart.show({nodes:e,properties:c.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:cs.COMPONENT.LEGEND_TOOLTIP,component:cs.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:jg}=cd,Ug=({picasso:e,chart:t,environment:p,flags:h,viewState:f,viewCache:g,actions:y,selectionService:v})=>{const S=s(),{width:M,height:E}=i(),[x,C]=n(),[A,N]=n(),O=a(),T=l(),L=c(),R=u(),I=m(),k=hp({enable:!1===x?.layoutService?.meta?.isSnapshot}),w=d();r(()=>{if(!(S&&t?.update&&p&&f&&v))return;const n=z({source:S,metaAdditionsFn:function({layout:e}){const t=b(e,"qHyperCube.qMeasureInfo",[]),n=If(t,us.TYPE.LINE),r=n.length>0,i=ge.continuous({layout:e,auto:()=>r&&ce.isTime(!0,e)}),o=!Lf(b(e,"version","")),a=If(t,us.TYPE.BAR),s=a.length,l=a.filter(kf).length,c=a.filter(wf).length,u=o?l>1||c>1:s>1,m=("grouped"!==b(e,"barGrouping.grouping")||i)&&u,d=!m&&s>1,p=o&&m&&(l>0&&c>1||l>1&&c>0),h=!!e?.qHyperCube?.qDimensionInfo?.[0]?.qLocked,f=!("area"!==e?.lineType),g=n.filter(kf).length>1||n.filter(wf).length>1,y=f&&e.stackedArea&&g;return{canBeContinuous:ce.canBeContinuous(e),isDiscrete:!i,isContinuous:i,isTime:ce.isTime(i,e),isSnapshot:ge.snapshot(e),isBarSeriesStacked:m,isBarSeriesGrouped:d,isBarSeriesStackedInBothAxis:p,isGrouped:d||p,isGroupedByMeasure:d||p,isDimensionLocked:h,groupSize:p?2:s,hasLineSeries:r,isArea:f,isLineStacked:y}},experimental:{filter:!0}}),{options:r,translator:i}=p,{direction:o}=r,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=Pf({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then(({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)}),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:O,layoutService:n}),l=$({app:T,translator:i}),c=_({chart:t,layoutService:n,config:{logicalSize:{width:M,height:E},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),u=Rf({layoutService:n}),m=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return Pg({chart:e,actions:s,componentKey:ud(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:zg,options:{axisKey:cs.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:O,layoutService:n,dockService:c,seriesModel:u,viewState:f,rtl:"rtl"===p.options.direction,actions:y,picasso:e}):void 0,d=n.meta.isContinuous?jg({model:O,layoutService:n,viewState:f,viewCache:g}):void 0,x=F({theme:p.theme,config:{id:"comboChart",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),A=ag({actions:y,appLayoutModel:L,appModel:T,chart:t,environment:p,genericObjectModel:O,layoutService:n,picasso:e,seriesModel:u,viewState:f}),N=_g({layoutService:n,dockService:c,themeService:x,colorService:A,flags:h}),k=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map(e=>e.ref),minorsSecondary:t.meta.secondarySeries.map(e=>e.ref)},virtuals:n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0}}({layoutService:n,seriesModel:u}),w=Bf({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:d}),D=Bf({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:d}),q=Fg({layoutService:n}),P=ng({config:{measureAxesRef:"measureAxes.0",formatter:cs.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:w,dockService:c,seriesModel:u,themeService:x}),V=ng({config:{measureAxesRef:"measureAxes.1",formatter:cs.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:D,dockService:c,seriesModel:u,themeService:x}),j=rg({genericObjectModel:O,layoutService:n}),U=Rs({flags:h,layout:S,app:T,model:O,picasso:e,chart:t,translator:i,localeInfo:L.qLocaleInfo,embed:I,options:r}),H=Vg({chart:t,actions:y,translator:i,rtl:a,dockService:c,seriesModel:u,colorService:A,themeService:x,layoutService:n,propertiesModel:j,custom:U}),Y=$a({layoutService:n,discreteModel:m}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:cs.SCALE.MAJOR,MAJOR_INNER:cs.SCALE.MAJOR_INNER,MINOR:{PRIMARY:cs.SCALE.MINOR.PRIMARY,SECONDARY:cs.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,BAR_SECONDARY:`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,AXIS:{MAJOR:cs.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:cs.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:cs.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:cs.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:cs.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:cs.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:cs.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:cs.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:cs.COLLECTION.MAIN}}}}(n),X=B({picassoInstance:e,plugins:R,pluginArgs:W}),K=function({options:e,viewCache:t,layoutService:n}){const r={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||r.hasSlicedHats||r.isPartialUpdating||r.isSizeChanging||Ta.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:r}}({options:r,viewCache:g,layoutService:n});C({alternativeService:l,selectionService:v,genericObjectModel:O,appModel:T,dockService:c,styleModel:N,layoutService:n,fieldModel:k,seriesModel:u,reducedModel:s,primaryExtremumModel:w,secondaryExtremumModel:D,primaryTickModel:P,secondaryTickModel:V,propertiesModel:j,colorService:A,themeService:x,appLayoutModel:L,tooltipService:H,disclaimerService:q,flags:h,...m&&{discreteModel:m},...d&&{continuousModel:d},refLineModel:Y,pluginService:X,animationsModel:K})},[S,O,T,L,p,t?.update,f,v]);const[,D]=o(()=>{if(!x)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:r,primaryExtremumModel:i,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:c,disclaimerService:u,styleModel:m}=x,d=s?()=>{s.update(t.getLayout());const e=s.initialFetch(),n=!t.meta.isSnapshot&&p?.options?.viewState?.zoom;return n&&f.preventSet("zoom",n),e}:()=>Promise.resolve(),h=n.initialize().then(()=>{const e=n.getSettings().field;v&&v.setBrushAliases({colorField:e}),n.custom.updateLegend(m)});return Promise.all([c.initialize(),r.command.initialize(),O?a.command.initialize():Promise.resolve(),h,d(),y.scroll.attachDiscreteModel(l)]).then(async()=>{let n;if(t.meta.isSnapshot||(n=a.query.getProperties()),n?.qHyperCubeDef){const e=re(!0,{},n),r=(({properties:e,layout:t,model:n,layoutService:r})=>{const i=t.qHyperCube.qMeasureInfo,o=re(!0,{},e);return((e,t)=>{const{color:{mode:n}}=t;"byExpression"===n&&0===e.length?t.color.mode="primary":"byDimension"===n&&e.length>1&&(t.color.mode="byMultiple")})(i,e),n.colorSupport?.colorByUpdater?.(e,"qHyperCubeDef.",t),function({properties:e,layoutService:t}){const{filteredFields:n}=t.meta;if(!(n.measures.length>0))return;const{mode:r}=e.color||{};if("byExpression"===r){const r=t.getLayout();if("colorByExpression"===r.qHyperCube.qMeasureInfo?.[0]?.qAttrExprInfo?.[0]?.id)return;const{current:i,target:o}=function({properties:e,filtered:t}){const{qMeasures:n}=e.qHyperCubeDef||[],{current:r,target:i}=n.reduce((e,n,r)=>("colorByExpression"===n.qAttributeExpressions[0]?.id&&(e.current=r),void 0!==e.target||t.includes(r)||(e.target=r),e),{current:void 0,target:void 0});return{current:r,target:i}}({properties:e,filtered:n.measures});if(void 0===i)return;const a=e.qHyperCubeDef.qMeasures[i].qAttributeExpressions[0];e.qHyperCubeDef.qMeasures[i].qAttributeExpressions.splice(0,1),e.qHyperCubeDef.qMeasures[o].qAttributeExpressions.splice(0,0,a)}}({properties:e,layoutService:r}),!Lo.compare(o,e,!0)&&JSON.stringify(o)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)})({properties:n,layout:t.getLayout(),model:O,layoutService:t});if(r)return(e=>!(!e||e.qHasSoftPatches||e.qExtendsId||!((e.qMeta?.privileges||[]).indexOf("update")>-1)))(S)?(await O.setProperties(n),T.clearUndoBuffer()):await((e,t,n)=>{if(!e)return Promise.resolve();let r=Lo.generate(t,n);return re(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(r,!0)):Promise.resolve()})(O,e,n),void w.pending();w.restore()}return Promise.all([i.command.initialize(),o.command.initialize()]).then(async()=>{await e.initialize({properties:a.query.getProperties()||{}}),u.initialize(),N({...x})})})},[x,k]);if(D)throw D;return A};const Hg={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 Yg={query:{getCanScroll:()=>!0}};function Wg({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function Xg({setSelectionInfo:e,event:t,components:n,clear:r}){const i=n?.length?n.map(e=>e.key).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===cs.COMPONENT.LEGEND_CATEGORICAL}),r()}function Kg({chart:e,actions:t}){const i=M(),o=s(),[a,l]=n();return r(()=>{if(!e?.update||!e.scale)return null;const n=e.scale(cs.SCALE.MAJOR),r=j({chart:e,actions:t,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:Wg},selectionEvents:{start:Xg}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}},[i,e?.update,e?.scale]),r(()=>{a?.setLayout&&o&&a.setLayout(o)},[o]),a}const Gg={version:"1.45.0",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},lineType:"line",stackedArea:!1,separateStacking:!0,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 Jg=e=>t=>{const n=t.qHyperCubeDef.qMeasures,{lineType:r}=t,i=[0,0,0];let o;const a="area"===r?["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Area","Visualizations.Descriptions.ComboChart.Dimension.AreaMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarArea","Visualizations.Descriptions.ComboChart.Dimension.BarAreaMarker"]:["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"];if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)o=Mu(n[e].qDef.series),o===us.TYPE.BAR?i[0]=1:o===us.TYPE.LINE?i[1]=1:i[2]=1;const s=a[parseInt(i.join(""),2)-1];return e.get(s)},Zg=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===us.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===us.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function Qg(e){const t=e.qHyperCubeDef.qMeasures,n=e.color?.mode;"byDimension"===n&&1===t.length&&Mu(t[0].qDef?.series)===us.TYPE.LINE?e.color.mode="primary":"byDimension"===n&&t.length>1&&(e.color.mode="byMultiple")}function ey(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:Jg(t),added(e,t){Cs.addCallbackCustomTooltip(t)},moved(e,t){Cs.moveCallbackCustomTooltip(t,e)},removed(e,t){Cs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){Cs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:Zg(t),added({qDef:e},t){Qg(t),e.series?.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:us.TYPE.LINE,axis:us.AXIS.SECONDARY}:e.series={type:us.TYPE.BAR,axis:us.AXIS.PRIMARY})},moved(e,t){Qg(t)}}}}function ty(e){const t=ey(e);return{properties:Gg,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=J.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach(e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)});const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&re(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>J.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const ny=({models:e,chart:t,viewState:n})=>{E(r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:m}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:u,h:m}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,cs.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),c.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then(e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}}).catch(()=>{}))}),x(()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,cs.COMPONENT.LEGEND_CATEGORICAL)}}}),[n,t])};const ry=e=>7005!==e.qError?.qErrorCode,iy=e=>void 0===e?.qHyperCube?.qMeasureInfo?[]:e?.qHyperCube?.qMeasureInfo.filter(e=>ry(e)),oy=e=>(e=>e.qHyperCube.qDimensionInfo.filter(e=>ry(e)))(e).length&&iy(e).length,ay=e=>{const t=iy(e).some(({series:e=us.NOPE_SERIES})=>Mu(e)===us.TYPE.LINE);return ge.continuous({layout:e,auto:()=>t&&ce.isTime(!0,e)})},sy=(e,t,n)=>{const r=n||0;return iy(e?e.layout:t.layout).filter(e=>{const{series:t}=e||{};return 0===r?Sp(t,!0):!Sp(t,!0)})},ly=(e,t)=>{const n=sy(e,t,0).filter(e=>e.series.type===us.TYPE.BAR),r=sy(e,t,1).filter(e=>e.series.type===us.TYPE.BAR),i="stacked"===b(t.layout,"barGrouping.grouping");return!ge.continuous({layout:t.layout})&&i&&(n.length>1||r.length>1)},cy=(e,t,n,r,i=void 0)=>{const o=`${t}.fontFamily`,a=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(a),defaultValue:()=>i??n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function uy(e,t,n){const r=U({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: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)=>!ay(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:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...cy("bar.label.value","label.value",r,t,"12px"),contrastColor:{component:"checkbox",type:"boolean",ref:"bar.label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:e?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")?8: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:e?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")?3: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:e?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")?"monotone":"linear",schemaIgnore:!0}}}}},labelValueSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:cy("line.label.value","label.value",r,t)}}}:void 0}},markerSection:{translation:"Visualizations.Descriptions.Markers",component:"accordion",items:{labelValueSection:{translation:"properties.dataPoints.markerlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"marker",items:cy("marker.label.value","label.value",r,t)}}}}},axisTitleSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:cy("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:cy("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:cy("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:cy("legend.label","legend.label",r,t)}}}:void 0}}}const my={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)=>!ay(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 dy(e){return!!e.qDef?.color?.on}function py(e){return dy(e)&&"primary"===(e.qDef?.color?.mode??"primary")}function hy(e){return dy(e)&&"byExpression"===e.qDef?.color?.mode}function fy(e){if(e?.color?.auto||"byExpression"!==e?.color?.mode)return[];const t=e?.color?.colorExpression;return t?[{qExpression:t,label:e?.color?.expressionLabel??"",id:"colorByExpression"}]:[]}function gy(e){return hy(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function yy(e){(e?.qHyperCubeDef?.qMeasures??[]).forEach((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...fy(n),...gy(e)]:gy(e)}(t,n,e))}function vy(e){const t={type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},n={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||ay(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},r={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show:e=>Mu(e.qDef?.series)===us.TYPE.MARKER},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show:e=>Mu(e.qDef?.series)===us.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)=>dy(...e)},a=e.anything?.sense?.theme;return{type:"items",items:{series:{type:"items",items:{visibilityCondition:t,supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>n.measureTitle?.(),component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:n,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:r,seriesMarkerFill:i}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:o,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{const{primary:e}=a.getDataColorSpecials(),t=a.getDataColorPickerPalettes()[0]?.colors,n=t.indexOf(e);return{index:-1===n?Math.min(6,t.length-1):n}},show:py},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:hy}}}}}}}}}}}}const Sy=10,My=!0,Ey=({series:e=us.NOPE_SERIES})=>e.axis!==us.AXIS.SECONDARY,xy=({series:e=us.NOPE_SERIES})=>e.axis===us.AXIS.SECONDARY;function by(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map(e=>e.qDef)}function Cy(e){return iy(e).filter(e=>Mu(e.series)===us.TYPE.LINE).length>0}const Ay=(e,t,n)=>{const r=iy(n.layout).filter(e=>Mu(e.series)===us.TYPE.LINE),i=r.filter(Ey).length>1||r.filter(xy).length>1;return"area"===e.lineType&&by(e,t).length>0&&i};function Ny(e,t){const n=iy(e).filter(e=>Mu(e.series)===us.TYPE.BAR);return n.filter(e=>e.series.axis!==us.AXIS.SECONDARY).length>t||n.filter(e=>e.series.axis===us.AXIS.SECONDARY).length>t}function Oy(e){return iy(e).filter(e=>Mu(e.series)===us.TYPE.MARKER).length>0}const Ty=(e,t,n,r)=>{const i="vertical"===e.layout.orientation||ay(e.layout)?"y":"x",o=sy(e,t,r).map(e=>e.qFallbackTitle);let a;return a=o.length?n.get(`properties.${i}AxisWithInfo`,[o.join(",")]):n.get(`properties.${i}Axis`),a};function Ly(e){const{translator:t,flags:n,anything:r}=e,i=e?.anything?.sense?.theme,o=e?.anything?.sense?.isUnsupportedFeature?.("continuousData"),a={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>yy(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>dy(e))}}},s=e=>e.qHyperCubeDef.qMeasures.some(e=>dy(e)),l=(e,t)=>0!==e.filter(e=>e.series.axis===t).length,c={items:{disclaimer:{show:(e,t)=>s(e),reset:e=>{e.qHyperCubeDef.qMeasures.forEach(e=>{var t;b(t=e,"qDef.color.on",void 0)&&C(t,"qDef.color.on",!1)})}},simpleItems:{show:(e,t)=>!s(e)}}},u={items:{labels:{items:{header:{show:(e,t)=>oy(t.layout)},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t,n)=>oy(n.layout)&&Ny(n.layout,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t,n)=>oy(n.layout)&&Cy(n.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,i){i.dataPoint.showLineLabels=e,i.dataPoint.show=e}},reset(e){C(e,"dataPoint.show",!1),C(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t)=>oy(t.layout),convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,n,r)=>t.get(sy(n,r,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t,n)=>oy(n.layout)&&sy(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,i){i.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&sy(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,i){i.measureAxes[1].show=e?"labels":"all"}}}}}}},m={uses:"settings",items:{simpleStyling:my,simpleLabels:u,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:uy(n,i,t),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)=>Ny(n.layout,1)&&!ay(n.layout)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",defaultValue:"line",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:(e,t,n)=>Cy(n.layout)},stackedProps:{type:"items",grouped:!1,items:{stackedArea:{ref:"stackedArea",translation:"properties.style.stackedArea",type:"boolean",defaultValue:!1,show:(e,t,n)=>Ay(e,t,n)},separateStacking:{ref:"separateStacking",translation:"properties.separateStacking",type:"boolean",defaultValue:!0,readOnly:e=>!e.stackedArea,show:(e,t,n)=>Ay(e,t,n)}}},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)=>ay(n.layout),convertFunctions:(d="vertical",{get:(e,t,n)=>ay(n.layout)?d:e(t.type),set(e,t,n,r){t(n.type,ay(r.layout)?d:e,d)}})},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)=>!ay(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)=>Cy(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>Cy(e)},show:(e,t,n)=>Cy(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=>Ny(e,0)},show:(e,t,n)=>Ny(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>Ny(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&&ly(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&&ly(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>Oy(e)},show:(e,t,n)=>Oy(n.layout),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridLineAxis:{ref:"gridLine.axis",type:"integer",component:"dropdown",defaultValue:0,options(e,t,n){const r=[],i=n.layout.qHyperCube.qMeasureInfo,o=l(i,0),a=l(i,1);return o&&r.push({translation:"properties.axis.primary",value:0}),a&&r.push({translation:"properties.axis.secondary",value:1}),r},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,r){const i=r.gridLine.axis??0,o=n.layout.qHyperCube.qMeasureInfo,a=l(o,0),s=l(o,1);return 0===i&&!a&&s?(C(r,"gridLine.axis",1),1):1===i&&a&&!s?(C(r,"gridLine.axis",0),0):i}}},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:a,simpleColors:c,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,n){const r="vertical"===n.layout.orientation||ay(n.layout)?"x":"y",i=by(e,n).map(e=>e.qFallbackTitle||"").join(", ");let o;return o=i?t.get(`properties.${r}AxisWithInfo`,[i]):t.get(`properties.${r}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||ay(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!ay(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:Sy,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=Sy:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!o}},measureAxis:{uses:"axis.measureAxis",label:(e,n,r)=>Ty(n,r,t,0),show:(e,t,n)=>sy(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,r)=>Ty(n,r,t,0),show:(e,t,n)=>sy(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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&Sp(e?.series,My))}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&sy(t,n,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||ay(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&sy(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)=>sy(t,n,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=r?.measureAxes[0]||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(C(i,"measureAxes.0.autoMinMax",!1),C(i,"measureAxes.0.minMax","min"),C(i,"measureAxes.0.min",0)):C(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,n,r)=>Ty(n,r,t,1),show:(e,t,n)=>sy(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,r)=>Ty(n,r,t,1),show:(e,t,n)=>sy(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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&!Sp(e?.series,My))}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&sy(t,n,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||ay(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&sy(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)=>sy(t,n,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=r?.measureAxes[1]||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(C(i,"measureAxes.1.autoMinMax",!1),C(i,"measureAxes.1.minMax","min"),C(i,"measureAxes.1.min",0)):C(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var d;const p={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){if(r?.sense?.isUnsupportedFeature?.("includeZeroValues"))return!1;return!ay(n.layout)}}}},measures:{items:{measureDefinition:vy(e)}}}};return{type:"items",component:"accordion",items:{data:p,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=>Sp(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,My)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some(e=>!Sp(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,My)},dimRefLines:{uses:"dimReflines"},plugins:os({translator:t,pluginOptions:[{value:"point",translation:t.get("Visualizations.Descriptions.Point")},{value:"line",translation:t.get("Visualizations.Descriptions.Line")}],supportNewStyles:n?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")})}};return e})(),settings:m}}}function Ry(e,t){return iy(t).filter(e=>Mu(e.series)===us.TYPE.LINE).length>0}function Iy(){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)=>Ry(0,t)||!ay(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)=>function(e,t,n){const r=iy(t).filter(e=>Mu(e.series)===us.TYPE.BAR);return n?r.filter(e=>e.series.axis===us.AXIS.PRIMARY).length>1||r.filter(e=>e.series.axis===us.AXIS.SECONDARY).length>1:r.length>1}(0,t,!Lf(e?.version??""))&&!ay(t)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:(e,t)=>Ry(0,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)=>!ay(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,t)=>Ry(0,t)&&iy(t).length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:(e,t)=>Ry(0,t)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>dy(e))}}}}}}const ky={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 wy(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=ky[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function Dy(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});wy(r,o,t,n,"bar"),wy(r,o,t,n,"line"),wy(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function qy(e){const t={},{tooltip:n}=e;if(n){t.chart_tooltip_custom=!n.auto;const e=n.chart?.object?.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const Py=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function zy(e){return{definition:Ly(e),softDefinition:Iy(),support:{snapshot:Py,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:Dy,extendMetrics:qy,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=J.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:ey(e),defaultPropertyValues:a,hypercubePath:i,extension:r});!function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach(e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)});const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&re(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),yy(e.qProperty)}(s,0,t);const l=s.qProperty;return J.conditionalShow.unquarantine(l),J.conditionalShow.unquarantineAlternative(l),s},exportProperties:(e,t,n)=>{J.conditionalShow.quarantine(e.qProperty),J.conditionalShow.quarantineAlternative(e.qProperty),function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach(e=>{e.qAttributeExpressions=[]})}(e);return J.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:(function(e){e.qHyperCubeDef.qDimensions.forEach(Ot),e.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(Ot)}(e),function(e){return Lf(e.version)&&(e.qHyperCubeDef.qMeasures.forEach(e=>{const{qDef:t}=e;void 0===t.series&&(t.series=us.NOPE_SERIES),void 0===t.series.type&&(t.series.type=us.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===us.TYPE.BAR?us.AXIS.PRIMARY:us.AXIS.SECONDARY),t.series.type===us.TYPE.BAR&&t.series.axis===us.AXIS.SECONDARY&&(t.series.axis=us.AXIS.PRIMARY)}),e.version=Tf.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,r,i,o,a,s,l,c,u,m,d,p,h,f,g,y,v,S,M,E,x,b,C,A,N,O,T,L,R,I,k,w,D,q,P,z,$,_,F,B,V,j,U,H,Y,W,X,K,G,J;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useModel,s=e.useStaleLayout,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,m=e.useEmbed,d=e.useRenderState,p=e.useOptions,h=e.useTranslator,f=e.useTheme,g=e.useDeviceType,y=e.useConstraints,v=e.useLayout,S=e.useAction,M=e.useSelections,E=e.onTakeSnapshot,x=e.useImperativeHandle},function(e){b=e.getValue,C=e.setValue,A=e.createColor,N=e.cache,O=e.debouncer,T=e.throttler,L=e.createTapInteraction,R=e.createContinuousRangeInteraction,I=e.createAreaRangeInteraction,k=e.createLassoInteraction,w=e.pointLabelComponent,D=e.colorService,q=e.disclaimerService,P=e.tooltipService,z=e.layoutService,$=e.alternativeService,_=e.dockService,F=e.themeService,B=e.pluginService,V=e.storage,j=e.selectionService,U=e.fontResolver},function(e){H=e.default},function(e){Y=e.default},function(e){W=e.default},function(e){X=e.reactRenderer,K=e.axisTitleComponent,G=e.disclaimerComponent},function(e){J=e.default}],execute:function(){e("default",function(e){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(ee).forEach(t=>{e.add(ee[t])})}}(e.translator);const{flags:i}=e,a=e.anything?.sense?.isUnsupportedFeature,s=up();return{qae:ty(e),ext:zy(e),component(){const e=function(){const[e,t]=n();return r(()=>t(N()),[]),e}(),l=function(){const[e,t]=n();return r(()=>{t(V({viewRange:[0,1],scrollOffset:void 0}))},[]),e}(),c=function(){const e=p(),t=h(),i=m(),o=f(),[a,s]=n(),l=g();return r(()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:i,deviceType:l})},[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),u=function(){const e=y(),[t,i]=n(!1),[o,a]=n(!1),[s,l]=n(!1),c=function(){const e=y(),[t,i]=n(!1),[o,a]=n({}),[s,l]=n();return r(()=>()=>{a({})},[]),r(()=>{e&&i(!e.select&&!e.active)},[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach(e=>e(...t)),removeListener:(e,t)=>{const n=o[e]?.indexOf(t);n>-1&&o[e].splice(n,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),u=function(){const e=y(),[t,i]=n(!1),[o,a]=n(!1),s=v(),l=h(),c=!!s.qSelectionInfo.qInSelections,u=!!s.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne;r(()=>{e&&i(!e.select&&!e.active)},[e]);const m=e=>{a("boolean"==typeof e?e:!o)};return S(()=>({key:"lasso",label:l.get(o?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:Hg,hidden:!t||!c||u,active:o,action:m}),[c,u,o,t,l.language()]),{action:m,enabled:()=>t,active:()=>o}}();let m=Yg;r(()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))},[e]);const[d]=n({});return d.scroll={enabled:()=>t&&m.query.getCanScroll(),attachDiscreteModel:e=>{m=e||Yg}},d.interact={enabled:()=>o},d.tooltip={enabled:()=>s},d.lasso=u,d.select=c,d}(),d=function({picasso:e,environment:i}){const o=t(),[a,s]=n();return r(()=>{if(!i)return;o.style.overflow="hidden";const t=e({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}},[i]),a}({picasso:s,environment:c}),M=Kg({chart:d,actions:u}),E=Ug({picasso:s,chart:d,environment:c,flags:i,viewState:l,viewCache:e,actions:u,selectionService:M});!function({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}){const{event:{onZoomIntercept:c,onZoomChange:u}}=cd,[,m]=o(async()=>{if(!(t?.update&&n&&r&&a&&s))return;const{layoutService:o,colorService:m,continuousModel:d,discreteModel:p,refLineModel:h,seriesModel:f,animationsModel:g}=n,{miniComponentKeys:y}=f.meta,{options:v}=r,{viewState:S={}}=v,{legendScrollOffset:M,scrollOffset:E}=o.meta.isSnapshot?o.getLayoutValue("snapshotData.content.chartData",{}):S;a.preventSet("scrollOffset",E),a.preventSet("legendScrollOffset",M),a.preventSet("title",o.getLayoutValue("title"));const x=()=>{h&&h.update(),g.meta.isPartialUpdating=!0,t.update({partialData:!0,excludeFromUpdate:[...kd,...y]}),g.meta.isPartialUpdating=!1};function b(o=!1){const c=Rd({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:a,viewCache:s,actions:l}),u=o&&[wd({models:n}),...Dd({models:n}),...m.getData()];o?(t.layoutComponents({settings:c,data:u}),g.meta.hasSlicedHats=c.components.filter(e=>"box-sliced-hat"===e.type).length>0):t.update({settings:c,data:u})}a.onChanged("scrollOffset",x),o.meta.isContinuous&&(a.onChanged("zoom",u({layoutService:o,continuousDataModel:d},x)),a.intercept("zoom",c({viewCache:s})));const C=o.getDataPages();o.setDataPages([]),b(!0),o.setDataPages(C),o.meta.isContinuous||await p.command.initialize(),b(!1),Ta.cacheProperties({viewCache:s,layout:o.getLayout()})},[t?.update,n,r]);if(m)throw m}({picasso:s,chart:d,models:E,environment:c,flags:i,viewState:l,viewCache:e,actions:u}),Id({picasso:s,chart:d,models:E,environment:c,flags:i,viewState:l,viewCache:e,actions:u,isUnsupportedFeature:a}),ny({models:E,chart:d,viewState:l})}}});var Z,Q,ee={Common_Measures:{id:"Common.Measures",locale:{"de-DE":"Kennzahlen","en-US":"Measures","es-ES":"Medidas","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","ru-RU":"Меры","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"de-DE":"Farbformel","en-US":"Color expression","es-ES":"Expresión de color","fr-FR":"Expression de couleur","it-IT":"Espressione colore","ja-JP":"カラー表現","ko-KR":"색상 표현식","nl-NL":"Kleuruitdrukking","pl-PL":"Wyrażenie koloru","pt-BR":"Expressão de cor","ru-RU":"Выражение для цвета","sv-SE":"Färguttryck","tr-TR":"Renk ifadesi","zh-CN":"颜色表达式","zh-TW":"色彩運算式"}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"de-DE":"+{0} mehr","en-US":"+{0} more","es-ES":"+{0} más","fr-FR":"+{0} plus","it-IT":"+{0} altre","ja-JP":"さらに +{0}","ko-KR":"{0} 이상","nl-NL":"+{0} meer","pl-PL":"Jeszcze {0}","pt-BR":"+{0} mais","ru-RU":"Еще +{0}","sv-SE":"Fler än {0} ytterligare","tr-TR":"+{0} daha","zh-CN":"+{0} 以上","zh-TW":"其他 +{0} 個"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"de-DE":"Summe negativer Werte","en-US":"Sum of negatives","es-ES":"Suma de negativos","fr-FR":"Somme des valeurs négatives","it-IT":"Somma valori negativi","ja-JP":"負の合計","ko-KR":"음수 합계","nl-NL":"Som negatieven","pl-PL":"Suma ujemnych","pt-BR":"Soma de negativos","ru-RU":"Сумма отрицательных значений","sv-SE":"Summan av negativa","tr-TR":"Negatif değerlerin toplamı","zh-CN":"负值总和","zh-TW":"負數總和"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"de-DE":"Summe positiver Werte","en-US":"Sum of positives","es-ES":"Suma de positivos","fr-FR":"Sommes des valeurs positives","it-IT":"Somma valori positivi","ja-JP":"正の合計","ko-KR":"양수 합계","nl-NL":"Som positieven","pl-PL":"Suma dodatnich","pt-BR":"Soma de positivos","ru-RU":"Сумма положительных значений","sv-SE":"Summan av positiva","tr-TR":"Pozitif değerlerin toplamı","zh-CN":"正值总和","zh-TW":"正數總和"}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","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.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","en-US":"Currently showing a limited data set.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","ja-JP":"現在、限定的なデータ セットを表示しています。","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","pt-BR":"Mostrando um conjunto de dados limitado.","ru-RU":"В настоящее время отображается ограниченный набор данных.","sv-SE":"Just nu visas en begränsad datauppsättning.","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","zh-CN":"当前正显示有限的数据集。","zh-TW":"目前顯示的是有限的資料集。"}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative or zero values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores cero o negativos que no se pueden mostrar en este gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。"}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","en-US":"The data set contains negative values that cannot be shown in this chart.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","zh-CN":"数据集包含无法在此图表中显示的负值。","zh-TW":"資料集包含無法在此圖表中顯示的負值。"}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","en-US":"The selections generated no data for this chart.","es-ES":"Las selecciones no han generado datos para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ko-KR":"선택 내용으로 이 차트에 대한 데이터가 생성되지 않았습니다.","nl-NL":"De selecties hebben geen gegevens voor de diagram gegenereerd.","pl-PL":"Wymiary nie spowodowały wygenerowania danych dla tego wykresu.","pt-BR":"As seleções não geraram dados para este gráfico.","ru-RU":"В результате выборок данные для этой диаграммы не созданы.","sv-SE":"Urvalen genererade inga data för detta diagram.","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","zh-CN":"选择未生成此图表的数据。","zh-TW":"此選項無法產生任何適用於此圖表的資料。"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","en-US":"The data used to color this visualization only contains undefined values.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。"}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","en-US":"The chart is not displayed because it contains only undefined values.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości niezdefiniowane.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含未定义的值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。"}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","en-US":"The chart is not displayed because it contains only negative or zero values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos o valores cero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"De diagram wordt niet weergegeven omdat deze alleen negatieve waarden of nulwaarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne lub zerowe.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa värden eller nollvärden","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值或零值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。"}},Object_Disclaimer_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","en-US":"The chart is not displayed because it contains only negative values.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","zh-CN":"未显示图表,因为它仅包含负值。","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"de-DE":"Dimension nicht gefunden","en-US":"Dimension not found","es-ES":"No se ha encontrado la dimensión","fr-FR":"Dimension introuvable","it-IT":"Dimensione non trovata","ja-JP":"軸が見つかりません","ko-KR":"차원을 찾지 못했습니다.","nl-NL":"Dimensie niet gevonden","pl-PL":"Wymiar nie został znaleziony","pt-BR":"Dimensão não encontrada","ru-RU":"Измерение не найдено","sv-SE":"Dimensionen hittades inte","tr-TR":"Boyut bulunamadı","zh-CN":"未找到维度","zh-TW":"找不到維度"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"de-DE":"Kennzahl nicht gefunden","en-US":"Measure not found","es-ES":"No se ha encontrado la medida","fr-FR":"Mesure introuvable","it-IT":"Misura non trovata","ja-JP":"メジャーが見つかりません","ko-KR":"측정값을 찾지 못했습니다.","nl-NL":"Meting niet gevonden","pl-PL":"Miara nie została znaleziona","pt-BR":"Medida não encontrada","ru-RU":"Мера не найдена","sv-SE":"Måttet hittades inte","tr-TR":"Hesaplama bulunamadı","zh-CN":"未找到度量","zh-TW":"找不到量值"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"de-DE":"Lasso-Auswahl deaktivieren","en-US":"Turn off lasso selection","es-ES":"Desactivar la selección de contorno","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","ru-RU":"Выключить выбор лассо","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"de-DE":"Lasso-Auswahl aktivieren","en-US":"Turn on lasso selection","es-ES":"Activar la selección de contorno","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","ru-RU":"Включить выбор лассо","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取"}},Tooltip_dimensions_cyclic:{id:"Tooltip.dimensions.cyclic",locale:{"de-DE":"Zyklische Dimension","en-US":"Cyclic dimension","es-ES":"Dimensión cíclica","fr-FR":"Dimension cyclique","it-IT":"Dimensione ciclica","ja-JP":"サイクリック軸","ko-KR":"순환 차원","nl-NL":"Cyclische dimensie","pl-PL":"Wymiar cykliczny","pt-BR":"Dimensão cíclica","ru-RU":"Циклическое измерение","sv-SE":"Cyklisk dimension","tr-TR":"Döngüsel boyut","zh-CN":"循环维度","zh-TW":"循環維度"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"de-DE":"Drilldown-Dimension","en-US":"Drill-down dimension","es-ES":"Dimensión jerárquica","fr-FR":"Descendre dans la hiérarchie de la dimension","it-IT":"Dimensione di drill-down","ja-JP":"軸のドリルダウン","ko-KR":"드릴다운 차원","nl-NL":"Drill-downdimensie","pl-PL":"Wymiar hierarchiczny","pt-BR":"Dimensão da hierarquia","ru-RU":"Детализированное измерение","sv-SE":"Hierarkisk dimension","tr-TR":"Detaya inme boyutu","zh-CN":"下钻维度","zh-TW":"向下探查維度"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"de-DE":"Auswahlen sind für diese Dimension gesperrt","en-US":"Selections on this dimension are locked","es-ES":"Las selecciones de esta dimensión están bloqueadas.","fr-FR":"Sélections verrouillées pour cette dimension","it-IT":"Le selezioni in questa dimensione sono bloccate","ja-JP":"この軸での選択はロックされています","ko-KR":"이 차원의 선택은 잠겨 있습니다.","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","pl-PL":"Wybory dotyczące tego wymiaru są zablokowane","pt-BR":"Seleções estão bloqueadas nesta dimensão","ru-RU":"Выборки для данного измерения заблокированы","sv-SE":"Urval i den här dimensionen är låsta","tr-TR":"Bu boyuttaki seçimler kilitli","zh-CN":"相关维度的选择已锁定","zh-TW":"已鎖定此維度上的選項"}},Visualizations_Descriptions_Bars:{id:"Visualizations.Descriptions.Bars",locale:{"de-DE":"Balken","en-US":"Bars","es-ES":"Barras","fr-FR":"Barres","it-IT":"Barre","ja-JP":"棒","ko-KR":"막대","nl-NL":"Staven","pl-PL":"Słupki","pt-BR":"Barras","ru-RU":"Полосы","sv-SE":"Staplar","tr-TR":"Çubuklar","zh-CN":"条形","zh-TW":"長條"}},Visualizations_Descriptions_Group:{id:"Visualizations.Descriptions.Group",locale:{"de-DE":"Gruppe","en-US":"Group","es-ES":"Grupo","fr-FR":"Groupe","it-IT":"Gruppo","ja-JP":"グループ","ko-KR":"그룹","nl-NL":"Groep","pl-PL":"Grupa","pt-BR":"Grupo","ru-RU":"Группа","sv-SE":"Grupp","tr-TR":"Grup","zh-CN":"组","zh-TW":"群組"}},Visualizations_Descriptions_HeightLine:{id:"Visualizations.Descriptions.HeightLine",locale:{"de-DE":"Linienhöhe","en-US":"Height of line","es-ES":"Altura de línea","fr-FR":"Hauteur de ligne","it-IT":"Altezza della linea","ja-JP":"線の高さ","ko-KR":"선 높이","nl-NL":"Hoogte van lijn","pl-PL":"Wysokość linii","pt-BR":"Altura da linha","ru-RU":"Высота линии","sv-SE":"Linjens höjd","tr-TR":"Çizgi yüksekliği","zh-CN":"线高度","zh-TW":"折線高度"}},Visualizations_Descriptions_LengthBars:{id:"Visualizations.Descriptions.LengthBars",locale:{"de-DE":"Balkenlänge","en-US":"Length of bars","es-ES":"Longitud de barras","fr-FR":"Longueur des barres","it-IT":"Lunghezza delle barre","ja-JP":"棒の長さ","ko-KR":"막대 길이","nl-NL":"Lengte van staven","pl-PL":"Długość słupków","pt-BR":"Comprimento das barras","ru-RU":"Длина полос","sv-SE":"Staplarnas längd","tr-TR":"Çubuk uzunluğu","zh-CN":"条形长度","zh-TW":"長條長度"}},properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"de-DE":"Freigeben","en-US":"Share","es-ES":"Compartir","fr-FR":"Partage","it-IT":"Condividi","ja-JP":"共有","ko-KR":"공유","nl-NL":"Delen","pl-PL":"Udostępnij","pt-BR":"Compartilhar","ru-RU":"Совместное использование","sv-SE":"Dela","tr-TR":"Paylaş","zh-CN":"共享","zh-TW":"共用"}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"de-DE":"Durchschnitt","en-US":"Average","es-ES":"Media","fr-FR":"Moyenne","it-IT":"Media","ja-JP":"平均値","ko-KR":"평균","nl-NL":"Gemiddelde","pl-PL":"Średnia","pt-BR":"Média","ru-RU":"Среднее","sv-SE":"Medel","tr-TR":"Ortalama","zh-CN":"平均值","zh-TW":"平均值"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"de-DE":"Exponentiell","en-US":"Exponential","es-ES":"Exponencial","fr-FR":"Exponentiel","it-IT":"Esponenziale","ja-JP":"指数","ko-KR":"지수","nl-NL":"Exponentieel","pl-PL":"Wykładnicze","pt-BR":"Exponencial","ru-RU":"Экспоненциальный","sv-SE":"Exponentiell","tr-TR":"Üstel","zh-CN":"指数","zh-TW":"指數"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"de-DE":"Linear","en-US":"Linear","es-ES":"Lineal","fr-FR":"Linéaire","it-IT":"Lineare","ja-JP":"線形","ko-KR":"선형","nl-NL":"Lineair","pl-PL":"Liniowe","pt-BR":"Linear","ru-RU":"Линейный","sv-SE":"Linjär","tr-TR":"Doğrusal","zh-CN":"线性","zh-TW":"線性"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"de-DE":"Logarithmisch","en-US":"Logarithmic","es-ES":"Logarítmica","fr-FR":"Logarithmique","it-IT":"Logaritmica","ja-JP":"対数","ko-KR":"로그","nl-NL":"Logaritmisch","pl-PL":"Logarytmiczne","pt-BR":"Logarítmico","ru-RU":"Логарифмический","sv-SE":"Logaritmisk","tr-TR":"Logaritmik","zh-CN":"对数","zh-TW":"對數"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"de-DE":"Polynom zweiten Grades","en-US":"Second degree polynomial","es-ES":"Polinómica de segundo grado","fr-FR":"Polynomial du 2ème degré","it-IT":"Polinomio di secondo grado","ja-JP":"2 番目の角度の多項式近似","ko-KR":"2차 다항식","nl-NL":"Tweedegraadspolynoom","pl-PL":"Wielomianowe drugiego stopnia","pt-BR":"Polinômio de segundo grau","ru-RU":"Полиномиальный второй степени","sv-SE":"Polynomial, andra graden","tr-TR":"İkinci derece polinom","zh-CN":"二次多项式","zh-TW":"第二度多項式"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"de-DE":"Polynom dritten Grades","en-US":"Third degree polynomial","es-ES":"Polinómica de tercer grado","fr-FR":"Polynomial du 3ème degré","it-IT":"Polinomio di terzo grado","ja-JP":"3 番目の角度の多項式近似","ko-KR":"3차 다항식","nl-NL":"Derdegraadspolynoom","pl-PL":"Wielomianowe trzeciego stopnia","pt-BR":"Polinômio de terceiro grau","ru-RU":"Полиномиальный третьей степени","sv-SE":"Polynomial, tredje graden","tr-TR":"Üçüncü derece polinom","zh-CN":"三次多项式","zh-TW":"第三度多項式"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"de-DE":"Polynom vierten Grades","en-US":"Fourth degree polynomial","es-ES":"Polinómica de cuarto grado","fr-FR":"Polynomial du 4ème degré","it-IT":"Polinomio di quarto grado","ja-JP":"4 番目の角度の多項式近似","ko-KR":"4차 다항식","nl-NL":"Vierdegraadspolynoom","pl-PL":"Wielomianowe czwartego stopnia","pt-BR":"Polinômio de quarto grau","ru-RU":"Полиномиальный четвертой степени","sv-SE":"Polynomial, fjärde graden","tr-TR":"Dördüncü derece polinom","zh-CN":"四次多项式","zh-TW":"第四度多項式"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"de-DE":"Potenz","en-US":"Power","es-ES":"Potencia","fr-FR":"Puissance","it-IT":"Potenza","ja-JP":"累乗","ko-KR":"거듭제곱","nl-NL":"Macht","pl-PL":"Potęgowe","pt-BR":"Potência","ru-RU":"Степенной","sv-SE":"Potens","tr-TR":"Üs","zh-CN":"幂","zh-TW":"乘冪"}}};function te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ne=function(){if(Q)return Z;Q=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Z=function e(){var t,n,r,l,c,u,m=arguments[0],d=1,p=arguments.length,h=!1;for("boolean"==typeof m&&(h=m,m=arguments[1]||{},d=2),(null==m||"object"!=typeof m&&"function"!=typeof m)&&(m={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=s(m,n),m!==(l=s(t,n))&&(h&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(m,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(m,{name:n,newValue:l}));return m},Z}(),re=te(ne);const ie=[["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}]],oe={};ie.forEach(([e,{width:t,height:n}])=>{oe[e]={width:t,height:n}});const ae={getLayoutModes:()=>oe,getLayoutMode(e,t){let n;for(n=0;n<ie.length;++n)if(e>=ie[n][1].width&&t>=ie[n][1].height)return ie[n][0];return"SPARK"}};const se=["$date","$timestamp","$time"],le=["D","TS","T"],ce={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some(e=>se.some(t=>t===e))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&le.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=>7005!==e.qError?.qErrorCode)[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some(e=>"$numeric"===e))},canBeContinuous(e){const t=e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode);return!((t?.length??0)<1)&&ce.canBeContinuousDimension(t[0])},maxNumberOfLines:12},ue=/^[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,"")}},de={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},getValue:(e,t,n)=>{const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||ue.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=>de.getValue(e,"qHyperCube.qDimensionInfo",[]),he=e=>de.getValue(e,"qHyperCube.qMeasureInfo",[]),fe=e=>de.getValue(e,"barGrouping.grouping"),ge={continuous({layout:e,properties:t,auto:n}){if(!ce.canBeContinuous(e))return!1;const r=t||e;return de.getValue(r,"dimensionAxis.continuousAuto")?"function"==typeof n?n():!!n:!!r?.preferContinuousAxis},dimensionless:e=>!pe(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===fe(e)&&(pe(e).length>1||he(e).length>1)&&!this.continuous({layout:e})},groupedByDimension(e){return this.grouped(e)&&pe(e).length>1&&1===he(e).length},groupedByMeasure(e){return this.grouped(e)&&1===pe(e).length&&he(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==fe(e)&&"butterfly"!==fe(e)||this.continuous({layout:e}))&&(pe(e).length>1||he(e).length>1)},stackedByDimension(e){return this.stacked(e)&&pe(e).length>1&&1===he(e).length},stackedByMeasure(e){return this.stacked(e)&&1===pe(e).length&&he(e).length>1},simple:e=>0===pe(e).length||1===pe(e).length&&1===he(e).length,snapshot:e=>!!de.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 ve=e=>{throw e.isHandled=!0,e};const Se={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?Se.getVerticalDock(t):n?Se.getOppositeDock(Se.getHorizontalDock(t)):Se.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},Me=166/26,Ee=12/11,xe={stringWidthOverMWidth:e=>(12*Math.min(e,3)+Math.max(e-3,0)*Me)/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach(e=>{i=xe.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk}):e.forEach(e=>{i=xe.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk});const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=xe.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(xe.stringWidthOverMWidth(o)+a*Ee)}},be=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ce=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Ae=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Ne={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>be.test(e),isRtlChar:e=>Ce.test(e)||Ae.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Ne.isLtrChar(r))return"ltr";if(Ne.isRtlChar(r))return"rtl"}return"ltr"}},Oe={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Oe.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some(e=>e.field===t.coloring.field),getTitleRow(e,t){const n=Ne.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=Ne.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n,"white-space":"pre-wrap"},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Ne.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=Ne.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Ne.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Oe.getColorSymbol(e,t)]:[Oe.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Ne.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Ne.detectTextDirection(e.value);let l;return l=i?r?[e.value,Oe.getColorSymbol(t,n)]:[Oe.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Te(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Le(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Re(){}var Ie=.7,ke=1/Ie,we="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pe=/^#([0-9a-f]{3,8})$/,ze=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),$e=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),_e=new RegExp(`^rgba\\(${we},${we},${we},${De}\\)$`),Fe=new RegExp(`^rgba\\(${qe},${qe},${qe},${De}\\)$`),Be=new RegExp(`^hsl\\(${De},${qe},${qe}\\)$`),Ve=new RegExp(`^hsla\\(${De},${qe},${qe},${De}\\)$`),je={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ue(){return this.rgb().formatHex()}function He(){return this.rgb().formatRgb()}function Ye(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Pe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?We(t):3===n?new Je(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Xe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Xe(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=ze.exec(e))?new Je(t[1],t[2],t[3],1):(t=$e.exec(e))?new Je(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_e.exec(e))?Xe(t[1],t[2],t[3],t[4]):(t=Fe.exec(e))?Xe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Be.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]):je.hasOwnProperty(e)?We(je[e]):"transparent"===e?new Je(NaN,NaN,NaN,0):null}function We(e){return new Je(e>>16&255,e>>8&255,255&e,1)}function Xe(e,t,n,r){return r<=0&&(e=t=n=NaN),new Je(e,t,n,r)}function Ke(e){return e instanceof Re||(e=Ye(e)),e?new Je((e=e.rgb()).r,e.g,e.b,e.opacity):new Je}function Ge(e,t,n,r){return 1===arguments.length?Ke(e):new Je(e,t,n,null==r?1:r)}function Je(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ze(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}`}function Qe(){const e=et(this.opacity);return`${1===e?"rgb(":"rgba("}${tt(this.r)}, ${tt(this.g)}, ${tt(this.b)}${1===e?")":`, ${e})`}`}function et(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nt(e){return((e=tt(e))<16?"0":"")+e.toString(16)}function rt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ot(e,t,n,r)}function it(e){if(e instanceof ot)return new ot(e.h,e.s,e.l,e.opacity);if(e instanceof Re||(e=Ye(e)),!e)return new ot;if(e instanceof ot)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ot(a,s,l,e.opacity)}function ot(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function at(e){return(e=(e||0)%360)<0?e+360:e}function st(e){return Math.max(0,Math.min(1,e||0))}function lt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Te(Re,Ye,{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 it(this).formatHsl()},formatRgb:He,toString:He}),Te(Je,Ge,Le(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ie:Math.pow(Ie,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Je(tt(this.r),tt(this.g),tt(this.b),et(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:Ze,formatHex:Ze,formatHex8:function(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}${nt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Qe,toString:Qe})),Te(ot,function(e,t,n,r){return 1===arguments.length?it(e):new ot(e,t,n,null==r?1:r)},Le(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ie:Math.pow(Ie,e),new ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Je(lt(e>=240?e-240:e+120,i,r),lt(e,i,r),lt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ot(at(this.h),st(this.s),st(this.l),et(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=et(this.opacity);return`${1===e?"hsl(":"hsla("}${at(this.h)}, ${100*st(this.s)}%, ${100*st(this.l)}%${1===e?")":`, ${e})`}`}}));const ct=Math.PI/180,ut=180/Math.PI,mt=.96422,dt=.82521,pt=4/29,ht=6/29,ft=3*ht*ht,gt=ht*ht*ht;function yt(e){if(e instanceof vt)return new vt(e.l,e.a,e.b,e.opacity);if(e instanceof Ct)return At(e);e instanceof Je||(e=Ke(e));var t,n,r=xt(e.r),i=xt(e.g),o=xt(e.b),a=St((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=St((.4360747*r+.3850649*i+.1430804*o)/mt),n=St((.0139322*r+.0971045*i+.7141733*o)/dt)),new vt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function vt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function St(e){return e>gt?Math.pow(e,1/3):e/ft+pt}function Mt(e){return e>ht?e*e*e:ft*(e-pt)}function Et(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function xt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function bt(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ct)return new Ct(e.h,e.c,e.l,e.opacity);if(e instanceof vt||(e=yt(e)),0===e.a&&0===e.b)return new Ct(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ut;return new Ct(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ct(e,t,n,null==r?1:r)}function Ct(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function At(e){if(isNaN(e.h))return new vt(e.l,0,0,e.opacity);var t=e.h*ct;return new vt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Te(vt,function(e,t,n,r){return 1===arguments.length?yt(e):new vt(e,t,n,null==r?1:r)},Le(Re,{brighter(e){return new vt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new vt(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 Je(Et(3.1338561*(t=mt*Mt(t))-1.6168667*(e=1*Mt(e))-.4906146*(n=dt*Mt(n))),Et(-.9787684*t+1.9161415*e+.033454*n),Et(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Te(Ct,bt,Le(Re,{brighter(e){return new Ct(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ct(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return At(this).rgb()}}));var Nt={isDark:function(e){return bt(e).l<70}};function Ot(e){const t=e.qDef;!0===t.autoSort&&t.qSortCriterias.forEach(e=>{e.qSortByNumeric=1,e.qSortByAscii=1})}function Tt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Lt(e){var t;return 1===e.length&&(t=e,e=function(e,n){return Tt(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var Rt=Lt(Tt).right,It=Math.sqrt(50),kt=Math.sqrt(10),wt=Math.sqrt(2);function Dt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=It?10:o>=kt?5:o>=wt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=It?10:o>=kt?5:o>=wt?2:1)}function qt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=It?i*=10:o>=kt?i*=5:o>=wt&&(i*=2),t<e?-i:i}function Pt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var zt="$";function $t(){}function _t(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 r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Ft(){}$t.prototype=_t.prototype={constructor:$t,has:function(e){return zt+e in this},get:function(e){return this[zt+e]},set:function(e,t){return this[zt+e]=t,this},remove:function(e){var t=zt+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===zt&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===zt&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===zt&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===zt&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===zt&&++e;return e},empty:function(){for(var e in this)if(e[0]===zt)return!1;return!0},each:function(e){for(var t in this)t[0]===zt&&e(this[t],t.slice(1),this)}};var Bt=_t.prototype;Ft.prototype={constructor:Ft,has:Bt.has,add:function(e){return this[zt+(e+="")]=e,this},remove:Bt.remove,clear:Bt.clear,values:Bt.keys,size:Bt.size,empty:Bt.empty,each:Bt.each};var Vt=Array.prototype,jt=Vt.map,Ut=Vt.slice;function Ht(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Yt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Wt(){}var Xt=.7,Kt=1/Xt,Gt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qt=/^#([0-9a-f]{3,8})$/,en=new RegExp("^rgb\\("+[Gt,Gt,Gt]+"\\)$"),tn=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),nn=new RegExp("^rgba\\("+[Gt,Gt,Gt,Jt]+"\\)$"),rn=new RegExp("^rgba\\("+[Zt,Zt,Zt,Jt]+"\\)$"),on=new RegExp("^hsl\\("+[Jt,Zt,Zt]+"\\)$"),an=new RegExp("^hsla\\("+[Jt,Zt,Zt,Jt]+"\\)$"),sn={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 ln(){return this.rgb().formatHex()}function cn(){return this.rgb().formatRgb()}function un(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?mn(t):3===n?new hn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?dn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?dn(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=en.exec(e))?new hn(t[1],t[2],t[3],1):(t=tn.exec(e))?new hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=nn.exec(e))?dn(t[1],t[2],t[3],t[4]):(t=rn.exec(e))?dn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=on.exec(e))?vn(t[1],t[2]/100,t[3]/100,1):(t=an.exec(e))?vn(t[1],t[2]/100,t[3]/100,t[4]):sn.hasOwnProperty(e)?mn(sn[e]):"transparent"===e?new hn(NaN,NaN,NaN,0):null}function mn(e){return new hn(e>>16&255,e>>8&255,255&e,1)}function dn(e,t,n,r){return r<=0&&(e=t=n=NaN),new hn(e,t,n,r)}function pn(e,t,n,r){return 1===arguments.length?((i=e)instanceof Wt||(i=un(i)),i?new hn((i=i.rgb()).r,i.g,i.b,i.opacity):new hn):new hn(e,t,n,null==r?1:r);var i}function hn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function fn(){return"#"+yn(this.r)+yn(this.g)+yn(this.b)}function gn(){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 vn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mn(e,t,n,r)}function Sn(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof Wt||(e=un(e)),!e)return new Mn;if(e instanceof Mn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Mn(a,s,l,e.opacity)}function Mn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function En(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 xn(e){return function(){return e}}function bn(e){return 1===(e=+e)?Cn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):xn(isNaN(t)?n:t)}}function Cn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xn(isNaN(e)?t:e)}Ht(Wt,un,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ln,formatHex:ln,formatHsl:function(){return Sn(this).formatHsl()},formatRgb:cn,toString:cn}),Ht(hn,pn,Yt(Wt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new hn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Xt:Math.pow(Xt,e),new hn(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:fn,formatHex:fn,formatRgb:gn,toString:gn})),Ht(Mn,function(e,t,n,r){return 1===arguments.length?Sn(e):new Mn(e,t,n,null==r?1:r)},Yt(Wt,{brighter:function(e){return e=null==e?Kt:Math.pow(Kt,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Xt:Math.pow(Xt,e),new Mn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new hn(En(e>=240?e-240:e+120,i,r),En(e,i,r),En(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var An=function e(t){var n=bn(t);function r(e,t){var r=n((e=pn(e)).r,(t=pn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Cn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Nn(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function On(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Dn(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Tn(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ln(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Rn(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Dn(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var In=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kn=new RegExp(In.source,"g");function wn(e,t){var n,r,i,o=In.lastIndex=kn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=In.exec(e))&&(r=kn.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Ln(n,r)})),o=kn.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Dn(e,t){var n,r,i=typeof t;return null==t||"boolean"===i?xn(t):("number"===i?Ln:"string"===i?(n=un(t))?(t=n,An):wn:t instanceof un?An:t instanceof Date?Tn:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?On:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Rn:Ln:Nn))(e,t)}function qn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Pn(e){return+e}var zn=[0,1];function $n(e){return e}function _n(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function Fn(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function Bn(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=_n(i,r),o=n(a,o)):(r=_n(r,i),o=n(o,a)),function(e){return o(r(e))}}function Vn(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=_n(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Rt(e,t,1,r)-1;return o[n](i[n](t))}}function jn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Un(e,t){return function(){var e,t,n,r,i,o,a=zn,s=zn,l=Dn,c=$n;function u(){return r=Math.min(a.length,s.length)>2?Vn:Bn,i=o=null,m}function m(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return m.invert=function(n){return c(t((o||(o=r(s,a.map(e),Ln)))(n)))},m.domain=function(e){return arguments.length?(a=jt.call(e,Pn),c===$n||(c=Fn(a)),u()):a.slice()},m.range=function(e){return arguments.length?(s=Ut.call(e),u()):s.slice()},m.rangeRound=function(e){return s=Ut.call(e),l=qn,u()},m.clamp=function(e){return arguments.length?(c=e?Fn(a):$n,m):c!==$n},m.interpolate=function(e){return arguments.length?(l=e,u()):l},m.unknown=function(e){return arguments.length?(n=e,m):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function Hn(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Yn(e){return(e=Hn(Math.abs(e)))?e[1]:NaN}var Wn,Xn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kn(e){if(!(t=Xn.exec(e)))throw new Error("invalid format: "+e);var t;return new Gn({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 Gn(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 Jn(e,t){var n=Hn(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Kn.prototype=Gn.prototype,Gn.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 Zn={"%":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 Jn(100*e,t)},r:Jn,s:function(e,t){var n=Hn(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Wn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Hn(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 Qn(e){return e}var er,tr,nr,rr=Array.prototype.map,ir=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function or(e){var t=void 0===e.grouping||void 0===e.thousands?Qn:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(rr.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?Qn:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(rr.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=Kn(e)).fill,u=e.align,m=e.sign,d=e.symbol,p=e.zero,h=e.width,f=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(f=!0,v="g"):Zn[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===c&&"="===u)&&(p=!0,c="0",u="=");var S="$"===d?n:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",M="$"===d?r:/[%p]/.test(v)?a:"",E=Zn[v],x=/[defgprs%]/.test(v);function b(e){var n,r,a,d=S,b=M;if("c"===v)b=E(e)+b,e="";else{var C=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:E(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),C&&0===+e&&"+"!==m&&(C=!1),d=(C?"("===m?m:s:"-"===m||"("===m?"":m)+d,b=("s"===v?ir[8+Wn/3]:"")+b+(C&&"("===m?")":""),x)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){b=(46===a?i+e.slice(n+1):e.slice(n))+b,e=e.slice(0,n);break}}f&&!p&&(e=t(e,1/0));var A=d.length+e.length+b.length,N=A<h?new Array(h-A+1).join(c):"";switch(f&&p&&(e=t(N+e,N.length?h-b.length:1/0),N=""),u){case"<":e=d+e+b+N;break;case"=":e=d+N+e+b;break;case"^":e=N.slice(0,A=N.length>>1)+d+e+b+N.slice(A);break;default:e=N+d+e+b}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),b.toString=function(){return e+""},b}return{format:c,formatPrefix:function(e,t){var n=c(((e=Kn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Yn(t)/3))),i=Math.pow(10,-r),o=ir[8+r/3];return function(e){return n(i*e)+o}}}}function ar(e,t,n,r){var i,o=qt(e,t,n);switch((r=Kn(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Yn(t)/3)))-Yn(Math.abs(e)))}(o,a))||(r.precision=i),nr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yn(t)-Yn(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-Yn(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return tr(r)}function sr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Dt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return ar(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=Dt(s,l,n))>0?r=Dt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Dt(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function lr(){var e=Un($n,$n);return e.copy=function(){return jn(e,lr())},Pt.apply(e,arguments),sr(e)}er=or({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),tr=er.format,nr=er.formatPrefix;var cr=new Date,ur=new Date;function mr(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return mr(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(i.count=function(t,r){return cr.setTime(+t),ur.setTime(+r),e(cr),e(ur),Math.floor(n(cr,ur))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var dr=mr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});dr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mr(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):dr:null},dr.range;var pr=6e4,hr=36e5,fr=864e5,gr=6048e5,yr=mr(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()});yr.range;var vr=mr(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())*pr)/fr},function(e){return e.getDate()-1});function Sr(e){return mr(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())*pr)/gr})}vr.range;var Mr=Sr(0),Er=Sr(1),xr=Sr(2),br=Sr(3),Cr=Sr(4),Ar=Sr(5),Nr=Sr(6);Mr.range,Er.range,xr.range,br.range,Cr.range,Ar.range,Nr.range;var Or=mr(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()});Or.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr(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},Or.range;var Tr=mr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*pr)},function(e,t){return(t-e)/pr},function(e){return e.getUTCMinutes()});Tr.range;var Lr=mr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*hr)},function(e,t){return(t-e)/hr},function(e){return e.getUTCHours()});Lr.range;var Rr=mr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/fr},function(e){return e.getUTCDate()-1});function Ir(e){return mr(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)/gr})}Rr.range;var kr=Ir(0),wr=Ir(1),Dr=Ir(2),qr=Ir(3),Pr=Ir(4),zr=Ir(5),$r=Ir(6);kr.range,wr.range,Dr.range,qr.range,Pr.range,zr.range,$r.range;var _r=mr(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()});_r.range;var Fr=mr(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 Br(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 Vr(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function jr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Fr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mr(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},Fr.range;var Ur,Hr,Yr={"-":"",_:" ",0:"0"},Wr=/^\s*\d+/,Xr=/^%/,Kr=/[\\^$*+?|[\]().{}]/g;function Gr(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Jr(e){return e.replace(Kr,"\\$&")}function Zr(e){return new RegExp("^(?:"+e.map(Jr).join("|")+")","i")}function Qr(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function ei(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ti(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ni(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ri(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ii(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function oi(e,t,n){var r=Wr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ai(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function si(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function li(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function ci(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ui(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function mi(e,t,n){var r=Wr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function di(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pi(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function hi(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function fi(e,t,n){var r=Wr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gi(e,t,n){var r=Wr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function yi(e,t,n){var r=Xr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function vi(e,t,n){var r=Wr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Si(e,t,n){var r=Wr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Mi(e,t){return Gr(e.getDate(),t,2)}function Ei(e,t){return Gr(e.getHours(),t,2)}function xi(e,t){return Gr(e.getHours()%12||12,t,2)}function bi(e,t){return Gr(1+vr.count(Or(e),e),t,3)}function Ci(e,t){return Gr(e.getMilliseconds(),t,3)}function Ai(e,t){return Ci(e,t)+"000"}function Ni(e,t){return Gr(e.getMonth()+1,t,2)}function Oi(e,t){return Gr(e.getMinutes(),t,2)}function Ti(e,t){return Gr(e.getSeconds(),t,2)}function Li(e){var t=e.getDay();return 0===t?7:t}function Ri(e,t){return Gr(Mr.count(Or(e)-1,e),t,2)}function Ii(e){var t=e.getDay();return t>=4||0===t?Cr(e):Cr.ceil(e)}function ki(e,t){return e=Ii(e),Gr(Cr.count(Or(e),e)+(4===Or(e).getDay()),t,2)}function wi(e){return e.getDay()}function Di(e,t){return Gr(Er.count(Or(e)-1,e),t,2)}function qi(e,t){return Gr(e.getFullYear()%100,t,2)}function Pi(e,t){return Gr((e=Ii(e)).getFullYear()%100,t,2)}function zi(e,t){return Gr(e.getFullYear()%1e4,t,4)}function $i(e,t){var n=e.getDay();return Gr((e=n>=4||0===n?Cr(e):Cr.ceil(e)).getFullYear()%1e4,t,4)}function _i(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Gr(t/60|0,"0",2)+Gr(t%60,"0",2)}function Fi(e,t){return Gr(e.getUTCDate(),t,2)}function Bi(e,t){return Gr(e.getUTCHours(),t,2)}function Vi(e,t){return Gr(e.getUTCHours()%12||12,t,2)}function ji(e,t){return Gr(1+Rr.count(Fr(e),e),t,3)}function Ui(e,t){return Gr(e.getUTCMilliseconds(),t,3)}function Hi(e,t){return Ui(e,t)+"000"}function Yi(e,t){return Gr(e.getUTCMonth()+1,t,2)}function Wi(e,t){return Gr(e.getUTCMinutes(),t,2)}function Xi(e,t){return Gr(e.getUTCSeconds(),t,2)}function Ki(e){var t=e.getUTCDay();return 0===t?7:t}function Gi(e,t){return Gr(kr.count(Fr(e)-1,e),t,2)}function Ji(e){var t=e.getUTCDay();return t>=4||0===t?Pr(e):Pr.ceil(e)}function Zi(e,t){return e=Ji(e),Gr(Pr.count(Fr(e),e)+(4===Fr(e).getUTCDay()),t,2)}function Qi(e){return e.getUTCDay()}function eo(e,t){return Gr(wr.count(Fr(e)-1,e),t,2)}function to(e,t){return Gr(e.getUTCFullYear()%100,t,2)}function no(e,t){return Gr((e=Ji(e)).getUTCFullYear()%100,t,2)}function ro(e,t){return Gr(e.getUTCFullYear()%1e4,t,4)}function io(e,t){var n=e.getUTCDay();return Gr((e=n>=4||0===n?Pr(e):Pr.ceil(e)).getUTCFullYear()%1e4,t,4)}function oo(){return"+0000"}function ao(){return"%"}function so(e){return+e}function lo(e){return Math.floor(+e/1e3)}!function(e){Ur=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Zr(i),u=Qr(i),m=Zr(o),d=Qr(o),p=Zr(a),h=Qr(a),f=Zr(s),g=Qr(s),y=Zr(l),v=Qr(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:Mi,e:Mi,f:Ai,g:Pi,G:$i,H:Ei,I:xi,j:bi,L:Ci,m:Ni,M:Oi,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:so,s:lo,S:Ti,u:Li,U:Ri,V:ki,w:wi,W:Di,x:null,X:null,y:qi,Y:zi,Z:_i,"%":ao},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:Fi,e:Fi,f:Hi,g:no,G:io,H:Bi,I:Vi,j:ji,L:Ui,m:Yi,M:Wi,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:so,s:lo,S:Xi,u:Ki,U:Gi,V:Zi,w:Qi,W:eo,x:null,X:null,y:to,Y:ro,Z:oo,"%":ao},E={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:ui,e:ui,f:gi,g:ai,G:oi,H:di,I:di,j:mi,L:fi,m:ci,M:pi,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},q:li,Q:vi,s:Si,S:hi,u:ti,U:ni,V:ri,w:ei,W:ii,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:ai,Y:oi,Z:si,"%":yi};function x(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Yr[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function b(e,t){return function(n){var r,i,o=jr(1900,void 0,1);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Vr(jr(o.y,0,1))).getUTCDay(),r=i>4||0===i?wr.ceil(r):wr(r),r=Rr.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Br(jr(o.y,0,1))).getDay(),r=i>4||0===i?Er.ceil(r):Er(r),r=vr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Vr(jr(o.y,0,1)).getUTCDay():Br(jr(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Vr(o)):Br(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=E[i in Yr?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return S.x=x(n,S),S.X=x(r,S),S.c=x(t,S),M.x=x(n,M),M.X=x(r,M),M.c=x(t,M),{format:function(e){var t=x(e+="",S);return t.toString=function(){return e},t},parse:function(e){var t=b(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=x(e+="",M);return t.toString=function(){return e},t},utcParse:function(e){var t=b(e+="",!0);return t.toString=function(){return e},t}}}(e),Ur.format,Ur.parse,Hr=Ur.utcFormat,Ur.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,uo=6e4,mo=36e5,po=864e5,ho=2592e6,fo=31536e6;function go(e){return new Date(e)}function yo(e){return e instanceof Date?+e:+new Date(+e)}function vo(e,t,n,r,i,o,a,s,l){var c=Un($n,$n),u=c.invert,m=c.domain,d=l(".%L"),p=l(":%S"),h=l("%I:%M"),f=l("%I %p"),g=l("%a %d"),y=l("%b %d"),v=l("%B"),S=l("%Y"),M=[[a,1,co],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,uo],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,mo],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,po],[r,2,1728e5],[n,1,6048e5],[t,1,ho],[t,3,7776e6],[e,1,fo]];function E(s){return(a(s)<s?d:o(s)<s?p:i(s)<s?h:r(s)<s?f:t(s)<s?n(s)<s?g:y:e(s)<s?v:S)(s)}function x(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=Lt(function(e){return e[2]}).right(M,o);a===M.length?(i=qt(n/fo,r/fo,t),t=e):a?(i=(a=M[o/M[a-1][2]<M[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(qt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?m(jt.call(e,yo)):m().map(go)},c.ticks=function(e,t){var n,r=m(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=x(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?E:l(t)},c.nice=function(e,t){var n=m();return(e=x(e,n[0],n[n.length-1],t))?m(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):c},c.copy=function(){return jn(c,vo(e,t,n,r,i,o,a,s,l))},c}function So(){return Pt.apply(vo(Fr,_r,kr,Rr,Lr,Tr,yr,dr,Hr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Mo={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"}}},Eo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var xo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=Mo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Eo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Eo(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function bo({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Co;function Ao(){Co=Co||document.createElement("canvas").getContext("2d")}const No={measureTextWidth(e){Ao();const{width:t}=Co.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Ao();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,m,d=e?e.split(/\s+/):[],p=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Co.font=n),o=0;o<a.length;o++){for(m=a[o]||"",d=m.split(/\s+/),[p]=d,u="",i=1;i<d.length;i++)if(l=`${p} ${d[i]}`,c=No.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(p),p=d[i]):p=l,"number"==typeof r&&s.length>=r){u=d.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(p):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${p} ${u}`}return s},wordWrap(e,t,n,r,i){if(Ao(),!e||!e.length)return[];n&&(Co.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||No.measureTextWidth(c)<=t?o.push(c):(s=No.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?No.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return o.forEach((e,t,n)=>{n[t]=e?e.trim():e}),o.length>r?(o=o.splice(0,r),o[o.length-1]=No.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&No.measureTextWidth(c)>t&&(o[o.length-1]=No.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){Ao();let i,o,a,s,l=e;const c=No.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(Co.font=n),e&&t){if(No.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,No.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;Ao();let o,a=e,s="",l=[];if(No.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(No.measureTextWidth(a)<=t));i--);return(!i&&!a||No.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(No.measureTextWidth(s)>t?(s=No.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,r)=>(Ao(),e&&t?(n&&(Co.font=n),No.explodeWord(e,t,r,Math.max(1,No.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?No.lineWrap(e,t,n,r):[e],o=No.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Ao(),e&&(Co.font=e),1.5*No.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Ao(),t&&(Co.font=t);const s=No.getFontHeight(),l=a*s;let c=[],u=0,m=[];if(o<s)return[];const d=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(e=>{u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(e=>{c.push(Number.isNaN(e)||e<=0?d-u:e)})):c=[Number.isNaN(r)||r<=0?d:Math.min(d,r)],Array.isArray(e)?e.forEach((e,n)=>{m.length<d&&(m=m.concat(No.wrapText(e,i,t,c[n])))}):m=No.wrapText(e,i,t,c[0],n),m}},Oo={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,m=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,m=t<.5?180:0),a(re({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}},To=re.bind(null,!0),Lo={},{isArray:Ro}=Array;function Io(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ko(e){return void 0===e}function wo(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Do(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=ko(e[r||t])?o:e[t],e=e[r||t]}),e}function qo(e,t){return t?Object.keys(e).filter(t=>void 0!==e[t]).length:Object.keys(e).length}function Po(e,t,n){let r=!0;if(Io(e)&&Io(t))return qo(e,n)===qo(t,n)&&(Object.keys(e).forEach(i=>{Po(e[i],t[i],n)||(r=!1)}),r);if(Ro(e)&&Ro(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r+=1)if(!Po(e[r],t[r],n))return!1;return!0}return e===t}Lo.compare=Po,Lo.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(i=>{const o=function(e){return e?To({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;Po(o,a)||wo(t,i)||(ko(a)?r.push({op:"add",path:s,value:o}):Io(o)&&Io(a)?r=r.concat(Lo.generate(a,o,s)):Ro(o)&&Ro(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&ko(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Po(t,i))return r;if(!ko(t[0])&&ko(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(Lo.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))}),Object.keys(e).forEach(i=>{ko(t[i])&&!wo(e,i)&&r.push({op:"remove",path:`${n}/${i}`})}),r},Lo.apply=function(e,t){t.forEach(t=>{let n=Do(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(Ro(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Ro(i)&&Ro(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(Io(i)&&Io(t.value))a=i,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!wo(a,e)&&delete a[e]}),To(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=Do(e,t.from);Ro(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(Ro(n)?n.splice(+r,1):delete n[r]);var a})},Lo.clone=function(e){return To({},e)},Lo.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Lo.updateObject=function(e,t){Object.keys(e).length?Lo.apply(e,Lo.generate(e,t)):To(e,t)};const zo=Math.log(10);function $o(e){return 10**e}const _o={pow10:$o,log:(e,t)=>e<=0||t<=0?NaN:Math.log(e)/Math.log(t),log10:e=>e<=0?NaN:Math.log(e)/zo,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))/zo),r=e/$o(n);return t=r<=1?1:r<=2?2:r<=5?5:10,t*$o(n)*(e<0?-1:1)},getSmallNiceNumber(e){let t,n;if(0===e)return 0;t=Math.floor(Math.log(Math.abs(e))/zo);const r=e/$o(t);return r<1?(n=5,t--):n=r<2?1:r<5?2:5,n*$o(t)*(e<0?-1:1)},getMagnitude(e){if(0===e)return 0;return $o(Math.floor(Math.log(Math.abs(e))/zo))},getFraction(e){if(0===e)return 0;return e/$o(Math.floor(Math.log(Math.abs(e))/zo))},getGoodNumber(e){let t;if(0===e)return 0;const n=Math.floor(Math.log(Math.abs(e))/zo),r=e/$o(n);return t=Math.ceil(r),7!==t&&9!==t||t++,r>1&&r<=1.5?t=1.5:r>2&&r<=2.5&&(t=2.5),t*$o(n)*(e<0?-1:1)},getValueWithOffset:(e,t=0)=>e+Math.abs(e)*t,isNumber:e=>"number"==typeof e&&!Number.isNaN(e)},Fo=[[2,4,6],[2,4],[3]],Bo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Vo(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function jo(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Vo(e[r],t,n)}!function(){let e,t;for(jo(Fo,1,10),e=0;e<Bo.length;e++)if(Bo[e])for(t=0;t<Bo[e].length;t++)Array.isArray(Bo[e][t])&&jo(Bo[e][t])}();const Uo={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=Uo.findSegmentPositionMeetMin(e,t);return Uo.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=Uo.findSegmentPositionMeetMax(e,n);return Uo.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=Uo.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=Uo.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let c,u=0;for(o=i;o>0&&(a=e[o],s=e[o-1],c=Math.max(0,Uo.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));o--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,o=0;o<=i;o++)a=e[o],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0)){if(0===i){const r=e[0];return void(r.position=Uo.findSegmentPositionMeetMaxThenMin(r,t,n))}Uo.layoutPositionFromMin(e,t,n,r),Uo.adjustPositionFromMax(e,t,n,r)}}},Ho=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},Yo=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,Wo=e=>e.filter(Yo),Xo=(e,t)=>Wo(de.getValue(e,t,[])),Ko=e=>Yo(e)&&(!1!==e.showValue||!1!==e.showLabel),Go=e=>e.filter(Ko),Jo=(e,t)=>Go(de.getValue(e,t,[])),Zo=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,Qo=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},ea=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},ta=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},na=({value:e,qMin:t})=>"NaN"!==t&&e<t,ra=({value:e,qMax:t})=>"NaN"!==t&&e>t,ia={isRefLineVisible:Yo,getVisibleRefLines:Wo,getRefLines:Xo,getMeasureRefLines:e=>Xo(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:Xo(e,"refLine.dimRefLines"),isRefLineLabelVisible:Ko,getVisibleRefLineLabels:Go,getRefLineLabels:Jo,getMeasureRefLineLabels:e=>Jo(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:Jo(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=Ho(s,i,o,a.meta.groupSize??a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=Ho(s,i,o,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===c?s(n):c)+l}return l=Ho(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=de.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():de.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);if(void 0===l?.qArea?.qTop)return o;const c=s?"qData.0.qSubNodes":"qMatrix",u=de.getValue(l,c,[]),m=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<u.length;e++){const t=u[e],n=e+d,r=t[m];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})():i?(()=>{let e;for(let t=0;t<u.length;t++){const n=u[t][0],r=u[t][1],i=t+d,a=n[m];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}],dataNode:u[t]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<u.length;e++){const t=u[e][0],n=e+d,r=t[m];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n,dataNode:u[e]})}})(),o},getInputValue:Zo,extractInfoFromInputValue:Qo,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Zo({refLineLayout:e,layoutService:n});return Qo(r,t,"id")},isDiscreteMinOutOfBounds:ea,isDiscreteMaxOutOfBounds:ta,isContinuousMinOutOfBounds:na,isContinuousMaxOutOfBounds:ra,isOutOfRange:({value:e,qMin:t,qMax:n})=>na({value:e,qMin:t})||ra({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&ta({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&ea({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},oa=({label:e,labelStyle:t})=>[e?.fontStyle||t?.fontStyle,e?.fontWeight||t?.fontWeight,e?.fontSize||t?.fontSize,e?.fontFamily||t?.fontFamily].filter(e=>!!e).join(" ");function aa(e){return e.showValue?`… ${e.valueString}`:"…"}function sa(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=oa({label:i,labelStyle:t});i.lines=No.tokenize(i.title,o,aa(i),3,n),i.maxNumLines=i.lines.length}}function la({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=No.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function ca({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map(e=>la({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i})),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function ua(e,t="value"){e.sort((e,n)=>e[t]-n[t])}const ma=3,da=2;function pa({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const ha=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(ia.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(ia.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return ia.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:ia.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},fa={hasEngineFormat:pa,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=ia.getInvert({orientation:i,rtl:o,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:m}=r.meta;let d,p;if(s&&m){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");d=e.qMin,p=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:c,valueInfo:m}=o,h=ha({label:o,dataPages:u,qMin:d,qMax:p});o.scaledValue=1===h?l?-.1:1.1:-1===h?l?1.1:-.1:ia.getScaledPosition({scale:t,size:n,value:s,valueInfo:m,align:c,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=pa({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Ne.lrm}(${o})${Ne.lrm}`,r.title=fa.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=pa({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Ne.lrm}(${o})${Ne.lrm}`,n.title=fa.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Ne.lrm}(${o})${Ne.lrm}`,n.title=fa.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title,r).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map(n=>t(n,e).width)),getMaxTextWidth(e){const t=e.map(e=>e.totalWidth);return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach(e=>{t+=e.maxNumLines}),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter(e=>e.maxNumLines===t),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=fa.getTotalNumLines(e)-r;if(t<=0)return;fa.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,fa.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,labelStyle:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:m,rtl:d,layoutService:p,isContinuous:h,isDimension:f}){const g=e.map(e=>e),y=n;fa.calculateLabelPositions({labels:e,scale:t,size:y,layoutService:p,orientation:u,rtl:d,isContinuous:h,isDimension:f}),ua(e,"center"),fa.addLabelsNeighborInfo(e,r,i,o),sa(e,a,s),fa.reduceTotalMaxNumLines(g,l,i-(g.length-1)*o),"vertical"===u&&(fa.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r],o=oa({label:i,labelStyle:t});i.lines.length>i.maxNumLines&&(i.lines=No.tokenize(i.title,o,aa(i),i.maxNumLines,n))}}(e,a,s)),fa.addLabelsSize(e,s,l,m),fa.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=i,{fontSize:m,fontFamily:d,fontStyle:p,fontWeight:h,textDecoration:f,background:g}=t;let y=[];return e.forEach(e=>{const{lines:t}=e,r=t.length,i=t.map((t,i)=>{const g={type:"text",text:t,title:la({title:e.title,font:a,ellipsis:aa(e)}),dx:0,dy:0,maxWidth:n,width:n,fontSize:e.fontSize||m,fontFamily:e.fontFamily||d,fontStyle:e.fontStyle||p,fontWeight:e.fontWeight||h,textDecoration:e.textDecoration||f,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return g[l]=u,g[s]=e.segment.position,g.y+=(i-(r-1)/2)*o,g});e.background&&y.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=ma,padding:c={}}=a,{top:u=da,bottom:m=da,left:d=da,right:p=da}=c,h=s.length,f={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(d+p),height:i.height+(u+m),value:i.value,dock:r};return f[n]=e,f[t]=i.segment.position,f.x-=i.width/2+d,f.y-=h*o/2+u,f}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:o,background:g})),y=y.concat(i)}),y}};function ga(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function ya(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{lineHeight:n,top:r,bottom:i,maxLabelWidth:o}=t;let a=1;return fa.getMaxTextWidth(e)>o&&(sa(e,t,o),a=Math.max(...e.map(e=>e.lines.length))),a*n+r+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,fa.getMaxTextWidth(e))+n+r}(t,n)}function va(e,t){return t?e.domain():[0,1]}function Sa(e,t,n,r="value"){let i=e.filter(e=>e[r]>=t);i=i.filter(e=>e[r]<=n);const o=e.filter(e=>e[r]<t),a=e.filter(e=>e[r]>n);return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function Ma(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function Ea(e,t){return e>9?t[1]:t[0]}function xa({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:m,majorAxis:d,minorAxis:p,minorDimension:h,dock:f}=s,g=i[h],y=Oo.createOob({oob:Oo.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:m,symbol:o});y.dock=f;const v=`c${d}`,S=`c${p}`,M={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:f};M[S]=g/2,M[v]=a;const E={type:"text",text:u>9?"9+":u,title:ca({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:f};return E[p]=g/2,E[d]=a,[y,M,E]}const ba=e=>{const t=oa({labelStyle:e}),n=No.getFontHeight(t)*(e.lineHeightMultiplicator||1),r=e.gap||12,i=e.maxWidth||75,o=e.padding.top||0,a=e.padding.bottom||0,s=e.padding.left||0,l=e.padding.right||0;return{...e,font:t,lineHeight:n,gap:r,maxLabelWidth:i,top:o,bottom:a,left:s,right:l}},Ca=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 Aa={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=Ca(this.settings.labels),s=ga(this.chart,this.settings.formatter,e);fa.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=va(t,n);return Sa(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return Sa(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let m;if(this.measureText=(e,n)=>{const{fontSize:r,fontFamily:i,fontWeight:o}=n||{};return this.renderer.measureText({text:e,fontWeight:o||t.label.fontWeight,fontSize:r||t.label.fontSize,fontFamily:i||t.label.fontFamily})},u&&u.length){const e=ba(t.label),{dock:n}=this.settings.layout;return fa.measureLabelsWidth(u,this.measureText),m=ya(n,u,e),m}const d=Ma(this.measureText),p=l?Ea(l,d):0,h=c?Ea(c,d):0;return m=Math.max(p,h),m},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,c=Ca(this.settings.labels),{dock:u,rtl:m}=this.settings.layout,{padding:d}=n.label,p=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),h=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,p,d),{orientation:f,majorDimension:g}=p,{majorSize:y}=h,v=ba(n.label),{font:S,lineHeight:M,gap:E,maxLabelWidth:x}=v,b=ga(this.chart,this.settings.formatter,e),C=y;fa.addLabelTitles({labels:c,formatter:b,isContinuous:o,canBeContinuous:l,localeInfo:s}),fa.calculateLabelPositions({labels:c,scale:e,size:C,layoutService:r,orientation:f,rtl:m,isContinuous:o,isDimension:a});const[A,N]=va(e,o),{filteredLabels:O,lowerOobs:T,upperOobs:L,lowerCircleSize:R,upperCircleSize:I,lowerOobSpace:k,upperOobSpace:w}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:m,filteredLabels:d}=Sa(e,t,n,c),p="scaledValue"!==c&&ia.getInvert({orientation:r,rtl:i,isContinuous:o}),h=function(e,t,n){return n?t:e}(m,u,p),f=function(e,t,n){return n?e:t}(m,u,p),g=h.length,y=f.length,v=Ma(l),S=Ea(g,v),M=Ea(y,v),E=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(g,a.oob.size,S,r,s),x=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(y,a.oob.size,M,r,s);return{filteredLabels:d,lowerOobs:h,upperOobs:f,lowerCircleSize:S,upperCircleSize:M,lowerOobSpace:E,upperOobSpace:x}}({labels:c,minValue:A,maxValue:N,orientation:f,rtl:m,isContinuous:o,style:n,padding:d,measureText:this.measureText,prop:o?"value":"scaledValue"}),D=k,q=y-w;ua(T),ua(L);const P=xa({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+R/2,areaProps:p,radius:R/2,font:S}),z=xa({alignment:1,dockValue:1,oobs:L,style:n.oob,rect:this.rect,symbol:t,position:y-(n.oob.size+I/2),areaProps:p,radius:I/2,font:S});fa.addLabelsInfo({labels:O,scale:e,majorSize:y,lowerLimit:D,upperLimit:q,labelStyle:v,lineHeight:M,gap:E,maxLabelWidth:x,majorDimension:g,orientation:f,measureText:this.measureText,rtl:m,layoutService:r,isContinuous:o,isDimension:a}),Uo.layout(O.map(e=>e.segment),D,q,n.label.gap);const $=O.filter(e=>Uo.isInside(e.segment,D,q,o));return fa.createLabels({labels:$,style:n.label,maxLabelWidth:x,areaProps:p,area:h,lineHeight:M,font:S,theme:i}).concat([...P,...z])}};var Na={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo","plugins[].validMeasureValue","plugins[].labelBackgroundColor","plugins[].labelColor","plugins[].hasBackground","plugins[].maxLabelWidth","plugins[].points[].validMeasureValue","plugins[].points[].labelBackgroundColor","plugins[].points[].labelColor","plugins[].points[].hasBackground","plugins[].points[].maxLabelWidth"]};function Oa(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=re(!0,{},{...n,qHyperCube:{...s}}),{dataRelatedPropertiesPaths:c}=Na;function u(e,t){const n=t.indexOf("[]");if(-1===n)return void(void 0!==b(e,t)&&C(e,t,void 0));const r=t.substring(0,n),i=t.substring(n+2),o=i.startsWith(".")?i.substring(1):i;b(e,r,[]).forEach(e=>{o&&u(e,o)})}return c.forEach(e=>{u(l,e)}),l}var Ta={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){if("line"===i.type)return i.tickValue??"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter(e=>"text"===e.type).map(e=>e.text);return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,m=a.height-s.height;e?("left"===i&&o.forEach(e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)}),"left"!==i&&"right"!==i||o.forEach(e=>{"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","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))}),"top"!==i&&"bottom"!==i||o.forEach(e=>{"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","#"===e.fill?.[0]&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`))})):t?o.forEach(e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)}):n||r?o.forEach(e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)}):o.forEach(e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+m)})}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`})})}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.children&&e.children.length>0&&e.children.forEach(e=>{e.opacity=0})})}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)})},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){return"line"===e.type?e.value??Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach(e=>{e.opacity=0})}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}})}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{"image"===e.type?(e.x-=r,e.y-=i):(e.cx-=r,e.cy-=i)})}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach(e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}})}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Oa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Oa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:La,extractInfoFromInputValue:Ra,resolveValue:Ia}=ia;var ka={resolveValue:Ia,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=La({refLineLayout:e,layoutService:n});return Ra(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=La({refLineLayout:e,layoutService:n});return Ra(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=La({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=La({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const wa=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:m})=>{const d={dir:l,line:{strokeWidth:t?.style?.lineThickness||2,strokeDasharray:t?.style?.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(d.scale=s,d.value=t.refLineExpr.value):(d.valueInfo=ka.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),d.value=()=>{const e=ia.getScaledPosition({scale:a.scale(s),value:ka.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:d.valueInfo,size:a.component(u)?.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:m});return Number.isNaN(e)?void 0:e}),d};function Da({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:m,path:d,minimumLayoutMode:p}){const h=e?t.dimensionRefLines:d?t.query.getRefLines(d):t.measureRefLines;if(!h.length)return!1;const f={key:u,type:"ref-line",layout:{minimumLayoutMode:p},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==i.meta.major.orientation||!c),y=!e||n.meta.isContinuous;return h.forEach(o=>{f.lines[l].push(wa({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:g,component:m,isContinuous:y}))}),f}const qa=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:m,localeInfo:d})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:m,isDimension:e,localeInfo:d,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,fontStyle:r.referenceLine.label.name.fontStyle,fontWeight:r.referenceLine.label.name.fontWeight,textDecoration:r.referenceLine.label.name.textDecoration,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Ta.refLineLabels.trackBy,compensateForLayoutChanges:Ta.refLineLabels.compensateForLayoutChanges}}),Pa=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),{align:l,style:c}=e,{fontSize:u,fontFamily:m,fontStyle:d,fontWeight:p,textDecoration:h}=c||{},f={align:l,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,fontSize:u,fontFamily:m,fontStyle:d,fontWeight:p,textDecoration:h,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(f.background={fill:s}),a?(f.scale=i,f.value=e.refLineExpr.value):(f.value=()=>ka.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueText=()=>ka.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),f.valueInfo=()=>ka.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),f};function za({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:m,key:d,path:p}){const h=e?t.dimensionRefLineLabels:p?t.query.getRefLineLabels(p):t.measureRefLineLabels;if(!h.length)return[];const f=[],g=!e||n.meta.isContinuous,y=h.map(e=>Pa({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g}));return f.push(qa({isDimension:e,rtl:m,style:s,dock:o,key:d,labels:y,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:c,isContinuous:g,localeInfo:u})),f}function $a({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=ge.dimensionless(o),l=ia.getMeasureRefLines(o),c=ia.getDimensionRefLines(o,s),u=ia.getMeasureRefLineLabels(o),m=ia.getDimensionRefLineLabels(o,s);let d={},p={};const h=()=>!(!c||!c.length)&&!c.every(t=>{const o=ia.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return ia.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!p[t])return!1;if(!n&&i){const n={valueInfo:p[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return ia.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)}),f={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:m,dimensionRefLineInfo:p,dimensionValuesInfo:d,query:{getRefLines:e=>ia.getRefLines(o,e),getRefLineLabels:e=>ia.getRefLineLabels(o,e)},update:()=>{p=f.dimensionRefLineInfo,h()&&(d=ia.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),f.dimensionValuesInfo=d,c.forEach(t=>{const n=ia.getInputValue({refLineLayout:t,layoutService:e});d[n]&&(p[n]?(p[n].innerValues=d[n].innerValues,p[n].minOrder=Math.min(p[n].minOrder,d[n].minOrder),p[n].maxOrder=Math.max(p[n].maxOrder,d[n].maxOrder),p[n].isMinOrderOk=p[n].isMinOrderOk||d[n].isMinOrderOk,p[n].isMaxOrderOk=p[n].isMaxOrderOk||d[n].isMaxOrderOk):p[n]={id:d[n].id,qText:d[n].qText,innerValues:d[n].innerValues,minOrder:d[n].minOrder,maxOrder:d[n].maxOrder,isMinOrderOk:d[n].isMinOrderOk,isMaxOrderOk:d[n].isMaxOrderOk},p[n].numInnerValues=(p[n].maxOrder||0)-(p[n].minOrder||0)+1)}))}};return f.update(),f}function _a(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Fa({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=A(n);return r.setAlpha(e?.alpha>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}function Ba({point:e,dimensionValueInfo:t,layoutService:n}){const{dimensionValue:r}=e,i=""===e.measureValue?void 0:+e.measureValue;if(_o.isNumber(i))return i;const{dimensionCount:o,measureCount:a}=n.meta;if(2===o)return 0;const s=e.measureIndex?+e.measureIndex:0;return _o.isNumber(s)&&!(s>=a||0===o)&&1===o?t[r]?.dataNode[s+1]?.qNum:void 0}const Va=2,ja=12,Ua={index:-1,color:"#595959"};function Ha({chart:e,chartModel:t,discreteModel:n,colorService:r,themeService:i,layoutService:o,dockService:a,rtl:s,majorScale:l,minorScale:c,mainComponentKey:u,data:m,key:d}){if(!Array.isArray(m)||0===m.length)return!1;const p={resolveUIColor:r.getMain().getPaletteColor},h=i.getTheme(),f="horizontal"===a.meta.major.orientation,g=!(!f||!s),{canBeContinuous:y,isContinuous:v,isButterfly:S}=o.meta,M=o.getLayout(),E=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=A(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const r=n?.bgColor?.color;return Fa({color:r,colorModel:t})}({layout:M,colorModel:p})??h.getStyle("object","","backgroundColor"),x=ia.getDimensionValuesInfo({layout:M,canBeContinuous:y,discreteModel:n,layoutService:o}),b=v?m:m.filter(e=>!!x[e.dimensionValue]),C={};b.map(e=>e.dimensionValue).forEach(e=>{x[e]&&(C[e]?(C[e].innerValues=x[e].innerValues,C[e].minOrder=Math.min(C[e].minOrder,x[e].minOrder),C[e].maxOrder=Math.max(C[e].maxOrder,x[e].maxOrder),C[e].isMinOrderOk=C[e].isMinOrderOk||x[e].isMinOrderOk,C[e].isMaxOrderOk=C[e].isMaxOrderOk||x[e].isMaxOrderOk):C[e]={id:x[e].id,dataNode:x[e].dataNode,qText:x[e].qText,innerValues:x[e].innerValues,minOrder:x[e].minOrder,maxOrder:x[e].maxOrder,isMinOrderOk:x[e].isMinOrderOk,isMaxOrderOk:x[e].isMaxOrderOk},C[e].numInnerValues=(C[e].maxOrder||0)-(C[e].minOrder||0)+1)}),b.forEach(e=>{const t=Ba({point:e,dimensionValueInfo:C,layoutService:o});if(e.validMeasureValue=S&&1===e.measureIndex?-t:t,o?.meta?.isStacked){const t=C[e.dimensionValue]?.dataNode;if(Array.isArray(t)&&void 0!==e.measureIndex){const n=t.slice(0,e.measureIndex+2),r=t[e.measureIndex+1]?.qNum;if("number"==typeof r&&0!==r){const t=Math.sign(r);e.validMeasureValue=n.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}}const n=Fa({colorModel:p,color:e.style?.label?.color||Ua}),r=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=r?n:void 0,e.labelColor=r?i.getTheme().getContrastingColorTo(n):n,e.hasBackground=r,e.maxLabelWidth=100});const N={scale:l,fn:({datum:t})=>{const n=e.scale(l),r=t.value.dimensionValue;if(v)return n("string"==typeof r?""===r?void 0:+r:r);if(void 0===C[r])return;return ia.getScaledPosition({scale:n,value:C[r].id,valueInfo:C[r],size:e.component(u)?.rect[f?"width":"height"],align:"center",invert:g,layoutService:o,isContinuous:v})}},O={scale:c,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:d,type:"point",data:b,settings:{x:f?N:O,y:f?O:N,strokeWidth:({datum:e})=>e.value.style?.outlineWidth??e.value.style?.lineThickness??Va,stroke:({datum:e})=>Fa({colorModel:p,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?Fa({colorModel:p,color:e.value.style?.fill}):E,size:({datum:e})=>`${e.value.style?.dataPointSize??ja}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t.query.animationsEnabled,trackBy:e=>e.data.value.cId,compensateForLayoutChanges:Ta.points.compensateForLayoutChanges}}}const Ya=3,Wa="monotone";const Xa=e=>e?.qHyperCube?.qDimensionInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0,Ka=!0,Ga=!1,Ja={index:0,color:"none"},Za={index:-1,color:"#595959"},Qa={index:-1,color:"#595959"},es=e=>{!e.dimensionValue?.qValueExpression&&e.dimensionValue?.qStringExpression&&(e.dimensionValue.qValueExpression=e.dimensionValue.qStringExpression,delete e.dimensionValue.qStringExpression)},ts=e=>{e.dimensionValue?.qValueExpression&&!e.dimensionValue?.qStringExpression&&(e.dimensionValue.qStringExpression=e.dimensionValue.qValueExpression,delete e.dimensionValue.qValueExpression)},ns=e=>{switch(e.type){case"image":break;case"point":delete e.points,delete e.style?.lineType,delete e.showPoints,delete e.style?.lineCurve;break;case"line":delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.dataPointSize,delete e.style?.fill,delete e.style?.symbol,delete e.style?.label;break;default:delete e.points,delete e.dimensionValue,delete e.measureValue,delete e.measureIndex,delete e.style?.lineType,delete e.style?.lineThickness,delete e.style?.lineColor,delete e.style?.dataPointSize,delete e.style?.fill}},rs=({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===Xa(n.layout),convertFunctions:{get:(e,t,n,r)=>void 0===r.measureValue?1:0,set(e,t,n,r,i){0===e?(i.measureValue=0,delete i.measureIndex):(i.measureIndex=0,delete i.measureValue)}},options:[{value:0,translation: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===Xa(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===Xa(n.layout),invalid:(e,t,n)=>{return e.measureIndex<0||e.measureIndex>=(r=n.layout,r?.qHyperCube?.qMeasureInfo?.filter(e=>7005!==e.qError?.qErrorCode).length||0);var r}}}),is=e=>({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:Ga,showAlpha:Ka,defaultValue:Ja},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:Ga,showAlpha:Ka,defaultValue:Za},labelColor:{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:Ga,showAlpha:Ka,defaultValue:Qa},colorBackground:{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1,show:!0},outlineWidth:{component:"slider",type:"number",expression:"optional",ref:"style.outlineWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:2,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:e?12:10,min:3,max:30,step:1}}),os=({translator:e,pluginOptions:t,supportNewStyles:n=!1})=>{const r={type:"array",ref:"plugins",filter:e=>e.filter(e=>["point","line"].includes(e.type)),translation:"properties.shapes",show:e=>(e?.qHyperCubeDef?.qDimensions||[]).length>0,itemTitleRef:e=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.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=[]),ns(e)},addTranslation:"properties.shapes.addShape",globalChange:(e,t,n)=>{e.plugins&&(e.plugins.forEach(ns),ce.canBeContinuous(n.layout)?e.plugins.forEach(e=>{switch(e.type){case"point":es(e);break;case"line":t=e,t.points?.forEach(es)}var t}):e.plugins.forEach(e=>{switch(e.type){case"point":ts(e);break;case"line":t=e,t.points?.forEach(ts)}var t}))},items:{point:{component:"items",show:e=>"point"===e.type,items:{dataSection:{component:"items",items:rs({translator:e})},styleSection:{component:"items",items:is(n)}}},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)=>e.get("properties.plugins.Points.Point",n+1)+(t.label?.value?`: ${t.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",items:{dataSection:{component:"items",items:rs({translator:e})},styleSection:{component:"items",items:is(n),show:(e,t,n)=>{const r=((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1)if("line"===t[n].type&&t[n].points.includes(e))return t[n];return null})(e,n.properties.plugins);return r?.showPoints}}}}}},styleSection:{component:"items",items:{lineColor:{ref:"style.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:Ga,showAlpha:Ka,defaultValue:Za},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:n?3: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:n?"monotone":"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}},showPoints:{ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}};return r};var as=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,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},ss=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}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 as.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return as.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||as.newInstanceIfNeeded(e,t,this._value)}},ls=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 ss);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 ls;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="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["¬in"]="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[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)))})(),"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 cs={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",PRIMARY_LINE:"stacked-collection-primary-line",SECONDARY_LINE:"stacked-collection-secondary-line",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_PRIMARY_LINE:"reduced-collection-primary-line",REDUCED_SECONDARY_LINE:"reduced-collection-secondary-line",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},us={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const ms={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 ds(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const ps={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise(a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout(()=>{i(s),a({height:20,width:20,imageError:!0})},3e3)})}};async function hs(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+r+i+o}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await ps.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function fs(e,t,n,r){const{app:i,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const m=r.data?.customTooltipAttrExps?.value||[];let d;if(-1!==u&&m[u]&&(d=m[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return hs(s,l,i);if("url"===c)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&e?.getImage&&ds(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await ps.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch{}else{const{height:e,width:t,imageError:n}=await ps.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(i,o,s,l,d);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&d&&d.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(ds(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await ps.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch{}return i}(i,n[u],l,d)}return[]}const gs={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(fs(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},ys={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await gs.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>gs.checkIfPromisesExist({customTooltipModel:e})};const vs=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,r=e?.qHyperCubeDef?.qMeasures,i=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:ms.CHART.CHART_PARENT_TYPE,qId:ms.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},Ss=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:ms.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const Ms={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",r=ms.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:ms.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{const a=i,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Ms.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=ms.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const s=await async function({app:e,properties:t,customTooltipModel:n}){const r=n;r.miniChartToken.sessionObj?.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=ms.CHART.STATE,o=vs(t,i),a=await e.createSessionObject(o),s=Ss(t);if(a.id!==ms.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);r.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===a.id)return r.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:i});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(ms.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await i.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch{await Ms.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(Ms.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ms.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=ms.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function Es(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function xs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=ms.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function bs(e){const t=xs();return e.filter(e=>t[e.id])}const Cs={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach(t=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||i[t.type]){if(t.data?.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach(t=>{n=n.concat(e.findShapes(t).filter(e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]))}));const t=n.filter(e=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.label});t.length>0&&(r=r.concat(t[0]))}}),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=Cs.getAttrExprData(a);o.length||n.length?ys.handlePromises({customTooltipModel:i,nodes:Cs.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then(()=>{t.emit("show",e,n.length?{nodes:n}:void 0)}):t.emit("show",e,n.length?{nodes:n}:void 0)}else i?.miniChartToken?.alternateState&&Ms.hide({app:r.app,customTooltipModel:i}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>ys.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,r=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[r]||(n[r]=[]),n[r]},getAttrExprData(e){let t=[],n="";const r=e.qHyperCube?.qDimensionInfo||[];if(r.length>0){const i=r.length-1;t=e.qHyperCube?.qDimensionInfo?.[i]?.qAttrExprInfo||[],n=`qDimensionInfo/${i}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[ms.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[ms.CUSTOM.QUARANTINE]=[],e.forEach(e=>{r.quarantine[ms.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=r}(bs(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[ms.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[ms.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Es(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===bs(i).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...i,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n=void 0){let r=[];const i=Es(e)||[];[...i,t].forEach(e=>{const t=bs(e.qAttributeExpressions||[]);t.length>0&&(r=t)});const o=xs(),a=i.map(e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter(e=>!o[e.id]),t}),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:e=>e.tooltip?.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:Ne.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Ne.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function As(e,t,n,r){const i=t.qHyperCube?.[n]?.[r]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return a?(i.forEach((e,t)=>{const i=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===i?"NaN":function(e,t){let n;switch(e.id){case ms.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ms.CUSTOM.TITLE:case ms.CUSTOM.DESCRIPTION:case ms.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);o.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const Ns={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>As(t,e,r,n)}}};const Os={getCustomAttrExps(e,t,n){const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(i))return r;return function(e,t,n,r){const i={[ms.CUSTOM.TITLE]:!0,[ms.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=Cs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===ms.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===ms.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),r}(n,i.map(t=>Oe.getMeasure(e,t)),e,r)}};function Ts({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach(e=>{r.push(Os.getCustomAttrExps(n,e,t))}),r}(e,t,n);return r.reduce((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Ls}=ms;function Rs({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u={properties:void 0},m=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Cs,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),d="rtl"===c.direction,p=()=>{const e=!!u.properties?.qHyperCubeDef?.qDimensions.some(e=>e.qCalcCondition?.qCond?.qv);return!(!t.tooltip||t.tooltip.auto||e)};return{setProperties:e=>{u.properties=e},isEnabled:()=>p(),hideBasic:()=>p()&&b(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{const r=Ts({dataset:e,nodes:n,layout:t});return{title:r.customTooltipInfoAttrExpsArr.find(e=>e.id===Ls.TITLE)?.title,description:r.customTooltipInfoAttrExpsArr.find(e=>e.id===Ls.DESCRIPTION)?.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>Cs.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>Cs.getImageRow(e,{h:t,rtl:d}),addImages:({nodes:r})=>{const i=Cs.getDataNodes(o,r),{attrExps:a}=Cs.getAttrExprData(t);return ys.handlePromises({customTooltipModel:m,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>!!(p()&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof r?.getEffectiveProperties),hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>Ms.createContainer({layout:t,ctx:{h:e,rtl:d}}),createLimitationRow:()=>Cs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),d),show:({nodes:e,properties:t})=>Ms.show({app:n,properties:t,selectedNodes:e,customTooltipModel:m,rtl:d}),hasAlternateState:()=>!!m.miniChartToken?.alternateState,hide:()=>Ms.hide({app:n,customTooltipModel:m}),destroy:()=>Ms.destroyVisualization({customTooltipModel:m})}}}function Is({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter(e=>e.type===us.TYPE.BAR),c=n.meta.isContinuous?s:a,u=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map(({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,reduceLabel:"none"},null:{fields:l.map(e=>({field:e.ref})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:Ns.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 ks({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1,isLineSeries:s=!1}){if(t.length||a){const{major:a,majorNumeric:l}=r.main,{isContinuous:c,isLineStacked:u}=o.meta,m=e=>"NaN"!==e.qNum?e.qNum:0,d=c?l:a,p=o.getLayoutValue("separateStacking",!0),h=[{key:e,data:{extract:t.map(({ref:e,refIndex:t,typeIndex:r,options:s},l)=>({source:n,field:a,value:c?e=>e.qNum:void 0,props:{major:{field:d},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?m:void 0,reduceLabel:"none"},start:0,line:l,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:Ns.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}}))}}];return s&&u&&(h[0].data.stack={stackKey:e=>e.value,value:e=>e.end.value,offset:p?"diverging":"none"},t.forEach((e,t)=>{const{props:n}=h[0].data.extract[t];n.point={field:n.end.field,label:n.end.label},n.end.value&&(n.point.value=n.end.value)})),h}return[]}function ws({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter(e=>e.type===us.TYPE.BAR),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map(e=>({field:e.ref})),value:e=>Array.isArray(e)&&e.every(e=>"NaN"===e),reduceLabel:"none"},sumOfPositives:{fields:a.map(e=>({field:e.ref})),value:e=>e.reduce((e,t)=>t>0?e+t:e,0),reduceLabel:"none"},sumOfNegatives:{fields:a.map(e=>({field:e.ref})),value:e=>e.reduce((e,t)=>t<0?e+t:e,0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const Ds={MINI_CHART:{value:"miniChart"},BAR:{value:"bar"},NONE:{value:"none"}};var qs={OPTIONS:Ds,DEFAULT:Ds.MINI_CHART};function Ps({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,m=a.qArea.qHeight/s*c;if(m<o){const e=(o-m)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+m+e-c)),m=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:m}:{top:u,left:0,height:m}}})}}function zs({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const $s=e=>({miniChart:e===qs.OPTIONS.MINI_CHART.value,bar:e===qs.OPTIONS.BAR.value,none:e===qs.OPTIONS.NONE.value}),_s=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return $s(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return $s(qs.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return $s(!n&&(r||!r&&i)?qs.OPTIONS.NONE.value:qs.OPTIONS.MINI_CHART.value)};function Fs({layoutService:e,override:t}){const n=_s({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===qs.OPTIONS.MINI_CHART.value,n.bar=t.value===qs.OPTIONS.BAR.value,n.none=t.value===qs.OPTIONS.NONE.value),n}function Bs({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),m=t.component(e),d="horizontal"===o.meta.major.orientation,p=d?l-u.left-m.rect.computedInner.x:c-u.top-m.rect.computedInner.y,h=d?m.rect.computedInner.width:m.rect.computedInner.height,f=d&&a?h-p:p,g=Math.max(0,Math.min(f/h,1)),[y,v]=zs({layoutService:i,viewState:n,viewCache:r}),S=g<y,M=g>v,E=!S&&!M;return{pixel:f,relative:g,thumb:E?f-y*h:0,beforeThumb:S,afterThumb:M,onThumb:E}}}function Vs({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[m,d]=zs({layoutService:i,viewState:n,viewCache:r});return{size:u,thumbSize:(d-m)*u}}}function js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Bs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Vs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Us="data-scrollbar-handle";function Hs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Us)||""}const Ys="scrollbarResize",Ws=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function Xs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Bs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Ys}`,options:{event:Ys,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Ys]=this[Ys]||{},Ws(t)&&Hs({e:t})&&(this[Ys].panningEvent=t.srcEvent),!!this[Ys].panningEvent))}},events:{[`${Ys}start`](n){n.preventDefault(),this[Ys]=this[Ys]||{},this[Ys].panningEvent&&t.component(e).emit("dragStart",this[Ys].panningEvent)},[`${Ys}move`](n){if(n.preventDefault(),this[Ys]=this[Ys]||{},!this[Ys].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),c=i.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,m=Hs({e:this[Ys].panningEvent});let d="start"===m?Math.min(u,o.max):o.min,p="end"===m?Math.max(u,o.min):o.max;d===p&&(d-="start"===m?c:0,p+="end"===m?c:0),r.set("zoom",{min:d,max:p}),t.component(e).emit("render")},[`${Ys}end`](n){n.preventDefault(),this[Ys]=this[Ys]||{},delete this[Ys].panningEvent,t.component(e).emit("dragEnd")},[`${Ys}cancel`](n){n.preventDefault(),this[Ys]=this[Ys]||{},delete this[Ys].panningEvent,t.component(e).emit("dragEnd")}}}}const Ks="scrollbarPan";function Gs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const c=Bs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),u=Vs({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Ks}`,options:{event:Ks,threshold:0,enable(r,i){return this[Ks]=this[Ks]||{},!(i&&!this[Ks].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e))}},events:{[`${Ks}start`](n){n.preventDefault();const a=c(n);if(this[Ks]=this[Ks]||{},this[Ks].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Ks].relative=a.relative,this[Ks].zoom=r.get("zoom"),this[Ks].zoom.span=this[Ks].zoom.max-this[Ks].zoom.min,this[Ks].zoom.fullSpan=o-n}else if(a.onThumb)this[Ks].offset=a.thumb;else{const e=u();this[Ks].offset=a.beforeThumb?0:e.thumbSize}},[`${Ks}move`](n){n.preventDefault();const a=c(n);if(this[Ks]=this[Ks]||{},o.meta.isContinuous){const e=a.relative-this[Ks].relative,{fullSpan:t,span:n,min:o,max:s}=this[Ks].zoom,l=i.get("continuousMin"),c=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Ks].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Ks}end`](n){n.preventDefault(),this[Ks]=this[Ks]||{},this[Ks].isPanning=!1,t.component(e).emit("unlockState")},[`${Ks}cancel`](n){n.preventDefault(),this[Ks]=this[Ks]||{},this[Ks].isPanning=!1,t.component(e).emit("unlockState")}}}}function Js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),Xs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),Gs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Zs({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const Qs={background:"rgba(0, 0, 0, 0.1)"},el={top:-1,bottom:-1,width:6},tl={width:2,background:"#595959"};var nl={before:Qs,after:Qs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:el,endHandle:el,startHandleBorder:tl,endHandleBorder:tl};const rl={background:"rgba(0, 0, 0, 0.1)"},il={top:-1,bottom:-1,width:6},ol={width:2,background:"#595959"};var al={before:rl,after:rl,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:il,endHandle:il,startHandleBorder:ol,endHandleBorder:ol};const sl={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},ll={pointerEvents:"initial"},cl={pointerEvents:"none"};const ul="ew-resize",ml="default";function dl(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function pl(){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?ul:ml}function hl(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function fl(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function gl(){const{size:e,start:t,end:n}=dl.call(this);this.renderer.render(this.elements(this.h,hl.call(this,e,t,n)))}function yl(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?al:nl;return{container:{...sl},before:{...sl,...n.before,...t.before},after:{...sl,...n.after,...t.after},thumb:{...sl,...n.thumb,...t.thumb},startHandle:{...sl,...ll,...n.startHandle},endHandle:{...sl,...ll,...n.endHandle},startHandleBorder:{...sl,...cl,...n.startHandleBorder},endHandleBorder:{...sl,...cl,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var vl={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(){gl.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||!fl.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Hs({e:e});t&&(this.state.hover[t]=!0),pl.call(this),gl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),pl.call(this),gl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Hs({e:e});t&&(this.state.drag[t]=!0),pl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),pl.call(this),gl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=dl.call(this);return this.elements(e,hl.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map(t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min}));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const m={[i.end]:t-n},d={[i.start]:r},p={left:-3},h={left:1},f={right:-3,left:"auto"},g={left:3},y=e("div",{style:{...s.before,...c?d:m},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...c?m:d},class:"scrollbar--after"}),S=[];if(l){const t=e("div",{style:{...s.startHandle,...c?f:p},class:"scrollbar--start-handle",[Us]:"start"},o?e("div",{style:{...s.startHandleBorder,...c?g:h}}):void 0);S.push(t);const n=e("div",{style:{...s.endHandle,...c?p:f},class:"scrollbar--end-handle",[Us]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?h:g}}):void 0);S.push(n)}const M=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},S);return e("div",{style:{...s.container}},[y,M,v,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:yl.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function Sl({layoutService:e}){return e.meta.isContinuous&&Fs({layoutService:e}).miniChart}function Ml({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(us.TYPE.LINE),l=s.filter(e=>e.isPrimary),c=s.filter(e=>!e.isPrimary),u=[...ks({forceCreate:!0,key:cs.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...ks({key:cs.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...ks({key:cs.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...ks({key:cs.COLLECTION.PRIMARY_LINE,series:l,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0}),...ks({key:cs.COLLECTION.SECONDARY_LINE,series:c,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0}),...Is({key:cs.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...Is({key:cs.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...ws({key:cs.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...ws({key:cs.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return Sl(e)&&(u.push(...ks({key:cs.COLLECTION.REDUCED,source:cs.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),u.push(...ks({key:cs.COLLECTION.REDUCED_PRIMARY_LINE,source:cs.DATA.REDUCED,series:l,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0})),u.push(...ks({key:cs.COLLECTION.REDUCED_SECONDARY_LINE,source:cs.DATA.REDUCED,series:c,fieldModel:n,colorService:i,layoutService:t,isLineSeries:!0})),u.push(...ks({key:cs.COLLECTION.REDUCED_PRIMARY,source:cs.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),u.push(...ks({key:cs.COLLECTION.REDUCED_SECONDARY,source:cs.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),u.push(...Is({key:cs.COLLECTION.REDUCED_STACKED_PRIMARY,source:cs.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter(e=>e.type===us.TYPE.BAR),colorService:i})),u.push(...Is({key:cs.COLLECTION.REDUCED_STACKED_SECONDARY,source:cs.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter(e=>e.type===us.TYPE.BAR),colorService:i}))),u}const El=({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 xl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const bl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:El({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:xl({models:e})}},Cl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:El({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:xl({models:e})}};function Al({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function Nl({viewCache:e,mainMajor:t}){return re(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function Ol({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map(e=>e.qName);return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Tl({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,m=l.getStyles(),d={type:"time",data:{field:u},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:u,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>c({text:e,fontFamily:m.axis.label.name.fontFamily,fontSize:m.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:Ol({viewState:t,viewCache:n,layoutService:o})};return{[cs.SCALE.MAJOR]:re(!0,{},d,{ticks:{level:"outer"}}),[cs.SCALE.MAJOR_INNER]:re(!0,{},d,{ticks:{level:"inner"}})}}function Ll({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Tl({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[cs.SCALE.MAJOR]:Al({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[cs.SCALE.MAJOR]:Cl({models:t,environment:i})}:{[cs.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?Cl({models:t,environment:i}):bl({models:t,environment:i})};return Sl(t)?{...a,[cs.SCALE.REDUCED]:Nl({viewCache:r,mainMajor:a[cs.SCALE.MAJOR]})}:a}function Rl({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function Il({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!Sl({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}var kl={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 wl=["all","labels"];function Dl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:i,styleModel:o,animationsModel:a}=e,s=t.getLayoutValue("measureAxes");if(!s||!s.length)return[];const l=i.getStyles(),c=o.query.axis.label.getStyle(),{measureAxes:u}=r.meta;return u.filter(e=>{const t=e.isPrimary?0:1;return wl.some(e=>s[t].show===e)}).map(e=>({type:"axis",key:e.isPrimary?cs.COMPONENT.AXIS.MINOR.PRIMARY:cs.COMPONENT.AXIS.MINOR.SECONDARY,renderer:_a(),scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:kl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},line:{stroke:l.axis.line.major.color},ticks:{stroke:l.axis.line.major.color},minorTicks:{stroke:l.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:Ta.axes.trackBy({isMeasure:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isMeasure:!0,dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock})}}))}var ql={INACTIVE:.5},Pl={LOWER:3,UPPER:13};const zl=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return xe.getAdjustedMaxGlyphCount(t,r,0,"qText")};function $l({models:e,environment:t}){const{layoutService:n,dockService:r,styleModel:i,themeService:o,animationsModel:a}=e,s="rtl"===t.options.direction,l=n.getLayoutValue("dimensionAxis"),c=i.query.axis.label.getStyle(),u=zl({layoutService:n}),{orientation:m}=r.meta.major,d="horizontal"===m,p=d?l.label:"auto",h=o.getStyles(),{auto:f,spacing:g}=n.getLayoutValue("gridLine",{});return{type:"axis",key:cs.COMPONENT.AXIS.MAJOR,renderer:_a(),scale:cs.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:kl.AXIS.MAJOR[m.toUpperCase()]},settings:{labels:{mode:l.label,tiltAngle:s?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===p?void 0:r.meta.minor.size/4,maxGlyphCount:u,tiltThreshold:u>Pl.LOWER&&u<Pl.UPPER?1:void 0,fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},line:{show:!f&&0===g,stroke:h.axis.line.major.color},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:ql.INACTIVE}}}]},animations:{enabled:a.enabled,trackBy:Ta.axes.trackBy({isMajor:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isHorizontal:d})}}}function _l({models:e}){const{dockService:t,styleModel:n,themeService:r,layoutService:i,animationsModel:o}=e,{orientation:a}=t.meta.major,s=n.query.axis.label.getStyle(),l=r.getStyles(),{auto:c,spacing:u}=i.getLayoutValue("gridLine",{});return{type:"axis",key:cs.COMPONENT.AXIS.MAJOR_CONTINUOUS,renderer:_a(),scale:cs.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:kl.AXIS.MAJOR[a.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:s.fontFamily,fontSize:s.fontSize,fill:s.fill},line:{show:!c&&0===u,stroke:l.axis.line.major.color}},animations:{enabled:o.enabled,trackBy:Ta.axes.trackBy({isContinuous:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isContinuous:!0})}}}function Fl({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:i}=r;return"none"===i||"title"===i?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:i,layoutService:o,animationsModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=n.meta.major,c="bottom"===n.meta.major.dock?0:1,u=r.getStyles(),m=i.query.axis.label.getStyle(),d=s?1:0,{auto:p,spacing:h}=o.getLayoutValue("gridLine",{}),f={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:kl.AXIS.MAJOR[l]},preferredSize:()=>({size:2*parseFloat(m.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:s?"end":"start",label:{align:c,justify:d},guideLine:{major:{justify:d},minor:{align:c}},line:{show:!1}},style:{label:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},majorGuideLine:{stroke:u.axis.line.major.color},minorGuideLine:{stroke:u.axis.line.minor.color}},animations:{enabled:a.enabled,trackBy:Ta.axes.trackBy({isTime:!0}),compensateForLayoutChanges:Ta.axes.compensateForLayoutChanges({isTime:!0})}};return[re(!0,{},f,{key:cs.COMPONENT.AXIS.TIME_INNER,scale:cs.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}},line:{show:!p&&0===h}},style:{majorGuideLine:{stroke:u.axis.line.minor.color},minorGuideLine:{stroke:u.axis.line.major.color},line:{stroke:u.axis.line.major.color}}}),re(!0,{},f,{key:cs.COMPONENT.AXIS.TIME_OUTER,scale:cs.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[_l({models:e})]:[$l({models:e,environment:t})]}const Bl=({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,Vl=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function jl({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=>!0===e.data?.null?.value?0:1,...t},inactive:{opacity:e=>!0===e.data?.null?.value?0:ql.INACTIVE,...n}}}]}}function Ul(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Hl=(e,t)=>`${e}-${t.id}`,Yl=4,Wl=12,Xl=4;function Kl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${Xl}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(cs.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Yl,Math.min(Wl,l));o.size=`${"bar"===i?2*c:c}px`}return o.size}}const Gl=({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:Jl}=Nt;const Zl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,animationsModel:u}=t,m=a.getColor(),{fill:d,marker:p}=n.options,{isContinuous:h}=i.meta,f="rtl"===r.options.direction,{orientation:g}=s.meta.major,y="horizontal"===g,v=(n.isPrimary?l:c).query.getExtrema(),S=({end:e})=>{const{value:t}=e;return Ul(t,v)},M=Hl(cs.COMPONENT.MARKER,n);return{type:"point",key:M,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:cs.SCALE.MAJOR,fn:Vl({layoutService:i,seriesModel:o,rtl:f,orientation:g}),ref:h?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return r=n,Math.min(Math.max(0,r),1);var r}},fill:d||"bar"===p?m:"none",opacity:e=>!0===e.datum.null?.value||S(e.datum)?0:1,stroke:e=>{const t=m(e);return d?Jl(t)?Ge(t).brighter(.5).toString():function(e){return Ge(e).darker().toString()}(t):t},size:Kl({chart:e,layoutService:i,dockService:s,markerKey:M,markerType:p}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:p,horizontal:y,rtl:f})},brush:jl({layoutService:i,active:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||S(e.data)?0:ql.INACTIVE}}),animations:{enabled:u.enabled,isMainComponent:Gl({series:n}),trackBy:Ta.markers.trackBy,compensateForLayoutChanges:Ta.markers.compensateForLayoutChanges}}};function Ql({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(cs.SCALE.MAJOR),c=s(cs.SCALE.COLOR),u=t&&i?[...a.points].reverse():a.points,m=u.reduce((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=u[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t},[]),d="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),p=m.map(d),h=Math.min(...p),f=Math.max(...p)-h,g=0===f?1:f,y=p.map((e,t)=>0===t?0:t===p.length-1?1:(e-h)/g),v=[];for(let t=0;t<m.length;t++){const i=m[t],o=i.color&&i.color.value,a=n?o||r:c(o)||r,s=0===t,l=t===m.length-1,u=y[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=m[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-y[t-1])/2).toFixed(5)))}):v.push({color:a,offset:u});const r=m[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(y[t+1]-u)/2).toFixed(5)))}):v.push({color:a,offset:u})}}const S=v.reduce((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e},[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:S}}}function ec({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:c,nil:u}=i.getSettingsForMeasure(n),m="horizontal"===o.meta.major.orientation;if(!l||"constant"===c)return i.getColor();if("measure"===l&&"categorical"===c)return i.getColor();const d=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(d?.on)return"byExpression"===d.mode?Ql({isHorizontal:m,isColor:!0,fallback:u,rtl:a}):i.getColor();const p=r.getLayoutValue("color",{}),h=!p.auto&&"byExpression"===p.mode,f=!!p.colorExpression;if(h&&!f)return u;const g=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex;return s||!g?Ql({isHorizontal:m,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(cs.SCALE.COLOR),a=r.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))}));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:m}}}({isHorizontal:m,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(cs.SCALE.COLOR),l=o.map(e=>e.end.value).filter(e=>"NaN"!==e&&!Number.isNaN(e)),c=Math.min(...l),u=Math.max(...l),m=t?Math.min(0,c):c,d=(t?Math.max(0,u):u)-m,p=0===d?1:d,h=s.domain(),f=[];for(let e=0;e<h.length-1;e++){const t=h[e],r=s(t)||n;f.push({color:r,offset:Math.min(1,Math.max(0,(t-m)/p))});const i=h[e+1];f.push({color:r,offset:Math.min(1,Math.max(0,(i-m)/p))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:f}}}({isHorizontal:m,fallback:u,rtl:a})}const tc=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a,animationsModel:s,colorService:l}=e,c="rtl"===t.options.direction,{orientation:u}=o.meta.major,m=Vl({layoutService:r,seriesModel:i,rtl:c,orientation:u}),{isArea:d,isLineStacked:p}=r.meta,h=r.getLayoutValue("separateStacking",!0),{fieldType:f}=l.getSettings(),g={key:Hl(cs.COMPONENT.LINE,n),type:"line",data:{filter:p?e=>n.ref===e.point.source.field:e=>n.ref===e.end.source.field,collection:n.isPrimary?cs.COLLECTION.PRIMARY_LINE:cs.COLLECTION.SECONDARY_LINE},settings:{coordinates:{major:{scale:cs.SCALE.MAJOR,fn:m},minor:{scale:n.scale,ref:"end",fn:e=>{if(p&&h){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}return e.scale(e.datum.end.value)}}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:ec({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round",showMinor0:!1}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:jl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:ql.INACTIVE},inactive:{opacity:ql.INACTIVE}}),animations:{enabled:s.enabled,isMainComponent:!!Gl({series:n})&&{filterFn:e=>e.commonPoints.length>0},trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}};return p&&(g.settings.coordinates.minor0={scale:n.scale,fn:e=>{if(h){const t=e.datum.point.value<0?e.datum.end.value:e.datum.start.value;return e.scale(t)}return e.scale(e.datum.start.value)}}),d&&(g.settings.layers.area={fill:ec({models:e,environment:t,measureIndex:n.refIndex}),opacity:"measure"===f||"expression"===f?.6:.3},g.brush.consume.push({context:"selection",data:["selectionDimension","end","color","major"],filter:e=>(e=>void 0===e.strokeLinejoin)(e),style:{active:{opacity:.15},inactive:{opacity:.15}}})),g};var nc={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone"},WIDTH:{FULL:{DEFAULT:2},LESS:{DEFAULT:1},DEFAULT:3},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4,NEW_DEFAULT:8}}};function rc({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some(e=>!r({item:e})):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some(e=>!r({item:e})):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const ic=3,oc=20;function ac({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u,animationsModel:m}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:p}=a.meta.major,h="horizontal"===p,f="SPARK"===a.meta.chart.mode,g=i.getColor(),{POINT:y}=nc,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=rc({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:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:c}=r({index:s,items:o.items});return!l&&!c}}({series:t,layoutService:r}),S="rtl"===n.options.direction,M=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:E,isLineStacked:x}=r.meta,b=r.getLayoutValue("separateStacking",!0),C=({end:e})=>{const{value:t}=e;return Ul(t,M)};return{type:"point",key:Hl(cs.COMPONENT.POINT,t),data:{filter:x?void 0:e=>t.ref===e.end.source.field,collection:t.isPrimary?cs.COLLECTION.PRIMARY_LINE:cs.COLLECTION.SECONDARY_LINE},preferredSize:()=>({edgeBleed:{top:h?y.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{if(x&&b){const t=e.datum.point.value<0?e.datum.start.value:e.datum.end.value;return e.scale(t)}const t=!0===e.datum.null?.value?e.scale.min():e.datum.end.value,n=e.scale(t);return r=n,Math.min(Math.max(0,r),1);var r}},[h?"x":"y"]:{scale:cs.SCALE.MAJOR,fn:Vl({layoutService:r,seriesModel:o,rtl:S,orientation:p}),ref:"major"},sizeLimits:{minPx:ic,maxPx:oc},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:g,opacity:({datum:e,data:t})=>e.null?.value||C(e)?0:f?v({item:e,items:t.items})?1:0:d||v({item:e,items:t.items})?1:0},brush:jl({layoutService:r,active:{r:e=>e.r+nc.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{if(!0===e.data.null?.value||C(e.data))return 0;if(!E||d)return 1;const{event:t,components:n=[]}=u?.getSelectionInfo()||{};if("continuousRange"===t)return 0;if("tap"!==t)return 1;return[cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some(e=>n.indexOf(e)>=0)?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}}),animations:{enabled:m.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.points.compensateForLayoutChanges}}}const sc=(e,{dataset:t},n=!1)=>{const{value:r,label:i,source:o}=n?e.segment:e.end,a=t(o.key).field(o.field);return de.shouldUseFormat(a.raw())?a.formatter()(r):i};function lc({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,styleModel:a,primaryExtremumModel:s,secondaryExtremumModel:l,animationsModel:c}=t,u="rtl"===n.options.direction,m=i.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;if(!r.length)return!1;const d=i.meta.isLineStacked?t=>((e,{dataset:t})=>{const{value:n,label:r,source:i}=e.point,o=t(i.key).field(i.field);return de.shouldUseFormat(o.raw())?o.formatter()(n):r})(t,e):t=>sc(t,e),p=a.query.point.label.getStyle();return{type:"point-label",key:cs.COMPONENT.POINT_LABEL,renderer:_a(),layout:{displayOrder:2,minimumLayoutMode:kl.VALUE_LABEL},settings:{orientation:o.meta.major.orientation,rtl:u,label:d,pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map(e=>({key:`${cs.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?s:l).query.getExtrema();return!Ul(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(cs.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,fill:p.fill},animations:{enabled:c.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}}const cc=({chart:e,models:t,environment:n,markerSeries:r})=>{const{layoutService:i,dockService:o,styleModel:a,primaryExtremumModel:s,secondaryExtremumModel:l,animationsModel:c}=t,u="rtl"===n.options.direction,m=a.query.marker.label.getStyle(),d=i.getLayoutValue("dataPoint");return!!d?.showMarkerLabels&&(!!r.length&&{type:"point-label",key:cs.COMPONENT.MARKER_LABEL,renderer:_a(),layout:{displayOrder:2,minimumLayoutMode:kl.VALUE_LABEL},settings:{orientation:o.meta.major.orientation,rtl:u,label:t=>sc(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,lineId:e=>e.data.typeIndex.value,configs:r.map(e=>({key:`${cs.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?s:l).query.getExtrema();return!Ul(e.data.end.value,n)},labelSpace:{use:()=>{const t=e.component(cs.COMPONENT.LABEL_SPACE);return!!t?.preferredSize()},size:10}},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,fill:m.fill},animations:{enabled:c.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}})};var uc="max",mc="min";const dc=({chart:e,dock:t})=>{let n=t;const r=e.component(`${cs.COMPONENT.SLICED_HAT}-${uc}`),i=e.component(`${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.PRIMARY}`),o=e.component(`${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.SECONDARY}`);return r?n=`@${cs.COMPONENT.SLICED_HAT}-${uc}`:i?n=`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.PRIMARY}`:o&&(n=`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.SECONDARY}`),n},pc=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${cs.COMPONENT.SLICED_HAT}-${uc}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.PRIMARY}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${uc}-${us.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${cs.COMPONENT.SLICED_HAT}-${mc}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${mc}-${us.AXIS.PRIMARY}`&&e!==`@${cs.COMPONENT.SLICED_HAT}-${mc}-${us.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function hc({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===o.meta.major.orientation,{show:m}=i.getLayoutValue("dimensionAxis",{});if("none"!==m){const{dock:e}=o.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const d=c?"left":"right";return{type:"label-space",key:cs.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:kl.LABEL_SPACE,dock:dc({chart:e,dock:u?"top":d})},settings:{size:10},preferredSize:()=>{const t=e.component(`${cs.COMPONENT.LINE}-${r[0].id}`);if(!t?.rect)return 0;const n=(u?17:34)/t.rect[u?"height":"width"],i=a.query.getExtrema(),o=e.scale(cs.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=u||c?o:1-o,m=r.filter(e=>e.isPrimary).length>0,d=s.query.getExtrema(),p=e.scale(cs.SCALE.MINOR.SECONDARY)(d.implicit.line.max),h=u||c?p:1-p,f=r.filter(e=>!e.isPrimary).length>0;return m&&l<n||f&&h<n?10:0}}}const fc={min:"Min",max:"Max"};function gc(e,t,n){return function(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}(e,t,n)||function(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}(e,t,n)}function yc(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function vc(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function Sc(e,t){return yc(e,t)||vc(e,t)}function Mc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${fc[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===uc?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===uc?!yc(r,e):!vc(r,e)}({extrema:e,type:t}))}var Ec=Object.freeze({__proto__:null,isMaxOutOfBounds:yc,isMinOutOfBounds:vc,isOutOfBounds:Sc,isSegmentOutOfBounds:gc,shouldShowOob:Mc});const xc={min:"Min",max:"Max"},bc=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:m,layoutService:d,seriesModel:p,themeService:h,fieldModel:f,animationsModel:g}=t,y="rtl"===o.options.direction,{dock:v,opposite:S,orientation:M}=s.meta.major,E=l.query.getExtrema(),x=c.query.getExtrema(),b=a===uc,{isBarSeriesGrouped:C,isLineStacked:A}=d.meta,N=d.getLayoutValue("separateStacking",!0),O=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===uc?n:r;const o=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),s=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`),l=e.component(cs.COMPONENT.LABEL_SPACE),c=e.component(`${cs.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`),m=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.SECONDARY}`);return o?i=`@${cs.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`:s?i=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`:c||u||m?l&&t===uc?i=`@${cs.COMPONENT.LABEL_SPACE}`:c?i=`@${cs.COMPONENT.BAR_OOB}-${t}`:u?i=`@${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`:m&&(i=`@${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.SECONDARY}`):l&&t===uc&&(i=`@${cs.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:S,dock:v}),T=Vl({layoutService:d,seriesModel:p,rtl:y,orientation:M}),L=r?.length>0&&A,R=r.concat(n);if(!R.length)return!1;const I=b?E.implicit.bar.max:E.implicit.bar.min,k=Number(I.toFixed(13));if(!C&&i.length&&Ec[`is${xc[a]}OutOfBounds`](k,E))return!1;if(!E.meta.hasExplicit&&!x.meta.hasExplicit)return!1;const w=b?"max":"min",D=Math[w](Number(E.implicit.line[w].toFixed(13)),Number(E.implicit.marker[w].toFixed(13))),q=Math[w](Number(x.implicit.line[w].toFixed(13)),Number(x.implicit.marker[w].toFixed(13))),P=R.filter(e=>e.isPrimary),z=R.filter(e=>!e.isPrimary),$=P.length>0,_=z.length>0,{major:F,majorNumeric:B}=f.main,V=e=>"NaN"!==e.qNum?e.qNum:0,j=d.meta.isContinuous?B:F;return{type:"data-out-of-bounds-marker",key:`${cs.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:O,minimumLayoutMode:kl.OUT_OF_BOUNDS_MARKER},data:{extract:[...P.map(({ref:e,typeIndex:t,options:n,type:r})=>({field:F,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:r===us.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"primary"}})),...z.map(({ref:e,typeIndex:t,options:n,type:r})=>({field:F,value:d.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:j},end:{field:e,value:n.showAsZeros?V:void 0},point:{field:e,value:void 0},typeIndex:t,isMarker:r===us.TYPE.MARKER,null:{field:e,value:e=>"NaN"===e.qNum},key:"secondary"}}))],stack:L?{stackKey:e=>e.value,value:e=>e.end.value,offset:N?"diverging":"none",stackByKey:["primary","secondary"]}:void 0},settings:{type:a,primaryExtremum:b?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:b?()=>m.query.getMax():()=>m.query.getMin(),isLineStacked:A,separateStacking:A&&N,primarySeries:P,secondarySeries:z,orientation:M,rtl:y,major:{scale:cs.SCALE.MAJOR,fn:T},markerOffset:pc({dockPosition:O,orientation:M,rtl:y})},brush:jl({layoutService:d}),show:()=>{if(b){if($&&D>u.query.getMax())return!0;if(_&&q>m.query.getMax())return!0}if(!b){if($&&D<u.query.getMin())return!0;if(_&&q<m.query.getMin())return!0}return!1},style:{fill:h.getStyles().outOfRange.color},animations:{enabled:g.enabled,compensateForLayoutChanges:Ta.lineOobs.compensateForLayoutChanges}}},Cc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function Ac({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=N(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${cs.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=Cc[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=Cc[a.meta.chart.mode],c=Math.min(s/i/.2,1),u=2*(1-(m=1-c))+l*m;var m;return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Nc=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Oc(e){return Math.min(Math.max(0,e),1)}const Tc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:m,secondaryExtremumModel:d,animationsModel:p}=t,{isContinuous:h,isBarSeriesStacked:f,isBarSeriesGrouped:g,isBarSeriesStackedInBothAxis:y}=o.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),S=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY,M=i?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const E=f?{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return Oc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return Oc(e.scale(t))}}}:{scale:M,start:{ref:"start",fn:e=>{const t=v(e);return Oc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=!0===e.datum.null?.value?v(e):e.datum.end.value;return Oc(e.scale(t))}}},x=(i?m:d).query.getExtrema(),b=f?({start:e,end:t})=>gc(e.value,t.value,x):({end:e})=>Sc(e.value,x);return{type:"box",key:`${cs.COMPONENT.BAR}-${S}`,data:{filter:(()=>{if(f)return;const e=l.query.series(us.TYPE.BAR).filter(e=>e.isPrimary===i).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:f?i?cs.COLLECTION.STACKED_PRIMARY:cs.COLLECTION.STACKED_SECONDARY:i?cs.COLLECTION.PRIMARY:cs.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:cs.SCALE.MAJOR,fn:Bl({layoutService:o,axis:S}),ref:h?{start:"major",end:"major"}:void 0},minor:E,box:{width:Nc({isContinuous:h,isBarSeriesGrouped:g,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:y}),minWidthPx:h?Ac({chart:e,models:t,viewState:n,viewCache:r,axis:S}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>!0===e.datum?.null?.value||b(e.datum)?0:1},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:jl({layoutService:o,active:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:1},inactive:{opacity:e=>!0===e.data.null?.value||b(e.data)?0:ql.INACTIVE}}),animations:{enabled:p.enabled,isMainComponent:Gl({isPrimary:i,seriesModel:l}),trackBy:Ta.bars.trackBy,compensateForLayoutChanges:Ta.bars.compensateForLayoutChanges}}},Lc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:m,isContinuous:d,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:h}=o.meta,f=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY,g=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!m||0===g)return!1;return{key:`${cs.COMPONENT.STACK_BAR}-${f}`,type:"box",data:{collection:i?cs.COLLECTION.STACKED_TOTAL_PRIMARY:cs.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:cs.SCALE.MAJOR,fn:Bl({layoutService:o,axis:f}),ref:d?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Nc({isContinuous:d,isBarSeriesGrouped:p,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:h}),minWidthPx:d?Ac({chart:e,models:t,viewState:n,viewCache:r,axis:f}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Rc(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,i=e.styleModel.query.bar.label.getStyle();return{placements:t.simplifiedPlacements.map(e=>{const t=i.useContrastColor&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Nt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):i.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:t,isHorizontal:n})}),label:t.label}}function Ic(e,t,n,r){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let o="up";return"vertical"===t&&i<0?o="down":"horizontal"===t&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const kc=(e,t)=>{const{showBarLabels:n,showBarSegmentLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!i||!o&&!!r},wc=(e,t)=>{const{showBarLabels:n,showBarTotalLabels:r}=e;if(!n)return!1;const{isBarSeriesStacked:i,isContinuous:o}=t;return!!i&&(!!o||!1!==r)};function Dc(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}const qc=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:i,styleModel:o,themeService:a,animationsModel:s}=e,{meta:l}=r,{isBarSeriesStacked:c}=l,u="rtl"===t.options.direction,m=a.getStyles(),d=o.query.bar.label.getStyle(),p=e.layoutService.getLayoutValue("dataPoint",{}),h=n?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(!(n?i.meta.primaryBarSeriesCount:i.meta.secondaryBarSeriesCount)||!kc(p,l))return!1;let f;!c&&(f=c?1:0);const g={label:e=>sc(e.data,e,c),simplifiedPlacements:Dc(f,0===f?1:0,c?.5:1,l.isContinuous),style:m.label.value},y=[Rc(e,g)],v=[{component:`${cs.COMPONENT.BAR}-${h}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Ic(t.data.end.value,e.dockService.meta.minor.orientation,u,0),labels:y,fontSize:parseInt(d.fontSize,10),fontFamily:d.fontFamily}}}];return{type:"labels",key:`${cs.COMPONENT.BAR_LABEL}-${h}`,renderer:_a(),layout:{minimumLayoutMode:kl.VALUE_LABEL},settings:{sources:v},animations:{enabled:s.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}};function Pc(e,t,n,r){const i=[{position:e,onBackground:!0,justify:0,overflow:r}];if(t){const t={fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}};i.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:n?t:void 0})}return i}function zc({chart:e,models:t,environment:n,isPrimary:r}){const{meta:i}=t.layoutService,o="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.styleModel.query.bar.label.getStyle(),l=t.layoutService.getLayoutValue("dataPoint",{}),c=r?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!wc(l,i))return!1;const u=!kc(l,i),m=s.useContrastColor,d=e.formatter(r?cs.FORMATTER.PRIMARY:cs.FORMATTER.SECONDARY)||(e=>e),p=e=>d(e),h={label:e=>0===e.data.sumOfPositives.value&&0!==e.data.sumOfNegatives.value?"":p(e.data.sumOfPositives.value),simplifiedPlacements:Pc("outside",u,m,i.isContinuous),style:a.label.value},f={label:e=>0===e.data.sumOfNegatives.value&&0!==e.data.sumOfPositives.value?"":p(e.data.sumOfNegatives.value),simplifiedPlacements:Pc("opposite",u,m,i.isContinuous),style:a.label.value},g=[Rc(t,h),Rc(t,f)];return{type:"labels",key:`${cs.COMPONENT.STACK_BAR_LABEL}-${c}`,renderer:_a(),layout:{displayOrder:2,minimumLayoutMode:kl.VALUE_LABEL},settings:{sources:[{component:`${cs.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Ic(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,o),labels:g,fontSize:parseInt(s.fontSize,10),fontFamily:s.fontFamily}}}]},animations:{enabled:t.animationsModel.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}}var $c=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const _c={min:"Min",max:"Max"};function Fc({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:m}=t,{isBarSeriesStacked:d,isContinuous:p,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:f}=a.meta,g=d?Lc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Tc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),y=o?l.query.getExtrema():c.query.getExtrema(),v=n===uc,S=o?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta[`hasExplicit${_c[t]}`]}(y,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!$c[`has${_c[t]}Hat`](i,e)}(y,n,v)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${_c[t]}`]&&r(e.explicit[t])}(y,n,v))return!1;let M="end";d&&(M=v?"sumOfPositives":"sumOfNegatives");const E=function(e){let t;return()=>(void 0===t&&(t=e()),t)}(()=>e.scale(o?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY)[n]());const x=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),a=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${cs.COMPONENT.SLICED_HAT}-${n}-${S}`,layout:{dock:x},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:re({},g.settings.box,{fill:d?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=E(),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 v?n>t:n<t},width:Nc({isContinuous:p,isBarSeriesGrouped:h,styleModel:u,discreteModel:m,isBarSeriesStackedInBothAxis:f}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:jl({layoutService:a})}}const Bc={min:"Min",max:"Max"},Vc={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function jc({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u,animationsModel:m}=t,{end:d,start:p}=s.meta.minor,{isBarSeriesStacked:h}=a.meta,f=h?Lc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Tc({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),g=o?l.query.getExtrema():c.query.getExtrema(),y=n===uc?g.implicit.bar.max:g.implicit.bar.min,v=Number(y.toFixed(13)),S=o?us.AXIS.PRIMARY:us.AXIS.SECONDARY;if(!f)return!1;if(!Ec[`is${Bc[n]}OutOfBounds`](v,g))return!1;const M=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===uc?n:r;const a=e.component(cs.COMPONENT.LABEL_SPACE),s=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`),l=e.component(`${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`),c=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`),u=e.component(`${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.SECONDARY}`);return s?o=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.PRIMARY}`:l?o=`@${cs.COMPONENT.SLICED_HAT}-${t}-${us.AXIS.SECONDARY}`:c&&u&&!i?o=`@${cs.COMPONENT.BAR_OOB}-${t}-${us.AXIS.PRIMARY}`:a&&t===uc&&(o=`@${cs.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:d,start:p,isPrimary:o});let E="end";h&&(E=n===uc?"sumOfPositives":"sumOfNegatives");const x={type:"box-out-of-bounds",key:`${cs.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:Se.getDockValue(n===uc?d:p),oob:re({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){if(!0===e.datum.null?.value)return!1;const t=h&&0===e.datum[E].value,r=Ec[`is${Bc[n]}OutOfBounds`](e.datum[E].value,g,n),i=(!t||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Vc[n]].value;return 0!==i&&Ec[`is${Bc[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:E,extrema:g}))&&r;return i}})},brush:jl({layoutService:a}),animations:{enabled:m.enabled,compensateForLayoutChanges:Ta.barOobs.compensateForLayoutChanges}};return x}function Uc(e){return Math.min(Math.max(0,e),1)}const Hc=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:m}=s.meta,d=e.scale(r?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY),p=r?us.AXIS.PRIMARY:us.AXIS.SECONDARY,h=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),f=n===uc;if(!Mc({extrema:h,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e);return{type:"box",key:`${cs.COMPONENT.GHOST_BAR_OOB}-${n}-${p}`,data:{filter:(()=>{if(l)return;const e=a.query.series(us.TYPE.BAR).filter(e=>e.isPrimary===r).map(e=>e.ref);return t=>e.some(e=>e===t.end.source.field)})(),collection:l?r?cs.COLLECTION.STACKED_TOTAL_PRIMARY:cs.COLLECTION.STACKED_TOTAL_SECONDARY:r?cs.COLLECTION.PRIMARY:cs.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:cs.SCALE.MAJOR,fn:Bl({layoutService:s,axis:p}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Uc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=y(e,"sumOfPositives");return Uc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=y(e,"sumOfNegatives");return Uc(e.scale(t))}}:{ref:"end",fn:e=>{const t=y(e);return Uc(e.scale(t))}}},box:{width:Nc({isContinuous:c,isBarSeriesGrouped:u,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:m}),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:d.max();return f?n>d.max():n<d.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Yc(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Wc=({chart:e,models:t,type:n,environment:r,isPrimary:i})=>{const{layoutService:o,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,styleModel:c,seriesModel:u,themeService:m,animationsModel:d}=t,p=m.getStyles(),h=c.query.bar.label.getStyle(),{meta:f}=o,{isBarSeriesStacked:g}=f,y=e.formatter(i?cs.FORMATTER.PRIMARY:cs.FORMATTER.SECONDARY),v=o.getLayoutValue("dataPoint",{}),S="horizontal"===a.meta.major.orientation,M="rtl"===r.options.direction;if(!(i?u.meta.primaryBarSeriesCount:u.meta.secondaryBarSeriesCount)||!g&&!kc(v,f)||g&&!wc(v,f))return!1;const E=i?s.query.getExtrema():l.query.getExtrema();if(!E.meta.hasExplicit)return!1;const x=n===uc?E.implicit.bar.max:E.implicit.bar.min;if(!(n===uc?yc(x,E):vc(x,E)))return!1;let b=e=>sc(e.data,e);f.isBarSeriesStacked&&(b=n===uc?function(e){if(!0===e.data.null?.value)return"";if(yc(e.data.sumOfNegatives.value,E)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return y?y(t):t}return""}:function(e){if(!0===e.data.null?.value)return"";if(vc(e.data.sumOfPositives.value,E)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return y?y(t):t}return""});const C={label:b,simplifiedPlacements:Yc("outside",0,f.isContinuous,S,M),style:p.label.value},A={label:b,simplifiedPlacements:Yc("opposite",0,f.isContinuous,S,M),style:p.label.value},N=[Rc(t,C),Rc(t,A)],O=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY,T="horizontal"===a.meta.major.orientation?"down":"right",L=[{component:`${cs.COMPONENT.GHOST_BAR_OOB}-${n}-${O}`,selector:"rect",strategy:{type:"bar",settings:{direction:T,labels:N,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{key:`${cs.COMPONENT.BAR_OOB_LABEL}-${n}-${O}`,type:"labels",renderer:_a(),layout:{minimumLayoutMode:kl.VALUE_LABEL},settings:{sources:L},animations:{enabled:d.enabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}},Xc=({chart:e,models:t,viewState:n,viewCache:r})=>[Tc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Tc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Kc=({chart:e,models:t,viewState:n,viewCache:r})=>[Lc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Lc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Gc=({chart:e,models:t,environment:n,flags:r})=>{const i=zc({chart:e,models:t,environment:n,isPrimary:!0}),o=zc({chart:e,models:t,environment:n,isPrimary:!1});return[qc({models:t,environment:n,isPrimary:!0}),qc({models:t,environment:n,isPrimary:!1}),i,o]},Jc=({chart:e,models:t,viewCache:n,viewState:r})=>[Fc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Fc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Fc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Fc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Zc=({chart:e,models:t,viewCache:n,viewState:r})=>[jc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),jc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),jc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),jc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Qc=({chart:e,models:t})=>[Hc({chart:e,models:t,type:"max",isPrimary:!0}),Hc({chart:e,models:t,type:"min",isPrimary:!0}),Hc({chart:e,models:t,type:"max",isPrimary:!1}),Hc({chart:e,models:t,type:"min",isPrimary:!1})],eu=({chart:e,models:t,environment:n,flags:r})=>[Wc({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),Wc({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),Wc({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),Wc({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],tu=({chart:e,environment:t,models:n,viewState:r,viewCache:i})=>{const{seriesModel:o}=n,a=o.query.series(us.TYPE.BAR).slice(-1),s=o.query.series(us.TYPE.LINE),l=o.query.series(us.TYPE.MARKER);return[...Xc({chart:e,models:n,viewState:r,viewCache:i}),...Kc({chart:e,models:n,viewState:r,viewCache:i}),...s.map(e=>tc({models:n,environment:t,series:e})),...s.map(e=>ac({models:n,series:e,environment:t})),...l.map(r=>Zl({chart:e,models:n,series:r,environment:t})),lc({chart:e,models:n,environment:t,lineSeries:s}),cc({chart:e,models:n,environment:t,markerSeries:l}),...Gc({chart:e,models:n,environment:t}),...Jc({chart:e,models:n,viewCache:i,viewState:r}),...Zc({chart:e,models:n,viewCache:i,viewState:r}),...Qc({chart:e,models:n}),...eu({chart:e,models:n,environment:t}),bc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),bc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),hc({chart:e,models:n,environment:t,lineSeries:s})]},nu={NONE:0,WIDE:1,NARROW:3};function ru({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i,animationsModel:o}=e,{auto:a,spacing:s,axis:l}=r.getLayoutValue("gridLine",{});if(!a&&s===nu.NONE)return!1;const c=i.getStyles(),u=n.meta.primarySeries.length>0;return{key:cs.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:kl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!a&&s===nu.WIDE)||((e,t)=>t%2==0),stroke:c.grid.line.major.color},minorTicks:{show:!a&&s===nu.NARROW,stroke:c.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:0===(l??0)&&u?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,animations:{enabled:o.enabled,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}}}function iu({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o,secondaryExtremumModel:a,secondaryTickModel:s,layoutService:l,animationsModel:c}=e,u=0===(l.getLayoutValue("gridLine",{})?.axis??0),m=t.query.getExtrema(),d=a.query.getExtrema();if(!m.meta.includesZero&&!d.meta.includesZero)return!1;return{key:cs.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:kl.GRID_LINE},show:()=>(()=>{const e=o.meta.primarySeries.length>0,t=o.meta.secondarySeries.length>0;return u&&e&&n.query.getMin()<=0&&n.query.getMax()>=0||!u&&t&&s.query.getMin()<=0&&s.query.getMax()>=0})(),lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:u?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]},animations:{enabled:c.enabled,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}}}function ou({models:e}){const{layoutService:t,themeService:n,animationsModel:r}=e,{isContinuous:i,isTime:o}=t.meta;if(!i)return[];const a=n.getStyles(),s={type:"grid-line",layout:{minimumLayoutMode:kl.GRID_LINE},ticks:{stroke:a.grid.line.major.color},minorTicks:{show:!1,stroke:a.grid.line.minor.color},animations:{enabled:r.enabled,trackBy:Ta.lines.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}};return o?[re(!0,{},s,{key:"time-inner-grid",x:{scale:cs.SCALE.MAJOR_INNER},ticks:{stroke:a.grid.line.minor.color}}),re(!0,{},s,{key:"time-outer-grid",x:{scale:cs.SCALE.MAJOR}})]:[re(!0,{},s,{key:"continuous-grid",x:{scale:cs.SCALE.MAJOR},minorTicks:{show:!0}})]}function au({models:e}){return[ru({models:e}),iu({models:e}),...ou({models:e})]}function su({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,appModel:s,genericObjectModel:l,selectionService:c,styleModel:u}=e,m=o.getLayoutValue("dimensionAxis");if(!m)return!1;const{show:d}=m;if("all"!==d&&"title"!==d)return!1;const p=i.getAlternatives(),{orientation:h}=a.meta.major,f=u.query.axis.title.getStyle();return{type:"axis-title",key:cs.COMPONENT.AXIS_TITLE.MAJOR,renderer:"react-qcm",layout:{dock:a.meta.major.dock,minimumLayoutMode:kl.AXIS_TITLE.MAJOR[h.toUpperCase()]},data:{infos:o.getHyperCubeValue("qDimensionInfo"),alternatives:p.dimensions},resources:{app:s,cache:r,model:l,selections:c.getSelectionsObject(),translator:t.translator},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:f.color,fontFamily:f.fontFamily,fontSize:f.fontSize}}}}const lu=(e,t,n)=>e.query.seriesByAxis(n).map(e=>({...t[e.refIndex],explicitColumn:e.refIndex}));function cu({models:e,environment:t,actions:n,viewCache:r}){const{alternativeService:i,layoutService:o,dockService:a,seriesModel:s,appModel:l,genericObjectModel:c,selectionService:u,styleModel:m}=e,d=o.getLayoutValue("measureAxes");if(!d||!d.length)return[];const p=i.getAlternatives(),h=m.query.axis.title.getStyle(),{measureAxes:f}=s.meta;return f.filter(e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show).map(e=>{const i=o.getHyperCube(),{isPrimary:m}=e;return{type:"axis-title",key:m?cs.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:cs.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,renderer:"react-qcm",layout:{dock:m?a.meta.minor.dock:a.meta.minorSecondary.dock,minimumLayoutMode:kl.AXIS_TITLE.MINOR},data:{infos:lu(s,i.qMeasureInfo,m),alternatives:p.measures},resources:{app:l,cache:r,model:c,selections:u.getSelectionsObject(),translator:t.translator},callbacks:{onChange:({fromItem:e,toItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex(e=>"colorByExpression"===e.id);if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}}},settings:{isDisabled:()=>!n.interact.enabled(),isRTL:"rtl"===t.options.direction,isSnapshot:o.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!0,type:"measure"},style:{title:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}}}})}function uu({models:e,environment:t,actions:n,viewCache:r}){return[su({models:e,environment:t,actions:n,viewCache:r}),...cu({models:e,environment:t,actions:n,viewCache:r})]}function mu({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:m}=o.meta,d="rtl"===t.options.direction;return!(c&&!m)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const m=Fs({layoutService:e,override:l});if(m.none)return!1;const{orientation:d}=t.meta.major,p={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===d?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:d,rtl:s,isContinuous:e.meta.isContinuous,range:()=>zs({layoutService:e,viewState:i,viewCache:o})}};m.bar&&(p.settings.style="slim",p.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(p.settings.size.thumb={min:4}));const h=a.getStyles();return h.color&&(p.style={standard:{thumb:{"border-color":h.color,opacity:.4},before:{background:h.color,opacity:.1},after:{background:h.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(p.settings.injections=()=>[Ps({layoutService:e,discrete:n})]),p}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:d,scrollbarOverride:{predicate:()=>u,value:qs.OPTIONS.BAR.value},deviceType:t.deviceType})}function du({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Tc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?us.AXIS.PRIMARY:us.AXIS.SECONDARY;return a.key=`${cs.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?cs.COLLECTION.REDUCED_STACKED_PRIMARY:cs.COLLECTION.REDUCED_STACKED_SECONDARY:i?cs.COLLECTION.REDUCED_PRIMARY:cs.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?cs.SCALE.MINOR.REDUCED_PRIMARY:cs.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=cs.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}const pu=e=>e.isPrimary?cs.COLLECTION.REDUCED_PRIMARY_LINE:cs.COLLECTION.REDUCED_SECONDARY_LINE;function hu({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(us.TYPE.LINE).map(r=>{const i=tc({models:t,environment:e,series:r});return i.key=Hl(cs.COMPONENT.MINI_CHART.LINE,r),i.data.collection=pu(r),i.settings.coordinates.minor.scale=r.isPrimary?cs.SCALE.MINOR.REDUCED_PRIMARY:cs.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=cs.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i})}function fu({models:e,environment:t}){return e.seriesModel.query.series(us.TYPE.MARKER).map(n=>{const r=Zl({models:e,environment:t,series:n});return r.key=Hl(cs.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=cs.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?cs.SCALE.MINOR.REDUCED_PRIMARY:cs.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=cs.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r})}function gu({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return Sl(t)?[du({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),du({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...hu({environment:i,models:t}),...fu({models:t,environment:i})]:[]}function yu({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=kl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:cs.SCALE.MAJOR_INNER,layout:{dock:`@${cs.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:cs.SCALE.MAJOR,layout:{dock:`@${cs.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:cs.SCALE.MAJOR,layout:{dock:`@${cs.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function vu({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c,animationsModel:u}=t,m=l.qLocaleInfo,{options:d,theme:p}=n,h="rtl"===d.direction,f=c.query.series(us.TYPE.BAR).filter(e=>e.isPrimary),g=c.query.series(us.TYPE.BAR).filter(e=>!e.isPrimary),y=c.query.series(us.TYPE.LINE),v=c.query.series(us.TYPE.MARKER),S=c.query.all(),M=S.some(e=>e.isPrimary),E=S.some(e=>!e.isPrimary),x=M&&E,b={resolveUIColor:o.getPaletteColor},C=u.enabled,A=M?za({refLineModel:r,layoutService:i,colorModel:b,dock:x?a.meta.minor.dock:a.meta.minor.opposite,scale:cs.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:cs.FORMATTER.PRIMARY,theme:p,localeInfo:m,rtl:h,key:cs.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL,animationsEnabled:C}):[],N=E?za({refLineModel:r,layoutService:i,colorModel:b,dock:x?a.meta.minor.opposite:a.meta.minor.dock,scale:cs.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:cs.FORMATTER.SECONDARY,theme:p,localeInfo:m,rtl:h,key:cs.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2",animationsEnabled:C}):[];return[!!M&&Da({refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:cs.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:cs.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:kl.REFERENCE_LINE,animationsEnabled:C}),!!E&&Da({refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:cs.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:cs.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:kl.REFERENCE_LINE,animationsEnabled:C}),Da({isDimension:!0,refLineModel:r,layoutService:i,colorModel:b,dockService:a,chart:e,scale:cs.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:cs.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`:g.length?`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`:y.length?`${cs.COMPONENT.LINE}-${y[0].id}`:v.length?`${cs.COMPONENT.MARKER}-${v[0].id}`:`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,minimumLayoutMode:kl.REFERENCE_LINE,animationsEnabled:C}),...A,...N,...za({isDimension:!0,refLineModel:r,layoutService:i,colorModel:b,dock:a.meta.major.opposite,scale:cs.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:m,rtl:h,key:cs.COMPONENT.DIMENSION_REF_LINE_LABEL,animationsEnabled:C})]}function Su({layoutService:e}){return!!Sl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:cs.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function Mu(e){return e?.type||us.TYPE.BAR}function Eu({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u,isLineStacked:m}=n.meta;if(!s)return!1;const{options:d}=t,p=n.getLayoutValue("color",{}),h=e=>e.filter(e=>Mu(e)===us.TYPE.LINE).map(e=>({key:Hl(cs.COMPONENT.LINE,e),typeIndex:e.typeIndex})),f=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex,g=n.getHyperCubeValue("qMeasureInfo").map(e=>e.color?.on);return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:cs.COLLECTION.LINE},settings:{getSelectionInfo:()=>a?.getSelectionInfo?.()||{},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=>r.getSettingsForMeasure(e),colorByData:e=>!g[e]&&f,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:o.meta.barSeriesCount,isLineStacked:m,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function xu({models:{fieldModel:e}}){return{[cs.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[cs.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var bu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Cu}=bu;function Au({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Cu}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Nu}=bu,Ou=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Nu}=t?.meta||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!Au({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Tu}=bu,{MAX_NUM_POINTS:Lu,DEFAULT_NUM_POINTS:Ru,DEFAULT_NUM_LINES:Iu}=bu,{DEFAULT_NUM_POINTS:ku}=bu,wu=({layoutService:e,largeDataService:t})=>{if(!Au({layoutService:e,largeDataService:t})){const{maxNumPoints:e=ku}=t?.meta||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{const{dimensions:n=[]}=e?.meta?.size||{},{maxNumLines:r=Iu,maxNumPoints:i=Ru,hasInjectedData:o=!1}=t?.meta||{};if(Ou({layoutService:e,largeDataService:t})*n[0]<=i)return n[0];const a=Math.max(1,Math.min(r,n[1])),s=i/a,l=Math.floor(n[0]<=s?s:s/4),c=2*a*(a+1);return o&&(a>Iu||i>Ru)?Math.min(l,Math.ceil(Lu/c)):l})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Tu}=t?.meta||{},{measureCount:r=1}=e?.meta||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})};function Du({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Au({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>wu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Ou({layoutService:t,largeDataService:n}),fetch:(i,o)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:wu({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:Ou({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)})({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function qu(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Pu({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function zu(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach((t,r)=>e(n[t],r))},e.has=e=>e in n,e}function $u(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=zu(),o=zu();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach((e,t)=>r.splice(t,0,e)),o.forEach(e=>r.push(e)),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function _u(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Fu(e,t,n){const r={qDataPages:(n.qDataPages||[]).map(n=>{const r=$u(e,t,n.qMatrix),i=_u(n.qArea,r);return{...n,qArea:i,qMatrix:r}})};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map(n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n),[])}))}}(e,t,n.qAxisData)),r}const Bu=2**.5,Vu=1/Bu,ju=Vu**44;function Uu(e){return e.qIsOtherCell}function Hu({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach(e=>{if(!e.some(Uu)){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(Uu)||t++}),t}(n)}const Yu={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Wu={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter(e=>!e.isMinor),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map(t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height}));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function Xu(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Ku(e,t){return e.x<t.x?e.x+e.width>=t.x:t.x+t.width>=e.x}function Gu(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:m}=r;e.start===e.end&&(m=c.width+2*i,1===e.end&&(u-=m));const d={x:u+i,y:i,width:m-2*i,height:t.height-2*i},p=s(`${l[0]}…`).width,h=Math.max(0,d.width-c.width),f=Math.max(0,d.height-c.height),g=o*h,y=a*f;return{show:d.width>=Math.min(p,c.width),text:l,dx:g,dy:y,rect:d,style:n.label,segment:{x:u+g,width:c.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Xu(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:Xu(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map(e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}});return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&!Ku(n.segment,i.segment)}}(e,a),a}function Ju(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Xu(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Xu(i,n.minorGuideLine.strokeWidth),x2:o,y2:Xu(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function Zu(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 Qu={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter(e=>!e.isMinor),r=t.filter(e=>e.isMinor);this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Xu(1,t.line.strokeWidth);return{show:n.line.show,x1:Xu(0,t.line.strokeWidth),y1:r,x2:Xu(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Gu(n,this),this.state.minor=Ju(r,this)},render(){return[...Zu([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}))),...Zu(this.state.major.map(e=>e.guideLine)),...Zu(this.state.minor.map(e=>e.guideLine))];var e}};function em(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 tm(e){return e.qTags.indexOf("$qualified")>-1}function nm({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];em(o,a)?(tm(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function rm({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(i=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}function im({qTicks:e,measureText:t=()=>({width:0}),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map(e=>Math.abs(r(e.qStart)-r(e.qEnd)))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map(e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+16})),r.clamp(n),i.rangeAndWidth}}}function om({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 am({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=im,queryFactory:s=om}={attributesFactory:im,queryFactory:om}){const l=n.map((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t)),c=e.map(e=>l[e]),u=t.map(e=>l[e]);return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function sm({qAxis:e=[],measureText:t=()=>({width:0}),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=am,mapper:a=nm,resolver:s=rm}={metaFactory:am,mapper:nm,resolver:rm}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:m}=o({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:i}),d=s({qualifiedMeta:u,nonQualifiedMeta:m});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every(e=>0===e.qTicks.length)}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=d.resolve(t);return n.set(r,i),i}}}function lm(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const cm=lm(0).getTime();function um(e){return(e.getTime()-cm)/86400/1e3}const mm=new Date,dm=new Date;function pm(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>pm(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(mm.setTime(+t),dm.setTime(+r),e(mm),e(dm),Math.floor(n(mm,dm))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const hm=1e3,fm=6e4,gm=36e5,ym=864e5,vm=6048e5,Sm=pm(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*hm)},(e,t)=>(t-e)/hm,e=>e.getUTCSeconds());Sm.range;const Mm=pm(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hm)},(e,t)=>{e.setTime(+e+t*fm)},(e,t)=>(t-e)/fm,e=>e.getMinutes());Mm.range;const Em=pm(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fm)},(e,t)=>(t-e)/fm,e=>e.getUTCMinutes());Em.range;const xm=pm(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*hm-e.getMinutes()*fm)},(e,t)=>{e.setTime(+e+t*gm)},(e,t)=>(t-e)/gm,e=>e.getHours());xm.range;const bm=pm(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*gm)},(e,t)=>(t-e)/gm,e=>e.getUTCHours());bm.range;const Cm=pm(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fm)/ym,e=>e.getDate()-1);Cm.range;const Am=pm(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ym,e=>e.getUTCDate()-1);Am.range;const Nm=pm(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ym,e=>Math.floor(e/ym));function Om(e){return pm(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())*fm)/vm)}Nm.range;const Tm=Om(0),Lm=Om(1),Rm=Om(2),Im=Om(3),km=Om(4),wm=Om(5),Dm=Om(6);function qm(e){return pm(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)/vm)}Tm.range,Lm.range,Rm.range,Im.range,km.range,wm.range,Dm.range;const Pm=qm(0),zm=qm(1),$m=qm(2),_m=qm(3),Fm=qm(4),Bm=qm(5),Vm=qm(6);Pm.range,zm.range,$m.range,_m.range,Fm.range,Bm.range,Vm.range;const jm=pm(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());jm.range;const Um=pm(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());Um.range;const Hm=pm(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());Hm.every=e=>isFinite(e=Math.floor(e))&&e>0?pm(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,Hm.range;const Ym=pm(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());Ym.every=e=>isFinite(e=Math.floor(e))&&e>0?pm(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,Ym.range;const Wm=1,Xm=2,Km=3,Gm=4,Jm=5,Zm=6;function Qm({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),c=i.key({distance:n});let u;i.get(c,1)?u=i.get(c,1):(u=function(e,t,n,r,i,o){function a(e){return Ym.filter(t=>(t.getUTCFullYear()-o.getUTCFullYear())%e===0)}const s=Sm.count(e,t),l=Em.count(e,t),c=bm.count(e,t),u=Am.count(e,t),m=Pm.count(e,t),d=Um.count(e,t),p=Ym.count(e,t),h=n/r.second.width-1,f=n/r.minute.width-1,g=n/r.date.width-1,y=n/r.year.width-1,v={type:"year",desc:"year",count:p,interval:Ym.every(1),formatter:r.year.formatter,offset:e=>Ym.offset(e,-1),floor:Ym.floor};if(s<=h)v.type=Wm,v.desc="second",v.count=s,v.interval=Sm.every(1),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-1),v.floor=Sm.floor;else if(s/2<=h)v.type=Wm,v.desc="every other second",v.count=s/2,v.interval=Sm.every(2),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-2),v.floor=Sm.floor;else if(s/5<=h)v.type=Wm,v.desc="every 5 second",v.count=s/5,v.interval=Sm.every(5),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-5),v.floor=Sm.floor;else if(s/15<=h)v.type=Wm,v.desc="every 15 second",v.count=s/15,v.interval=Sm.every(15),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-15),v.floor=Sm.floor;else if(s/30<=h)v.type=Wm,v.desc="every 30 second",v.count=s/30,v.interval=Sm.every(30),v.formatter=r.second.formatter,v.offset=e=>Sm.offset(e,-30),v.floor=Sm.floor;else if(l<=f)v.type=Xm,v.desc="minute",v.count=l,v.interval=Em.every(1),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-1),v.floor=Em.floor;else if(l/2<=f)v.type=Xm,v.desc="every 2 minute",v.count=l/2,v.interval=Em.every(2),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-2),v.floor=Em.floor;else if(l/5<=f)v.type=Xm,v.desc="every 5 minute",v.count=l/5,v.interval=Em.every(5),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-5),v.floor=Em.floor;else if(l/10<=f)v.type=Xm,v.desc="every 10 minute",v.count=l/10,v.interval=Em.every(10),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-10),v.floor=Em.floor;else if(l/15<=f)v.type=Xm,v.desc="every 15 minute",v.count=l/15,v.interval=Em.every(15),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-15),v.floor=Em.floor;else if(l/30<=f)v.type=Xm,v.desc="every 30 minute",v.count=l/30,v.interval=Em.every(30),v.formatter=r.minute.formatter,v.offset=e=>Em.offset(e,-30),v.floor=Em.floor;else if(c<=f)v.type=Km,v.desc="hour",v.count=c,v.interval=bm.every(1),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-1),v.floor=bm.floor;else if(c/2<=f)v.type=Km,v.desc="every 2 hour",v.count=c/2,v.interval=bm.every(2),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-2),v.floor=bm.floor;else if(c/3<=f)v.type=Km,v.desc="every 3 hour",v.count=c/3,v.interval=bm.every(3),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-3),v.floor=bm.floor;else if(c/6<=f)v.type=Km,v.desc="every 6 hour",v.count=c/6,v.interval=bm.every(6),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-6),v.floor=bm.floor;else if(c/12<=f||i)v.type=Km,v.desc="every 12 hour",v.count=c/12,v.interval=bm.every(12),v.formatter=r.minute.formatter,v.offset=e=>bm.offset(e,-12),v.floor=bm.floor;else if(u<=g)v.type=Gm,v.desc="day",v.count=u,v.interval=Am.every(1),v.formatter=r.date.formatter,v.offset=e=>Am.offset(e,-1),v.floor=Am.floor;else if(u/2<=g)v.type=Gm,v.desc="every 2 day",v.count=u/2,v.interval=Am.every(2),v.formatter=r.date.formatter,v.offset=e=>Am.offset(e,-2),v.floor=Am.floor;else if(u/3<=g)v.type=Gm,v.desc="every 3 day",v.count=u/3,v.interval=Am.every(3),v.formatter=r.date.formatter,v.offset=e=>Am.offset(e,-3),v.floor=Am.floor;else if(m<=g)v.type=Gm,v.desc="week",v.count=m,v.interval=Pm.every(1),v.formatter=r.date.formatter,v.offset=e=>Pm.offset(e,-1),v.floor=Am.floor;else if(m/2<=g)v.type=Gm,v.desc="every 2 week",v.count=m/2,v.interval=Pm.every(2),v.formatter=r.date.formatter,v.offset=e=>Pm.offset(e,-2),v.floor=Am.floor;else if(d<=g)v.type=Jm,v.desc="month",v.count=d,v.interval=Um.every(1),v.formatter=r.date.formatter,v.offset=e=>Um.offset(e,-1),v.floor=Am.floor;else if(d/3<=g)v.type=Jm,v.desc="quarter",v.count=d/3,v.interval=Um.every(3),v.formatter=r.date.formatter,v.offset=e=>Um.offset(e,-3),v.floor=Am.floor;else if(d/6<=g)v.type=Jm,v.desc="half year",v.count=d/6,v.interval=Um.every(6),v.formatter=r.date.formatter,v.offset=e=>Um.offset(e,-6),v.floor=Am.floor;else if(p<=y)v.type=Zm,v.desc="year",v.count=p,v.interval=Ym.every(1),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-1),v.floor=Ym.floor;else if(p/2<=y)v.type=Zm,v.desc="every 2 year",v.count=p/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-2),v.floor=Ym.floor;else if(p/5<=y)v.type=Zm,v.desc="every 5 year",v.count=p/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-5),v.floor=Ym.floor;else if(p/10<=y)v.type=Zm,v.desc="every 10 year",v.count=p/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Ym.offset(e,-10),v.floor=Ym.floor;else{const e=Math.max(1,Math.floor(p/y));v.type=Zm,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Ym.offset(t,-e),v.floor=Ym.floor}return v}(s,l,n,t.all(),r,a),i.set(c,u,1));const m=e.ticks(u.interval);m.length?s.getTime()!==m[0].getTime()&&m.unshift(u.offset(m[0])):m.push(u.floor(s));const d=m.map((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}});let p=[];if(!o&&u.type<=Km){const n=t.getFormat("date"),r=e.ticks(Am.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(Am.offset(r[0],-1)),p=(r.length?r:[Am.floor(s)]).map((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}})}return{inner:d,outer:p}}const ed=86400,td=1440,nd={};function rd(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function id(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,c]=e.domain(),u=So().domain([lm(l),lm(c)]);u.clamp(o),u.range(t.invert?[1,0]:[0,1]);const m="object"==typeof r?r:{type:r};let d;d="d3"===m.type?(e,i)=>Qm({timeScale:u,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===m.initialMin?u.domain()[0]:lm(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(nd[[t,n,r,r,o]])return nd[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=lm(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),m=r-n,d=t/(i-r),p=d/1440,h=d/ed,f=366*d,g=3*d*30,y=a.second.width/h,v=a.minute.width/p,S=a.date.width/g,M=a.year.width/f;let E,x,b,C=0,A=0,N=null,O=null,T=null,L=null,R=null,I=null;const k={outer:[],inner:[]};for(y<1?(N=1,A=1/ed):y<2?(N=2,A=1/ed*2):y<5?(N=5,A=1/ed*5):y<10?(N=10,A=1/ed*10):y<30?(N=30,A=1/ed*30):v<1?(O=1,A=1/td):v<2?(O=2,A=1/td*2):v<5?(O=5,A=1/td*5):v<10?(O=10,A=.006944444444444445):v<30?(O=30,A=.020833333333333336):v<60?(T=1,A=1/24):v<120?(T=2,A=2/24):v<360?(T=6,A=.25):v<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?(R=1,A=31):S<1?(R=3,A=90):M<1?(I=1,A=366):M<2?(I=2,A=732):M<5?(I=5,A=1826.25):(I=10,A=3652.5),x=Math.floor((m+n%1)/A);C<i;){b=x+1,E=I?rd("year",[l+x*I,0,1],[l+b*I,0,1],a.year.formatter):R?rd("month",[l,c+x*R,1],[l,c+b*R,1],a.date.formatter):L?rd("day",[l,c,u+x*L],[l,c,u+b*L],a.date.formatter):T?rd("hour",[l,c,u,0+x*T],[l,c,u,0+b*T],a.minute.formatter):O?rd("minute",[l,c,u,0,0+x*O],[l,c,u,0,0+b*O],a.minute.formatter):rd("second",[l,c,u,0,0,0+x*N],[l,c,u,0,0,0+b*N],a.second.formatter),C=um(E.start),k.inner.push(E);const e=Math.floor(C);if(!(o||I||R||L)){const t={type:"day",start:lm(e),end:lm(e+1),formatter:a.date.formatter,qStart:e};k.outer[k.outer.length-1]&&k.outer[k.outer.length-1].qStart===t.qStart||k.outer.push(t)}x++}return k.min=r,k.max=i,nd[[t,n,r,r,o]]=k,k}(n,e,m.min,l,c,"T"===s.qType);const p={transform:(t=[],{isMinor:n=!1}={})=>t.map(t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1),generate:(t=100,n)=>d(t,n)[a].map(t=>{let n;return n="start"===i?um(t.start):"end"===i?um(t.end):(um(t.start)+um(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:um(t.start),end:um(t.end),scaleStart:e.domain()[0]}}}).filter(e=>e.position>=0&&e.position<=1)};return p}const od=/t+/i;const ad={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 sd(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 ld="continuousPan";var cd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Yu,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=Du,snapshotFetcherFactory:c=Pu,cacheFetcherFactory:u=qu,cache:m={initial:{},merged:{}}}=s,d=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),p=c({layoutService:t,viewCache:i}),h=u({cache:m}),f=e=>{throw e.isHandled=!0,e};let g,y,v;return{update(e){var n,r;({initialMin:y,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",y),i.set("continuousMax",v),i.set("minimiumZoomSpan",(n=y,r=v,Math.max(1e-6,(r-n)*ju))),g=t.meta.isSnapshot?p:d,t.meta.isSnapshot&&({zoom:{min:y,max:v}}=p.getSnapshotData()),o.preventSet("zoom",{min:y,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(y,v).then(e=>{const t=function(e){return{qDataPages:e.qDataPages.map(e=>{const t=_u(e.qArea,e.qMatrix);return{...e,qArea:t}}),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),m.initial=t,m.merged=t,e}).then(e=>Fu(y,v,e)).then(e=>this.updateLayout(e)).catch(f)},fetch:(e,t)=>g.fetch(e,t).then(e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=_u(e.qArea,r);return{...e,qArea:i,qMatrix:r}}),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every(e=>!e.qTicks.length))return e;const n=t.qAxis.map(e=>e.qName),r=t.qAxis.map(e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart})),i=t.qAxis.map(e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]}));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(m.initial,e)).then(e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),m.merged=e,e)).then(n=>Fu(e,t,n)).catch(f),fetchFromCache:(e,t)=>h.fetch(e,t).then(n=>Fu(e,t,n)),fetchMinMaxData:()=>Promise.resolve(m.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return re({},e,{...m.initial})},getInitialLayout(){const e=this.getInitialCube();return re({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Hu(m.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:m.merged.qDataPages[0]})]:m.merged.qDataPages;t.qDataPages=n,t.qAxisData=m.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then(e=>(r.updateLayout(e),t(),e))}const o=O((e,t)=>i("fetch",e,t),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then(n=>(o(e,t),n))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return T((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter(e=>e.key===o)[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=i?1-o:o,{min:u,max:m}=t.get("zoom"),d=Math.abs(m-u),p=d-(r>0?Vu:Bu)*d,h=u+p*c,f=m-p*(1-c),g=h<a?a-h:0,y=f>s?f-s:0;t.set("zoom",{min:Math.max(h-y,a),max:Math.min(f+g,s)})}},r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:ld,pointers:1,threshold:10,enable(r,i){return this.started===ld||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)}},events:{[`${ld}start`](n){n.preventDefault(),this.started=ld;const{min:i,max:o}=r.get("zoom");this[ld]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${ld}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[ld],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${ld}end`](e){e.preventDefault(),this.started=!1},[`${ld}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Wu,timeAxis:Qu},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach(i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=re(!0,{},t[i],o)}),r}(t,ad,n),{qAxis:i}=r,o=lr(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map(e=>e.qStart)),r=Math.max(...t[t.length-1].qTicks.map(e=>e.qEnd))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let c,u,m=[];const d=function(e){return Number.isNaN(+e)?NaN:o(e)};d.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(m=u.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(i[n.minor].qTicks,{isMinor:!0});m=m.concat(e)}return"auto"===o&&(m=u.generate(e,n.isDayOrShorter)),m},d.invert=e=>o.invert(e),d.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),d.range=e=>Array.isArray(e)?o.range(e):o.range(),d.norm=e=>(sd(a,d),a.instance(e)),d.normInvert=e=>(sd(a,d),a.instance.invert(e)),d.copy=()=>e(t,n),d.clamp=(e=!0)=>(o.clamp(e),o.clamp()),d.min=()=>Math.min(s,l),d.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const p=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return i&&od.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach(e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(41000.2343433)).width+16)}),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter(e=>!e.isMinor),{length:n}=t;if(!n)return o.date;const r=lm(t[0].data.start),i=lm(t[n-1].data.start);return Am.count(r,i)/n>=1?o.date:bm.count(r,i)/n>0?o.minute:Em.count(r,i)/n>0?o.second:o.date},t}(r);return u=id(o.copy(),r,p),c=sm({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*p.getFormat("minute").width,cache:r.cache,scale:d}),d.data=()=>({fields:[{formatter:d.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:b(n,"fields.0.raw",()=>({}))}]}),d.formatter=()=>p.getFormatFromTicks(m).formatter,d}}};const ud=e=>e.meta.seriesComponentKeys[0],md=(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 dd({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=cd,{layoutService:s,seriesModel:l}=t,c=ud(l),u=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:c}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter(e=>e.key===cs.COMPONENT.LEGEND_CATEGORICAL);md(t,e)}if(n.scroll.enabled()){const[e]=i.filter(e=>e.key===c);e&&(u(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const pd="continuousPinchZoom";function hd({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=cd.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:m,tooltipService:d}=t,p="rtl"===n.options.direction,h=d.getInteractions(),f=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Zs({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:u,layoutService:l,dockService:c,rtl:p}),g={type:"hammer",enable:!0,gestures:[...m.custom.legendInteractions(),...a.gestures.sort((e,t)=>(t.prio||0)-(e.prio||0)),...f.gestures,...h.gestures]},y=[dd({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),f.native,h.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),y.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:ud(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0},s=cd.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:pd,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some(t=>t.key===e)},events:{[`${pd}start`](e){a.last=e.scale,e.preventDefault()},[`${pd}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:ud(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:p})),[g,...y]}const fd=({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}}}),gd="lasso",yd=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:gd,enable(e,n){if(this.started===gd||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(e=>e.key===t).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==gd&&(i.actions.select.emit("start",gd),this.chart.component(e).emit("lassoStart",t),this.started=gd)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",gd),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const vd=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(t=>-1!==e.indexOf(t.key)),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}(t,this.chart),c=o.hitRadius?o.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,m=o.shapesAt?o.shapesAt(u):this.chart.shapesAt(u,{components:e.map(e=>({key:e,propagation:"stop"})),propagation:"stop"}),d=this.chart.component("tooltip"),p="mouse"!==t.pointerType&&d&&d.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(!m.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),m.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,m):r;this.chart.brushFromShapes(m,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{(e?.meta||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(d&&o.actions.tooltip.enabled())if(m.length){const{customTooltipModel:e}=o;if(e?.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,d,{nodes:n,opts:o,customTooltipModel:e})}else d.emit("show",t,{nodes:m})}else p&&d.emit("hide")}}}};const Sd=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const Md=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter(e=>-1!==n.indexOf(e.key)),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function Ed(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:m,onEdited:d}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:d?{bubbleEnd(){d()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:m},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=Md(e,t,"range");return{interactions:[e.onEdited?Sd(e,t):null,r].filter(Boolean),components:[n]}}const xd=/axis|legend/,bd=e=>e.some(e=>xd.test(e.type));function Cd({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s=[`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,...n.query.series(us.TYPE.MARKER).map(e=>Hl(cs.COMPONENT.MARKER,e)),...n.query.series(us.TYPE.LINE).map(e=>Hl(cs.COMPONENT.POINT,e)),cs.COMPONENT.AXIS.MAJOR,cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER,cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,cs.COMPONENT.LEGEND_CATEGORICAL],l=(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[cs.COMPONENT.AXIS.MAJOR,cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER,cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS,cs.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]},c={targets:s,components:l},u=e=>e.some(e=>"legend-cat"===e.type)?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,m={actions:e,isLocked:u,hitRadius:e=>bd(e)?0:3,debouncer:O,flags:o};return o.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?L({actions:e,components:l,hitRadius:e=>bd(e)?0:3,isLocked:u,targets:s}):function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[vd(e,t)],components:[]}}(c,m)}function Ad({actions:e,models:t}){const{flags:n,layoutService:r,dockService:i,seriesModel:o}=t,{isDiscrete:a,isDimensionLocked:s}=r.meta;if(!a||s)return!1;const l=[...o.meta.seriesComponentKeys,cs.COMPONENT.AXIS.MAJOR],c=[{key:l[0],contexts:["selection"],action:"set",data:["selectionDimension"]}];return n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?I({actions:e,componentKey:"discrete-range-brush",components:c,dock:i.meta.major.dock,eventKey:"discreteRange",fillTargets:[cs.COMPONENT.AXIS.MAJOR],targets:l}):function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map(e=>`@${e}`).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[Md(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:c,targets:l,fillTargets:[cs.COMPONENT.AXIS.MAJOR],dock:i.meta.major.dock},{actions:e})}const Nd={components:[],interactions:[]};function Od({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const i=function({actions:e,models:t,isUnsupportedFeature:n}){const{flags:r,dockService:i,seriesModel:o,layoutService:a}=t,{isDimensionLocked:s,isBarSeriesStacked:l,isLineStacked:c}=a.meta;if(s||l||c||n?.("rangeSelections"))return!1;const u=[cs.COMPONENT.AXIS.MINOR.PRIMARY,`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,...o.query.series(us.TYPE.MARKER).filter(e=>e.isPrimary).map(e=>Hl(cs.COMPONENT.MARKER,e)),...o.query.series(us.TYPE.LINE).filter(e=>e.isPrimary).map(e=>Hl(cs.COMPONENT.POINT,e))];return r.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,componentKey:"minor-range-brush",dock:i.meta.minor.dock,eventKey:"minorRange",fillTargets:[cs.COMPONENT.AXIS.MINOR.PRIMARY],onEdited:()=>{e.select.emit("end","minorRange")},scale:cs.SCALE.MINOR.PRIMARY,targets:u}):Ed({eventName:"minorRange",key:"minor-range-brush",targets:u,fillTargets:[cs.COMPONENT.AXIS.MINOR.PRIMARY],dock:i.meta.minor.dock,scale:cs.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Nd,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{flags:r,dockService:i,seriesModel:o,layoutService:a}=t;if(a.meta.isDimensionLocked||a.meta.isBarSeriesStacked||n?.("rangeSelections"))return!1;const s=[cs.COMPONENT.AXIS.MINOR.SECONDARY,`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,...o.query.series(us.TYPE.MARKER).filter(e=>!e.isPrimary).map(e=>Hl(cs.COMPONENT.MARKER,e)),...o.query.series(us.TYPE.LINE).filter(e=>!e.isPrimary).map(e=>Hl(cs.COMPONENT.POINT,e))];return r.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,componentKey:"minor-secondary-range-brush",dock:i.meta.minorSecondary.dock,eventKey:"minorRange-secondary",fillTargets:[cs.COMPONENT.AXIS.MINOR.SECONDARY],onEdited:()=>{e.select.emit("end","minorRange-secondary")},scale:cs.SCALE.MINOR.SECONDARY,targets:s}):Ed({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:s,fillTargets:[cs.COMPONENT.AXIS.MINOR.SECONDARY],dock:i.meta.minorSecondary.dock,scale:cs.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||Nd,a=Ad({actions:e,models:n})||Nd,s=function({actions:e,chart:t,models:n}){const{flags:r,layoutService:i,dockService:o,seriesModel:a}=n,{isContinuous:s,isTime:l}=i.meta;if(!s)return!1;const c=l?[cs.COMPONENT.AXIS_OVERLAY.TIME_INNER,cs.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[cs.COMPONENT.AXIS_OVERLAY.CONTINUOUS],u=[`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,...a.query.series(us.TYPE.MARKER).map(e=>Hl(cs.COMPONENT.MARKER,e)),...a.query.series(us.TYPE.LINE).map(e=>Hl(cs.COMPONENT.POINT,e)),...c],m=({datum:e,data:n,scale:r})=>{const i=l?r.formatter():r.data().fields[0].formatter(),o=t.scale(cs.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`};return r.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,componentKey:"continuous-range-brush",dock:o.meta.major.dock,eventKey:"continuousRange",fillTargets:c,multiple:!0,observeBrush:!0,scale:l?cs.SCALE.MAJOR_INNER:cs.SCALE.MAJOR,targets:u,toLabel:m}):Ed({eventName:"continuousRange",key:"continuous-range-brush",targets:u,fillTargets:c,dock:o.meta.major.dock,scale:l?cs.SCALE.MAJOR_INNER:cs.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel:m},{actions:e})}({actions:e,chart:t,models:n})||Nd,l=function({actions:e,models:t}){const{flags:n,colorService:r,layoutService:i}=t,[o]=r.custom.legendComponents(),a=r.custom.wrappedScales(),{isDimensionLocked:s}=i.meta;if(s||!o)return!1;const l=`${cs.SCALE.COLOR}Range`,{type:c,key:u}=o,m=a[l];return!("legend-seq"!==c||!m||m.min>=m.max)&&(n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?R({actions:e,bubblesPlacement:"outside",componentKey:"legend-range-brush",dock:o.layout.dock,eventKey:"legendRange",fillTargets:[u],onEdited:()=>{e.select.emit("end","legendRange")},scale:l,targetFillSelector:'[id="legend-seq-ticks"]',targets:[u],targetSelector:'[id="legend-seq-target"]'}):Ed({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:o.layout.dock,scale:l,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e}))}({actions:e,models:n})||Nd;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function Td({actions:e,models:t}){const{flags:n,layoutService:r,seriesModel:i}=t,{seriesComponentKeys:o}=i.meta;if(r.meta.isDimensionLocked)return{components:[],interactions:[]};const a={key:"lasso",componentTargetKey:o[0],components:o.map(e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]}))},s={actions:e};return n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?k({actions:e,componentKey:"lasso",components:o.map(e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})),targetKeys:[o[0]]}):function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=fd(n);return{interactions:[yd(n,t)],components:[r]}}(a,s)}function Ld({chart:e,chartModel:t,colorService:n,context:r,resources:i,viewCache:o,scales:a,models:s}){const{layoutService:l,dockService:c,themeService:u,discreteModel:m,seriesModel:d}=s,p={...n,getMain:()=>({getPaletteColor:n.getPaletteColor.bind(n)})},h=[],f=l.getLayoutValue("plugins");if(!Array.isArray(f)||0===f.length)return h;const{allSeries:g,seriesComponentKeys:y}=d.meta,[v]=y;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=de.generateId)})}(f);const E=[{key:cs.COMPONENT.POINT,lines:!0,labels:!1,labelKeys:[cs.COMPONENT.POINT_LABEL]},{key:cs.COMPONENT.FORECAST_POINT,lines:!0,labels:!1,labelKeys:[cs.COMPONENT.FORECAST_POINT_LABEL]}],x=function(e){const t=[];return e.forEach(e=>{const n=t[t.length-1],r=n?.[0],i=e?.type===r?.type,o=e?.scale===r?.scale;let a=!1;"point"===e?.type?a=o&&i:"line"===e?.type&&(a=i&&o&&!e?.showPoints&&!r?.showPoints),a?n.push(e):t.push([e])}),t}(M);return x.forEach((n,i)=>{const o=`points-addon-combo-chart-${i}`,s=`lines-addon-combo-chart-${i}`;switch(S="point"===n[0].type?n[0]?.scale||g[0]?.scale:n[0]?.points?.[0]?.scale??g[0]?.scale,n[0]?.type){case"point":h.push(Ha({chart:e,chartModel:t,discreteModel:m,colorService:p,themeService:u,layoutService:l,dockService:c,rtl:r.rtl,majorScale:cs.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:o})),E.push({key:o,lines:!1,labels:!0,fixed:!0,duplicates:!0});break;case"line":h.push(function({chart:e,chartModel:t,discreteModel:n,colorService:r,layoutService:i,dockService:o,rtl:a,majorScale:s,minorScale:l,mainComponentKey:c,data:u,key:m,scales:d={}}){if(!Array.isArray(u)||0===u.length)return!1;const p={resolveUIColor:r.getMain().getPaletteColor},h="horizontal"===o.meta.major.orientation,f=!(!h||!a),{canBeContinuous:g,isContinuous:y}=i.meta,v=i.getLayout(),S=ia.getDimensionValuesInfo({layout:v,canBeContinuous:g,discreteModel:n,layoutService:i}),M=[];u.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,style:0===r?e.style:void 0}));M.push(...n)});const E={},x=[];u.forEach(e=>x.push(...(e?.points??[]).map(e=>e.dimensionValue))),x.forEach(e=>{S[e]&&(E[e]?(E[e].innerValues=S[e].innerValues,E[e].minOrder=Math.min(E[e].minOrder,S[e].minOrder),E[e].maxOrder=Math.max(E[e].maxOrder,S[e].maxOrder),E[e].isMinOrderOk=E[e].isMinOrderOk||S[e].isMinOrderOk,E[e].isMaxOrderOk=E[e].isMaxOrderOk||S[e].isMaxOrderOk):E[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},E[e].numInnerValues=(E[e].maxOrder||0)-(E[e].minOrder||0)+1)});const b=M[0];M.forEach(t=>{const n=Ba({point:t,dimensionValueInfo:E,layoutService:i}),r=t?.scale,o=b?.scale,a=i?.meta?.isButterfly,s=i?.meta?.isStacked,l=E[t.dimensionValue]?.dataNode;let c=n;const u=o&&r&&o!==r,m=a&&1===t.measureIndex,p=s&&Array.isArray(l);if(u)c=function(e,t,n){const r=t.min(),i=t.max(),o=n.min(),a=n.max();return i===r?o:o+(e-r)/(i-r)*(a-o)}(n,d[r]||e.scale(r),d[o]||e.scale(o));else if(m)c=-n;else if(p&&void 0!==t.measureIndex&&Array.isArray(l)){const e=l.slice(0,t.measureIndex+2),n=l[t.measureIndex+1]?.qNum;if("number"==typeof n&&0!==n){const t=Math.sign(n);c=e.reduce((e,n)=>{const r=n.qNum;return"number"==typeof r&&Math.sign(r)===t?e+r:e},0)}}t.validMeasureValue=c});const C={scale:s,fn:({datum:t})=>{const n=e.scale(s),r=t.value.dimensionValue;return y?n("string"==typeof r?""===r?void 0:+r:r):void 0!==E[r]?ia.getScaledPosition({scale:n,value:E[r].id,valueInfo:E[r],size:e.component(c)?.rect[h?"width":"height"],align:"center",invert:f,layoutService:i,isContinuous:y}):void 0}},A={scale:l,fn:({datum:e,scale:t})=>t(e.value.validMeasureValue)};return{key:m,type:"line",data:M,settings:{connect:!0,coordinates:{major:h?C:A,minor:h?A:C,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.style?.lineCurve??Wa,line:{strokeWidth:({datum:e})=>e.value.style?.lineThickness??Ya,stroke:({datum:e})=>Fa({colorModel:p,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.style?.lineType}}},animations:{enabled:t.query.animationsEnabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.lines.compensateForLayoutChanges}}}({chart:e,chartModel:t,discreteModel:m,colorService:p,layoutService:l,dockService:c,rtl:r.rtl,majorScale:cs.SCALE.MAJOR,minorScale:S,mainComponentKey:v,data:n,key:s,scales:a})),n.forEach(n=>{n?.showPoints&&n?.points?n.points.forEach((n,i)=>{const o=`points-${i}-for-${s}`;h.push(Ha({chart:e,chartModel:t,discreteModel:m,colorService:p,themeService:u,layoutService:l,dockService:c,rtl:r.rtl,majorScale:cs.SCALE.MAJOR,minorScale:n.scale,mainComponentKey:v,data:[n],key:o})),E.push({key:o,lines:!0,labels:!0,duplicates:!0})}):n?.points&&E.push({key:s,lines:!0,labels:!1,duplicates:!0,points:n.points})})}}),h.push(function({layoutService:e,dockService:t,chartModel:n,themeService:r,configs:i,cache:o}){const a=e.getLayoutValue("plugins"),{rtl:s}=t.config,{orientation:l}=t.meta.major,{isOneDimensional:c,isStacked:u}=e.meta,m=r.getStyles();return{type:"point-label",key:"plugins-point-labels",renderer:_a(),settings:{all:!0,cache:o,configs:i,label:e=>e.value?.label?.value?e.value?.label?.value:u?e.point?.label:e.end?.label,lineId:({data:e})=>{for(let t=0;t<a.length;t++){const n=a[t];switch(n.type){case"point":if(n.cId===e.value?.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value?.cId))return n.cId}}return e.value?.cId||e.line?.value},majorValue:e=>e.value?.dimensionValue?e.value.dimensionValue:c?e.value:e.major?.value,orientation:l,pointValue:e=>e.value?.validMeasureValue,rtl:s},style:m.plugins.label,animations:{enabled:n.query.animationsEnabled,trackBy:Ta.nonUpdatingNode.trackBy,compensateForLayoutChanges:Ta.labels.compensateForLayoutChanges}}}({layoutService:l,dockService:c,chartModel:t,themeService:u,configs:E,cache:o})),h}function Rd({picasso:e,chart:t,models:n,environment:r,flags:i,viewState:o,viewCache:a,actions:s,isUnsupportedFeature:l}){const{colorService:c,pluginService:u}=n,m=n.layoutService.getLayout(),{options:d}=r,p=function({layout:e,options:t={}}){return!(!e?.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:m,options:d}),h=(f={logicalSize:p,minCenterRatio:0},{layoutModes:ae.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,viewState:r,viewCache:i,actions:o}){const{colorService:a,layoutService:s,dockService:l,tooltipService:c,disclaimerService:u}=t,m=function({environment:e,models:t}){const{translator:n,options:r}=e,{themeService:i,disclaimerService:o}=t,a=o.getDisclaimer();if(!a)return!1;const{fontFamily:s}=i.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:a.alignment},settings:{isRTL:"rtl"===r.direction,label:n.get(`Object.Disclaimer.${a.key}`)},style:{fontFamily:s}}}({environment:n,models:t});return u.getHasSuppressingDisclaimer()?[m]:[...au({models:t}),...Dl({models:t}),...tu({chart:e,models:t,environment:n,viewState:r,viewCache:i}),Eu({models:t,environment:n}),...Fl({models:t,environment:n}),...uu({models:t,environment:n,actions:o,viewCache:i}),bo({viewState:r,viewCache:i,layoutService:s,dockService:l}),...yu({models:t}),...vu({chart:e,models:t,environment:n}),mu({models:t,environment:n,viewState:r,viewCache:i}),...a.custom.legendComponents(),Su(t),...gu({chart:e,models:t,viewState:r,viewCache:i,environment:n}),...c.getComponents(),m].filter(Boolean)}({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s}),y=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:i}=n,o=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=Cd({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=Od({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=Td({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:s,chart:t,models:n,isUnsupportedFeature:l}),v=function({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...Ll({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[cs.SCALE.MINOR.PRIMARY]:Rl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:i}),[cs.SCALE.MINOR.SECONDARY]:Rl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:i}),[cs.SCALE.MINOR.REDUCED_PRIMARY]:Il({layoutService:o,tickModel:s,dockService:u,environment:i}),[cs.SCALE.MINOR.REDUCED_SECONDARY]:Il({layoutService:o,tickModel:l,dockService:u,environment:i}),...c.custom.wrappedScales()}}({picasso:e,models:n,viewState:o,viewCache:a,environment:r}),S=Ld({chart:t,chartModel:{query:{animationsEnabled:n.animationsModel.enabled}},colorService:c,context:{},resources:{},viewCache:a,scales:v,models:n}),M=u.extendComponents([...g,...y.components,...S]);return{collections:Ml({models:n}),scales:v,components:M,formatters:xu({models:n}),interactions:hd({chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s,selectables:y}),strategy:h,palettes:c.getPalettes()}}const Id=({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})=>{const{width:m,height:d}=i(),[,p]=o(async()=>{if(!(t?.update&&n&&r&&s))return;const{colorService:i,discreteModel:o,dockService:p,layoutService:h,refLineModel:f,animationsModel:g,styleModel:y}=n;function v(){t.update({settings:Rd({picasso:e,chart:t,models:n,environment:r,flags:a,viewState:s,viewCache:l,actions:c,isUnsupportedFeature:u})})}p.update({width:m,height:d}),i.custom.updateLegend(y),f.update({picasso:e,chart:t,models:n,environment:r,viewState:s,viewCache:l,actions:c});const S=h.getDataPages();g.meta.isSizeChanging=!0,h.setDataPages([]),v(),h.setDataPages(S),h.meta.isContinuous||await o.command.initialize(),v()},[m,d]);if(p)throw p},kd=[cs.COMPONENT.AXIS_TITLE.MAJOR,cs.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,cs.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,cs.COMPONENT.GRID_LINE,cs.COMPONENT.ZERO_LINE],wd=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:cs.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Dd=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:cs.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[];const qd={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Pd(e){return qd[e]||e}function zd(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach(t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=Pd(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach(e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])}),l.push(t))}),i.gestures.forEach(t=>{const n=Pd(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 m(){l.forEach(e=>{Object.keys(e.events).forEach(t=>{a.off(t,e.events[t])}),a.remove(e.options.event)}),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),m(),c&&u()},off(){c=!1,m()},on(){c=!0,0===l.length&&u()},destroy(){m(),a&&a.destroy(),a=null,o=null,i=null}}}}function $d(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map(t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}}),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:$d(i,t,n)},i}function _d(e){const t=e.scale("band");e.scale("group-by-measure",function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)}),s.splice(-1),i.domain(s),$d(i,a,l,e.invert)})}const Fd={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",c=r,u=i,m=t<.5?90:-90;return o&&(s="y",l="x",c=i,u=r,m=t<.5?180:0),a(re({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:m}))}};function Bd({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const m=re({},{major:l,majorEnd:c},r.minor.items[e]);i.forEach(t=>{m[t]=r[t].items[e]});const d=o?n:t,p=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:u,width:m[a].width,minWidthPx:m[a].minWidthPx,maxWidthPx:m[a].maxWidthPx,maxMajorWidth:d}),h=(u-p)/2,f=h+m.major+p/2;return{item:m,boxCenter:f,boxWidth:p,boxPadding:h,rendWidth:t,rendHeight:n}}function Vd({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=re(!0,{},n||{},r||{}),c={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},u=i.major;let m;m="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:re(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:re(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:i.major}});const d=i.minor||{};let p;const h={major:m,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:re(!0,{},{start:{scale:d.scale,ref:"start"},end:{scale:d.scale,ref:"end"},min:{scale:d.scale,ref:"min"},max:{scale:d.scale,ref:"max"},med:{scale:d.scale,ref:"med"}},d)})};for(let n=0,r=e.length;n<r;n++)p=e[n],h[p]=s.resolve({data:t,defaults:l[p],settings:i[p],scaled:c});return h}const jd=["oob"];const Ud={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Vd({keys:jd,data:i,defaultSettings:{oob:Fd.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l,m=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Bd}){const l=[],{items:c}=r.major;for(let u=0,m=c.length;u<m;u++){const{item:m,boxCenter:d,rendWidth:p,rendHeight:h}=s({i:u,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),f=c[u].data,g=[];if(m.oob.show){g.push(Fd.createOob({oob:m.oob,dockValue:a,boxCenter:d,rendWidth:p,rendHeight:h,flipXY:n,symbol:o}));const e={type:"container",data:f,collider:{type:"bounds"},children:g};l.push(e)}}return l}({width:e,height:t,flipXY:r,resolved:l,keys:jd,symbol:s,dockValue:n});return m}},Hd={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Yd=["hat"];function Wd(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function Xd({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,c=i,u=e.hat.alignment||0;o&&(a="y",s="x",l=i,c=r,u=1-u);const m=(n+e.major)*l;let d=[{[a]:m,[s]:0+c},{[a]:m+t*u*l,[s]:8},{[a]:m+t*l,[s]:0+c},{[a]:m+t*l,[s]:0+c+10},{[a]:m,[s]:0+c+10}];const p=re({},e.hat,{type:"path",d:Wd(d)});d=[{[a]:m,[s]:0},{[a]:m+t*(1-u)*l,[s]:0+c-8},{[a]:m+t*l,[s]:0},{[a]:m+t*l,[s]:-10},{[a]:m,[s]:-10}];return[p,re({},e.hat,{type:"path",d:Wd(d)})]}const Kd={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=Vd({keys:Yd,data:r,defaultSettings:Hd,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,c=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=Bd}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:p}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),h=s[l].data,f=[];c.hat.show&&f.push(...Xd({item:c,boxWidth:u,boxPadding:m,rendWidth:d,rendHeight:p,flipXY:n}));const g={type:"container",data:h,collider:{type:"bounds"},children:f};a.push(g)}return a}({width:e,height:t,flipXY:n,resolved:a,keys:Yd});return c}};var Gd={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var Jd={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],separateStacking:!1,orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10,isLineStacked:!1},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l,separateStacking:c,isLineStacked:u}=this.settings.settings,m=this.settings.settings.primaryExtremum(),d=this.settings.settings.secondaryExtremum(),p=s.length&&void 0!==m,h=l.length&&void 0!==d;if(!p&&!h)return[];const f=s.map(e=>e.ref),g=l.map(e=>e.ref),y=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[],isLineStacked:s,separateStacking:l}){const c=[],u=[];return o.length&&u.push({isPrimary:!0}),a.length&&u.push({isPrimary:!1}),u.forEach(o=>{const a=o.isPrimary?t:n,u=o.isPrimary?r:i;c.push((({type:e,extremum:t,separateStacking:n,items:r,isLineStacked:i})=>{const o="max"===e?e=>e>t:e=>e<t,a=r.filter(e=>o(((e,t,n)=>{const r=n.isMarker?.value;return t?r?n.point.value:n.point.value<0?n.start.value:n.end.value:e&&r?n.point.value:n.end.value})(i,n,e)));return a})({type:e,extremum:a,items:u,isLineStacked:s,separateStacking:l}))}),(({items:e})=>{const t=[],n=[];return e.forEach(e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))}),n})({items:c.reduce((e,t)=>e.concat(t),[])})}({type:t,primaryExtremum:m,secondaryExtremum:d,primaryItems:e.filter(e=>f.includes(e.end?.source?.field||e.point?.source?.field)),secondaryItems:e.filter(e=>g.includes(e.end?.source?.field||e.point?.source?.field)),primarySeries:s,secondarySeries:l,separateStacking:c,isLineStacked:u});if(!y.length)return[];const v="horizontal"===n,S=this.rect[v?"width":"height"],M=this.resolver.resolve({data:{items:y},settings:{major:a},scaled:{major:S}}),E=("max"===t?90:-90)-(v?0:90)-(!v&&r?180:0),x=o/2*i,{fill:b}=this.settings.style,C=M.items.map(e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:b,startAngle:E,x:v?S*e.major:x,y:v?x:S*e.major,data:e.data}));return C}};function Zd({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function Qd({chart:e,seriesInfo:t}){const n={primary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}},secondary:{paths:[],linePaths:[],areaPaths:[],lineMap:{},areaMap:{}}},r=[...t.primary.map(e=>e.key),...t.secondary.map(e=>e.key)];return e.findShapes("path").filter(e=>r.some(t=>t===e.key)).reduce((e,n)=>{let r=t.primary.some(e=>e.key===n.key)?e.primary:e.secondary;return r=Object.hasOwnProperty.call(n.attrs,"stroke-linejoin")?r.linePaths:r.areaPaths,r.push(n),e},n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.lineMap[e]){const[t]=r.linePaths.filter(t=>t.data&&t.data.typeIndex.value===e);r.lineMap[e]=t}return r.lineMap[e]},getArea:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.areaMap[e]){const[t]=r.areaPaths.filter(t=>t.data&&t.data.typeIndex.value===e);r.areaMap[e]=t}return r.areaMap[e]}}}function ep({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function tp({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(cs.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some(t=>t.min<=e&&o(e,t.max))}}function np({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:c,legendTap:u}=t,m=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let d=[c?e=>e.color.value:r[m]].filter(Boolean);if(i&&l&&d.push(e=>e.color.value),!i&&u&&(d=[e=>e.color.value]),!d.length)return[];const p=function({brush:e,chart:t}){return("value"===e.type?ep:tp)({brush:e,chart:t})}({brush:s,chart:o});return p?n.reduce((e,t,n)=>(d.some(e=>p({value:e(t)}))&&e.push({item:t,index:n}),e),[]):[]}function rp({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map(e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n})}function ip({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(cs.SCALE.COLOR),a=t.filter(e=>-1!==n.indexOf(e.index)).map(e=>e.item.end.value),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,m=o.domain().map(e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/u))})),d=m.map(e=>e.offset),p=d.lastIndexOf(0),h=d.indexOf(1),f=m.slice(-1===p?0:p,-1===h?m.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function op({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(cs.SCALE.COLOR),a=t.filter(e=>-1!==n.indexOf(e.index)).map(e=>e.item.end.value),s=Math.min(...a),l=Math.max(...a)-s,c=0===l?1:l,u=o.domain(),m=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=o(t)||i;m.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const r=u[e+1];m.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/c))})}const d=m.map(e=>e.offset),p=d.lastIndexOf(0),h=d.indexOf(1),f=m.slice(-1===p?0:p,-1===h?m.length:h+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:f}}function ap({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:m}){const d=r[e];if("gradient"!==d.type)return d;const{type:p,nil:h}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:c}){const u=e.scale(cs.SCALE.MAJOR),m=e.scale(cs.SCALE.COLOR),d=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),p=t.filter(e=>-1!==n.indexOf(e.index)),h=("vertical"===o&&c?p.reverse():p).map(e=>e.item),f=h.map(e=>d(e.major.value)),g=Math.min(...f),y=Math.max(...f)-g,v=0===y?1:y,S=f.map((e,t)=>0===t?0:t===f.length-1?1:(e-g)/v),M=[];for(let e=0;e<h.length;e++){const t=h[e],n=a?t.color.value:m(t.color.value)||i,r=S[e];M.push({color:n,offset:0===e?0:Math.max(0,M[M.length-1].offset)}),M.push({color:n,offset:e===h.length-1?1:Math.max(0,parseFloat((r+(S[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:M}}({chart:t,selected:a,connection:n,gradient:d,fallback:h,orientation:u,isColorCode:"color"===p,groupedByMeasure:l,itemsPerGroup:c,rtl:m});return("continuous"===p?ip:op)({chart:t,selected:a,connection:n,gradient:d,fallback:h})}function sp({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:p}){const h=t.getLine(l,c),{attrs:f}=h,g=rp({d:f.d}),y=m.map(t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:m,count:d}){return{path:l.map((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`}).join(""),attrs:u,stroke:ap({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:m})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:f,rtl:d,count:p}));return{lines:y,commands:g}}function lp({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,rtl:p,highlightArea:h,isLineStacked:f}){const g=function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter(e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some(t=>t.typeIndex===e.typeIndex.value)})}({items:o,selectionInfo:i,seriesInfo:n}),y=function({items:e,seriesInfo:t}){const n=e.reduce((e,n,r)=>{const i=n.typeIndex.value;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:n.colorMeasureIdx?.value,primary:t.primary.some(e=>e.typeIndex===i)}),e[i].items.push(n),e},{});return Object.keys(n).map(e=>n[e]).sort((e,t)=>e.index-t.index).map(e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx}))}({items:g,seriesInfo:n}),{lines:v,areas:S}=y.reduce((n,o)=>{const g=np({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l(o.measureIx),chart:e});if(g.length<2)return n;const y=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:g});if(!y.length)return n;const{lines:v,commands:S}=sp({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:p,count:o.items.length});n.lines.push(...v);const M=function({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:m,rtl:d,count:p,commands:h,isLineStacked:f}){const g=t.getArea(l,c);if(!g)return[];const{attrs:y,key:v}=g,S="horizontal"===s,M=e.component(v).rect.computedInner[S?"height":"width"]*e.scale(c?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY)(0),E=[];let x;return m.forEach(e=>{e.forEach((t,n)=>{const r=h[t],i={x:r.x,y:r.y,raw:r.raw};if(0===n||"M"===r.letter||e[n-1]!==e[n]-1)E.push({lines:[i],first:{x:i.x,y:i.y},connection:[e[n]]});else{const t=E[E.length-1];t.lines.push(i),t.connection.push(e[n])}})}),f&&(x=rp({d:y.d}).reduce((e,t,n)=>(0===n||"M"===t.letter?e.push([t]):e[e.length-1].push(t),e),[])),E.map(t=>{const{lines:l}=t,c=l.map((e,t)=>0===t?`M${e.x},${e.y}`:e.raw);if(f){const e=t.connection[0],n=x.reduce((t,n)=>(t.found||(t.counted+=n.length/2,e<t.counted&&(t.areaCommand=n,t.found=!0)),t),{counted:0,found:!1}),r=x.indexOf(n.areaCommand),i=x.reduce((e,t,n)=>(n<r&&(e+=t.length/2),e),0),o=n.areaCommand,a=o.slice(o.length/2,o.length).reverse();t.connection.map(e=>a[e-i].raw).reverse().forEach((e,t)=>{if(0===t&&"C"===e.charAt(0)){const t=e.substring(1).split(","),n={x:0,y:0};[,,,,n.x,n.y]=t,c.push(`L${n.x},${n.y}`)}else c.push(e)})}else{const e=l[l.length-1],n=S?e.x:M,r=S?M:e.y;c.push(`L${n},${r}`);const i=S?t.first.x:M,o=S?M:t.first.y;c.push(`L${i},${o}`)}return c.push("Z"),{path:`M${c.join("").substring(1)}`,attrs:y,fill:ap({property:"fill",chart:e,connection:t.connection,attrs:y,selected:u,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,rtl:d}),key:v}})}({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:m,orientation:d,lineKey:o.lineKey,primary:o.primary,selected:g,connections:y,rtl:p,count:o.items.length,commands:S,isLineStacked:f});return h&&n.areas.push(...M),n},{lines:[],areas:[]}),M=[];return v.forEach(e=>M.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"})),h&&S.forEach(e=>M.push({type:"path",d:e.path,fill:e.fill,opacity:e.attrs.opacity})),M}var cp={require:["chart","renderer"],defaultSettings:{settings:{highlightArea:()=>!0,seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1,isLineStacked:!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:Qd({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=lp({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked});this.renderer.render(e)}),this.addListener("end",()=>{this.renderer.render([])})},render(){this.state.pathModel=Qd({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return lp({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,highlightArea:this.settings.settings.highlightArea(),isLineStacked:this.settings.settings.isLineStacked})},destroyed(){this.removeListeners()}};const up=()=>{const e=Y();return e.use(W),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",zd(e))};e.interaction("hammer",zd(Hammer))}(H)),e.use(_d),e.renderer("react-qcm",X),e.component("axis-title",K),e.component("disclaimer",G),e.component("scrollbar",vl),e.component("point-label",w),e.component("label-space",Gd),e.component("time-axis",cd.picassoComponents.timeAxis),e.component("axis-overlay",cd.picassoComponents.axisOverlay),e.component("reference-line-labels",Aa),e.component("box-sliced-hat",Kd),e.component("box-out-of-bounds",Ud),e.component("data-out-of-bounds-marker",Jd),e.component("scroll-hint",xo),e.component("brush-highlighter",cp),e.scale("time",cd.picassoScales.time),e.symbol("line-point",Zd),e},mp=e=>"[object Object]"===Object.prototype.toString.call(e),dp=e=>Array.isArray(e);function pp(e,t){if(e===t)return!0;if(dp(e)){if(!dp(t))return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!pp(e[n],t[n]))return!1;return!0}if(mp(e)){if(!mp(t))return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++){if(!Object.hasOwn(t,n[r]))return!1;if(!pp(e[n[r]],t[n[r]]))return!1}return!0}return e===t}function hp({enable:e=!0}={}){const t=a(),i=()=>Date.now().toString()+Math.random(),[o,s]=n(i()),l={properties:void 0};return r(()=>{if(!t||!t.getEffectiveProperties||!e)return()=>{};const n=()=>{t.getEffectiveProperties().then(e=>{const t=re(!0,{},e);if(!l.properties)return void(l.properties=t);const n=function(e,t){const n={properties:!1,exclude:!1};if(e===t)return n;const r=re(!0,{},e),i=re(!0,{},t);return n.exclude=!pp(r.qHyperCubeDef?.qLayoutExclude,i.qHyperCubeDef?.qLayoutExclude),delete r.qHyperCubeDef?.qLayoutExclude,delete i.qHyperCubeDef?.qLayoutExclude,n.properties=!pp(r,i),n}(l.properties,t);l.properties=t,n.exclude&&!n.properties&&s(i())})};return t.on("changed",n),n(),()=>{t.removeListener("changed",n)}},[e]),o}const fp={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},gp=e=>void 0===e.marker?fp.circle:fp[e.marker],yp=e=>void 0===e.markerFill||e.markerFill;function vp({series:e,layoutService:t}){switch(Mu(e)){case us.TYPE.MARKER:return(e=>({marker:gp(e),fill:yp(e)}))(e);case us.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);case us.TYPE.BAR:return{showAsZeros:!0};default:return{}}}function Sp(e=us.NOPE_SERIES,t=!0){return t?e.axis===us.AXIS.PRIMARY:e.axis===us.AXIS.PRIMARY||Mu(e)===us.TYPE.BAR}var Mp,Ep,xp,bp,Cp,Ap,Np,Op,Tp,Lp,Rp,Ip,kp,wp,Dp,qp,Pp,zp,$p,_p,Fp,Bp,Vp,jp,Up,Hp,Yp,Wp,Xp,Kp,Gp,Jp,Zp,Qp,eh,th,nh,rh,ih,oh,ah,sh,lh,ch,uh,mh,dh,ph,hh,fh,gh,yh,vh,Sh,Mh,Eh,xh,bh,Ch,Ah,Nh,Oh,Th,Lh,Rh,Ih,kh,wh,Dh,qh,Ph,zh,$h,_h,Fh,Bh,Vh,jh,Uh,Hh,Yh,Wh,Xh,Kh,Gh,Jh,Zh,Qh,ef,tf,nf,rf={exports:{}};function of(){if(Ep)return Mp;Ep=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return Mp={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function af(){if(bp)return xp;bp=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return xp=e}function sf(){return Cp||(Cp=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=of(),o=af(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let m=0;const d="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",i],[d,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=m++;o(e,i,t),u[e]=i,l[i]=t,c[i]=r,a[i]=new RegExp(t,n?"g":void 0),s[i]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),h("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${d}+`),h("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),h("FULL",`^${l[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),h("LOOSE",`^${l[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),h("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(rf,rf.exports)),rf.exports}function lf(){if(Np)return Ap;Np=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Ap=n=>n?"object"!=typeof n?e:n:t}function cf(){if(Tp)return Op;Tp=1;const e=/^[0-9]+$/,t=(t,n)=>{if("number"==typeof t&&"number"==typeof n)return t===n?0:t<n?-1:1;const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return Op={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function uf(){if(Rp)return Lp;Rp=1;const e=af(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=of(),{safeRe:r,t:i}=sf(),o=lf(),{compareIdentifiers:a}=cf();class s{constructor(a,l){if(l=o(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[i.LOOSE]:r[i.FULL]);if(!c)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=c[5]?c[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(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof s||(t=new s(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 r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,i)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,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?r[i.PRERELEASELOOSE]:r[i.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];if(!1===n&&(r=[t]),((e,t)=>{const n=t.split(".");if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(0!==a(e[t],n[t]))return!1;return!0})(this.prerelease,t)){const e=this.prerelease[t.split(".").length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Lp=s}function mf(){if(kp)return Ip;kp=1;const e=uf();return Ip=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}}}function df(){if(Gp)return Kp;Gp=1;const e=uf();return Kp=(t,n,r)=>new e(t,r).compare(new e(n,r))}function pf(){if(nh)return th;nh=1;const e=uf();return th=(t,n,r)=>{const i=new e(t,r),o=new e(n,r);return i.compare(o)||i.compareBuild(o)}}function hf(){if(lh)return sh;lh=1;const e=df();return sh=(t,n,r)=>e(t,n,r)>0}function ff(){if(uh)return ch;uh=1;const e=df();return ch=(t,n,r)=>e(t,n,r)<0}function gf(){if(dh)return mh;dh=1;const e=df();return mh=(t,n,r)=>0===e(t,n,r)}function yf(){if(hh)return ph;hh=1;const e=df();return ph=(t,n,r)=>0!==e(t,n,r)}function vf(){if(gh)return fh;gh=1;const e=df();return fh=(t,n,r)=>e(t,n,r)>=0}function Sf(){if(vh)return yh;vh=1;const e=df();return yh=(t,n,r)=>e(t,n,r)<=0}function Mf(){if(Mh)return Sh;Mh=1;const e=gf(),t=yf(),n=hf(),r=vf(),i=ff(),o=Sf();return Sh=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return i(a,l,c);case"<=":return o(a,l,c);default:throw new TypeError(`Invalid operator: ${s}`)}}}function Ef(){if(Th)return Oh;Th=1;const e=/\s+/g;class t{constructor(n,o){if(o=r(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(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&&y(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){e=e.replace(f,"");const t=((this.options.includePrerelease&&p)|(this.options.loose&&h))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,l=a?s[c.HYPHENRANGELOOSE]:s[c.HYPHENRANGE];e=e.replace(l,L(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[c.COMPARATORTRIM],u),o("comparator trim",e),e=e.replace(s[c.TILDETRIM],m),o("tilde trim",e),e=e.replace(s[c.CARETTRIM],d),o("caret trim",e);let y=e.split(" ").map(e=>S(e,this.options)).join(" ").split(/\s+/).map(e=>T(e,this.options));a&&(y=y.filter(e=>(o("loose invalid filter",e,this.options),!!e.match(s[c.COMPARATORLOOSE])))),o("range list",y);const v=new Map,M=y.map(e=>new i(e,this.options));for(const e of M){if(g(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const E=[...v.values()];return n.set(t,E),E}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(t=>v(t,n)&&e.set.some(e=>v(e,n)&&t.every(t=>e.every(e=>t.intersects(e,n)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}Oh=t;const n=new(Nh?Ah:(Nh=1,Ah=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}})),r=lf(),i=xf(),o=af(),a=uf(),{safeRe:s,src:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:m,caretTrimReplace:d}=sf(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:h}=of(),f=new RegExp(l[c.BUILD],"g"),g=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,v=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},S=(e,t)=>(e=e.replace(s[c.BUILD],""),o("comp",e,t),e=b(e,t),o("caret",e),e=E(e,t),o("tildes",e),e=A(e,t),o("xrange",e),e=O(e,t),o("stars",e),e),M=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{const n=t.loose?s[c.TILDELOOSE]:s[c.TILDE],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,i,a,s)=>{let l;return o("tilde",e,t,n,i,a,s),M(n)?l="":M(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:M(a)?l=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:s?(o("replaceTilde pr",s),l=`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`):l=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,o("tilde return",l),l})},b=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{o("caret",e,t);const n=t.loose?s[c.CARETLOOSE]:s[c.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),M(n)?l="":M(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:M(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l})},A=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map(e=>N(e,t)).join(" ")),N=(e,t)=>{e=e.trim();const n=t.loose?s[c.XRANGELOOSE]:s[c.XRANGE];return e.replace(n,(n,r,i,a,s,l)=>{if(o("xRange",e,n,r,i,a,s,l),((e,t,n)=>M(e)&&!M(t)||M(t)&&n&&!M(n))(i,a,s))return e;const c=M(i),u=c||M(a),m=u||M(s),d=m;return"="===r&&d&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(u&&(a=0),s=0,">"===r?(r=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):u?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:m&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n})},O=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[c.STAR],"")),T=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),L=e=>(t,n,r,i,o,a,s,l,c,u,m,d)=>`${n=M(r)?"":M(i)?`>=${r}.0.0${e?"-0":""}`:M(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=M(c)?"":M(u)?`<${+c+1}.0.0-0`:M(m)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${m}-${d}`:e?`<${c}.${u}.${+m+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return Oh}function xf(){if(Rh)return Lh;Rh=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}Lh=t;const n=lf(),{safeRe:r,t:i}=sf(),o=Mf(),a=af(),s=uf(),l=Ef();return Lh}function bf(){if(kh)return Ih;kh=1;const e=Ef();return Ih=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Ih}function Cf(){if(Vh)return Bh;Vh=1;const e=Ef();return Bh=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},Bh}function Af(){if(Uh)return jh;Uh=1;const e=uf(),t=xf(),{ANY:n}=t,r=Ef(),i=bf(),o=hf(),a=ff(),s=Sf(),l=vf();return jh=(c,u,m,d)=>{let p,h,f,g,y;switch(c=new e(c,d),u=new r(u,d),m){case">":p=o,h=s,f=a,g=">",y=">=";break;case"<":p=a,h=l,f=o,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(c,u,d))return!1;for(let e=0;e<u.set.length;++e){const r=u.set[e];let i=null,o=null;if(r.forEach(e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,o=o||e,p(e.semver,i.semver,d)?i=e:f(e.semver,o.semver,d)&&(o=e)}),i.operator===g||i.operator===y)return!1;if((!o.operator||o.operator===g)&&h(c,o.semver))return!1;if(o.operator===y&&f(c,o.semver))return!1}return!0},jh}var Nf=function(){if(nf)return tf;nf=1;const e=sf(),t=of(),n=uf(),r=cf(),i=mf(),o=function(){if(Dp)return wp;Dp=1;const e=mf();return wp=(t,n)=>{const r=e(t,n);return r?r.version:null}}(),a=function(){if(Pp)return qp;Pp=1;const e=mf();return qp=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null}}(),s=function(){if($p)return zp;$p=1;const e=uf();return zp=(t,n,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,o).version}catch(e){return null}}}(),l=function(){if(Fp)return _p;Fp=1;const e=mf();return _p=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),o=r.compare(i);if(0===o)return null;const a=o>0,s=a?r:i,l=a?i:r,c=!!s.prerelease.length;if(l.prerelease.length&&!c){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}const u=c?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"},_p}(),c=function(){if(Vp)return Bp;Vp=1;const e=uf();return Bp=(t,n)=>new e(t,n).major}(),u=function(){if(Up)return jp;Up=1;const e=uf();return jp=(t,n)=>new e(t,n).minor}(),m=function(){if(Yp)return Hp;Yp=1;const e=uf();return Hp=(t,n)=>new e(t,n).patch}(),d=function(){if(Xp)return Wp;Xp=1;const e=mf();return Wp=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null}}(),p=df(),h=function(){if(Zp)return Jp;Zp=1;const e=df();return Jp=(t,n,r)=>e(n,t,r)}(),f=function(){if(eh)return Qp;eh=1;const e=df();return Qp=(t,n)=>e(t,n,!0)}(),g=pf(),y=function(){if(ih)return rh;ih=1;const e=pf();return rh=(t,n)=>t.sort((t,r)=>e(t,r,n))}(),v=function(){if(ah)return oh;ah=1;const e=pf();return oh=(t,n)=>t.sort((t,r)=>e(r,t,n))}(),S=hf(),M=ff(),E=gf(),x=yf(),b=vf(),C=Sf(),A=Mf(),N=function(){if(xh)return Eh;xh=1;const e=uf(),t=mf(),{safeRe:n,t:r}=sf();return Eh=(i,o)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let a=null;if((o=o||{}).rtl){const e=o.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!a||a.index+a[0].length!==i.length);)a&&t.index+t[0].length===a.index+a[0].length||(a=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else a=i.match(o.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===a)return null;const s=a[2],l=a[3]||"0",c=a[4]||"0",u=o.includePrerelease&&a[5]?`-${a[5]}`:"",m=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${s}.${l}.${c}${u}${m}`,o)}}(),O=function(){if(Ch)return bh;Ch=1;const e=mf(),t=of(),n=uf(),r=(t,r)=>{const i=t instanceof n?t.version:t;return e(i,r)},i=(e,t)=>{if(o(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0}return e.format()},o=e=>e.startsWith("pre");return bh=(e,n,o)=>{if(!t.RELEASE_TYPES.includes(n))return null;const a=r(e,o);return a&&i(a,n)}}(),T=xf(),L=Ef(),R=bf(),I=function(){if(Dh)return wh;Dh=1;const e=Ef();return wh=(t,n)=>new e(t,n).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" ")),wh}(),k=function(){if(Ph)return qh;Ph=1;const e=uf(),t=Ef();return qh=(n,r,i)=>{let o=null,a=null,s=null;try{s=new t(r,i)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&-1!==a.compare(t)||(o=t,a=new e(o,i)))}),o},qh}(),w=function(){if($h)return zh;$h=1;const e=uf(),t=Ef();return zh=(n,r,i)=>{let o=null,a=null,s=null;try{s=new t(r,i)}catch(e){return null}return n.forEach(t=>{s.test(t)&&(o&&1!==a.compare(t)||(o=t,a=new e(o,i)))}),o},zh}(),D=function(){if(Fh)return _h;Fh=1;const e=uf(),t=Ef(),n=hf();return _h=(r,i)=>{r=new t(r,i);let o=new e("0.0.0");if(r.test(o))return o;if(o=new e("0.0.0-0"),r.test(o))return o;o=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let a=null;i.forEach(t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":a&&!n(r,a)||(a=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}),!a||o&&!n(o,a)||(o=a)}return o&&r.test(o)?o:null},_h}(),q=Cf(),P=Af(),z=function(){if(Yh)return Hh;Yh=1;const e=Af();return Hh=(t,n,r)=>e(t,n,">",r),Hh}(),$=function(){if(Xh)return Wh;Xh=1;const e=Af();return Wh=(t,n,r)=>e(t,n,"<",r),Wh}(),_=function(){if(Gh)return Kh;Gh=1;const e=Ef();return Kh=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r))}(),F=function(){if(Zh)return Jh;Zh=1;const e=bf(),t=df();return Jh=(n,r,i)=>{const o=[];let a=null,s=null;const l=n.sort((e,n)=>t(e,n,i));for(const t of l)e(t,r,i)?(s=t,a||(a=t)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);const c=[];for(const[e,t]of o)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),m="string"==typeof r.raw?r.raw:String(r);return u.length<m.length?u:r},Jh}(),B=function(){if(ef)return Qh;ef=1;const e=Ef(),t=xf(),{ANY:n}=t,r=bf(),i=df(),o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],s=(e,t,s)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=s.includePrerelease?o:a}if(1===t.length&&t[0].semver===n){if(s.includePrerelease)return!0;t=a}const u=new Set;let m,d,p,h,f,g,y;for(const t of e)">"===t.operator||">="===t.operator?m=l(m,t,s):"<"===t.operator||"<="===t.operator?d=c(d,t,s):u.add(t.semver);if(u.size>1)return null;if(m&&d){if(p=i(m.semver,d.semver,s),p>0)return null;if(0===p&&(">="!==m.operator||"<="!==d.operator))return null}for(const e of u){if(m&&!r(e,String(m),s))return null;if(d&&!r(e,String(d),s))return null;for(const n of t)if(!r(e,String(n),s))return!1;return!0}let v=!(!d||s.includePrerelease||!d.semver.prerelease.length)&&d.semver,S=!(!m||s.includePrerelease||!m.semver.prerelease.length)&&m.semver;v&&1===v.prerelease.length&&"<"===d.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(y=y||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,m)if(S&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===S.major&&e.semver.minor===S.minor&&e.semver.patch===S.patch&&(S=!1),">"===e.operator||">="===e.operator){if(h=l(m,e,s),h===e&&h!==m)return!1}else if(">="===m.operator&&!e.test(m.semver))return!1;if(d)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(f=c(d,e,s),f===e&&f!==d)return!1}else if("<="===d.operator&&!e.test(d.semver))return!1;if(!e.operator&&(d||m)&&0!==p)return!1}return!(m&&g&&!d&&0!==p||d&&y&&!m&&0!==p||S||v)},l=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=(e,t,n)=>{if(!e)return t;const r=i(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};return Qh=(t,n,r={})=>{if(t===n)return!0;t=new e(t,r),n=new e(n,r);let i=!1;e:for(const e of t.set){for(const t of n.set){const n=s(e,t,r);if(i=i||null!==n,n)continue e}if(i)return!1}return!0}}();return tf={parse:i,valid:o,clean:a,inc:s,diff:l,major:c,minor:u,patch:m,prerelease:d,compare:p,rcompare:h,compareLoose:f,compareBuild:g,sort:y,rsort:v,gt:S,lt:M,eq:E,neq:x,gte:b,lte:C,cmp:A,coerce:N,truncate:O,Comparator:T,Range:L,satisfies:R,toComparators:I,maxSatisfying:k,minSatisfying:w,minVersion:D,validRange:q,outside:P,gtr:z,ltr:$,intersects:_,simplifyRange:F,subset:B,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers}}(),Of=te(Nf),Tf={BAR_IN_SECONDARY_AXIS:"0.23.1"};const Lf=e=>!e||Of.lt(Of.coerce(e),Of.coerce(Tf.BAR_IN_SECONDARY_AXIS)),Rf=({layoutService:e})=>{const t=!Lf(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[us.TYPE.BAR]:0,[us.TYPE.LINE]:0,[us.TYPE.MARKER]:0};return({series:r=us.NOPE_SERIES},i)=>{const o=Sp(r,t),a=Mu(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?cs.SCALE.MINOR.PRIMARY:cs.SCALE.MINOR.SECONDARY,collection:o?cs.COLLECTION.PRIMARY:cs.COLLECTION.SECONDARY,options:vp({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter(e=>Mu(e)===t).length,i=n.filter(e=>e.isPrimary),o=n.filter(e=>!e.isPrimary),a=[!!i.length&&i[0],!!o.length&&o[0]].filter(e=>!!e),s=r(n,us.TYPE.BAR),l=r(i,us.TYPE.BAR),c=r(o,us.TYPE.BAR),u=e=>n.filter(t=>Mu(t)===e),m=u(us.TYPE.LINE).map(e=>Hl(cs.COMPONENT.POINT,e)),d=u(us.TYPE.MARKER).map(e=>({key:Hl(cs.COMPONENT.MARKER,e),type:e.options.marker})),p=d.map(e=>e.key),h=[];l>0&&h.push(`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`),c>0&&h.push(`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`);const f=[...h,...m,...p],{MINI_CHART:g}=cs.COMPONENT,y=u(us.TYPE.LINE).map(e=>Hl(g.LINE,e)),v=u(us.TYPE.MARKER).map(e=>Hl(g.MARKER,e)),S=e.meta.isContinuous?[`${g.BAR}-${us.AXIS.PRIMARY}`,`${g.BAR}-${us.AXIS.SECONDARY}`,...y,...v]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:m,markerComponentKeys:p,barComponentKeys:h,seriesComponentKeys:f,miniComponentKeys:S,markers:d},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:u,isPrimary:Sp}}},If=(e,t)=>e.filter(({series:e=us.NOPE_SERIES})=>Mu(e)===t),kf=({series:e=us.NOPE_SERIES})=>e.axis!==us.AXIS.SECONDARY,wf=({series:e=us.NOPE_SERIES})=>e.axis===us.AXIS.SECONDARY;function Df({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 qf({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(ve).then(e=>{const n=t.getHyperCubeValue("qMode"),r=t.getHyperCubeValue("qDimensionInfo"),i="K"===n&&r.length>1&&e[0]?.qIsReduced,o=e.slice(),a=t.getHyperCubeValue("qMeasureInfo"),s=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:o,qDimensionInfo:r.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[a[0],a[0]]:a.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:s}}})}(e,t,{path:"/qHyperCubeDef",rect:Df({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function Pf({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):qf({genericObjectModel:e,layoutService:t})}const zf=e=>"number"==typeof e&&!Number.isNaN(e);function $f({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map(e=>r[e.refIndex]),o=i.filter(e=>Mu(e.series)===us.TYPE.BAR),a=i.filter(e=>Mu(e.series)===us.TYPE.LINE),s=i.filter(e=>Mu(e.series)===us.TYPE.MARKER);return{min:Math.min(...i.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...i.filter(e=>zf(e.qMax)).map(e=>e.qMax)),bar:{min:Math.min(...o.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...o.filter(e=>zf(e.qMax)).map(e=>e.qMax))},line:{min:Math.min(...a.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...a.filter(e=>zf(e.qMax)).map(e=>e.qMax))},marker:{min:Math.min(...s.filter(e=>zf(e.qMin)).map(e=>e.qMin)),max:Math.max(...s.filter(e=>zf(e.qMax)).map(e=>e.qMax))}}}}function _f({seriesModel:e,isPrimary:t,type:n}){return function({dataPage:r}){const i=e.query.series(n).filter(e=>e.isPrimary===t).map(e=>e.refIndex),{qMatrix:o}=r,a={min:NaN,max:NaN};return o.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}),a.min=Number.isNaN(a.min)?t:Math.min(t,a.min),a.max=Number.isNaN(a.max)?n:Math.max(n,a.max)}),a}}function Ff({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r,isLineStacked:i}=t.meta,o=n.query.series(us.TYPE.BAR).filter(t=>t.isPrimary===e).length,a=n.query.series(us.TYPE.LINE).filter(t=>t.isPrimary===e).length,s=r&&o>=2,l=i&&a>=2;return s||l?function({isPrimary:e,layoutService:t,seriesModel:n,hasBarStacked:r,hasLineStacked:i}){const o=$f({isPrimary:e,layoutService:t,seriesModel:n}),a=r?_f({seriesModel:n,isPrimary:e,type:us.TYPE.BAR}):()=>({min:1/0,max:-1/0}),s=i?_f({seriesModel:n,isPrimary:e,type:us.TYPE.LINE}):()=>({min:1/0,max:-1/0});return function({dataPage:e}){const t=o({dataPage:e});r&&(t.bar=a({dataPage:e})),i&&(t.line=s({dataPage:e}));const n=[t.bar.min,t.line.min,t.marker.min].filter(e=>void 0!==e),l=[t.bar.max,t.line.max,t.marker.max].filter(e=>void 0!==e);return t.min=n.length?Math.min(...n):NaN,t.max=l.length?Math.max(...l):NaN,t}}({isPrimary:e,layoutService:t,seriesModel:n,hasBarStacked:s,hasLineStacked:l}):$f({isPrimary:e,layoutService:t,seriesModel:n})}function Bf({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=Ff({isPrimary:e,layoutService:n,seriesModel:i}),{isArea:s}=n.meta;return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:l,max:c}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=l,o.explicit.max=c,o.meta.hasExplicitMin=!Number.isNaN(l),o.meta.hasExplicitMax=!Number.isNaN(c),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then(e=>({dataPage:e[0]}))}({continuousModel:t,layoutService:n,reducedModel:r}).then(({dataPage:t})=>{const{min:n,max:r,bar:l,line:c,marker:u}=a({dataPage:t}),m=i.query.seriesByAxis(e).some(e=>Mu(e)===us.TYPE.BAR),d=i.query.seriesByAxis(e).some(e=>Mu(e)===us.TYPE.LINE),p=m||s&&d,h=Number((p?Math.min(n,0):n).toFixed(13)),f=Number((p?Math.max(r,0):r).toFixed(13)),g=Number((p?Math.min(l.min,0):l.min).toFixed(13)),y=Number((p?Math.max(l.max,0):l.max).toFixed(13)),v=Number((p?Math.min(c.min,0):c.min).toFixed(13)),S=Number((p?Math.max(c.max,0):c.max).toFixed(13)),M=Number((p?Math.min(u.min,0):u.min).toFixed(13)),E=Number((p?Math.max(u.max,0):u.max).toFixed(13));o.implicit.min=Number.isFinite(h)?h:0,o.implicit.max=Number.isFinite(f)?f:0,o.implicit.bar.min=Number.isFinite(g)?g:0,o.implicit.bar.max=Number.isFinite(y)?y:0,o.implicit.line.min=Number.isFinite(v)?v:0,o.implicit.line.max=Number.isFinite(S)?S:0,o.implicit.marker.min=Number.isFinite(M)?M:0,o.implicit.marker.max=Number.isFinite(E)?E: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 Vf({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 jf({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=lr().domain([e,t]);return r.nice(n),r}(e,t,n),a={start:!0,stop:!0};if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const Uf=50,Hf=100,Yf=200,Wf=125;function Xf({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return Uf;case 1:return Hf;case 2:return Yf;default:return e*Wf}})(t.getLayoutValue(`${e}.spacing`,1));return Math.max(1,Math.round(n/r))}function Kf({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=Xf({config:e,layoutService:n,size:o}),c=jf({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),m={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},d="horizontal"===r.meta.major.orientation?"height":"width",p=e=>i(e)[d],h=t.formatter(e.formatter),f=()=>{const e=m.ticks.map(h);return!e.some((t,n)=>e.indexOf(t)!==n)&&(e=>{const t=o/m.ticks.length;return Math.max(...e.map(p))<=t})(e)};for(let e=l-1;e>0&&!f();e--)c.domain([a,s]),c.nice(e),[m.roundedMin,m.roundedMax]=c.domain(),m.ticks=c.ticks(e);return m}function Gf({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function Jf({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function Zf({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=jf({min:r,max:i,count:10,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some(e=>0===e)}({ticks:s}),c=l?Gf:Jf;o.ticks=s.filter((e,t,n)=>c({tick:e,index:t,ticks:n}));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const u=t.formatter(e.formatter),m=o.ticks.map(u);return m.some((e,t)=>m.indexOf(e)!==t)&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function Qf({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 eg({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:m}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const c=Kf({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return Vf({extrema:i,ticks:c.ticks})?c:Zf({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),d=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({ticks:c,count:1});return{min:u,max:m,values:[...Qf({ticks:c,extrema:i}).map(e=>({value:e,isMinor:!1})),...d.map(e=>({value:e,isMinor:!0}))].sort((e,t)=>e.value-t.value)}}function tg({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:o});return eg({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function ng({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,c=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=Y.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){const r=n.component(t.meta.seriesComponentKeys[0]),i=r?.rect??e.meta.chart.size;return"horizontal"===e.meta.major.orientation?i.height:i.width}({chart:e,dockService:n,seriesModel:o}),u=r.query.getExtrema();return tg({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function rg({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return ge.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then(e=>({properties:e}))}({layout:t.getLayout(),model:e}).then(e=>{const{properties:t}=e??{};n.properties=t})}}}function ig({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:us.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===us.TYPE.LINE?2:t!==us.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==us.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function og({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function ag({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:c}){let u;const{theme:m,translator:d}=i,p={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return u=D({picasso:s,model:o,app:n,translator:d,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map(e=>e.color);return{theme:m,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:cs.SCALE.COLOR}},config:{auto:og,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>p.wrappedScales,legendComponents:()=>p.legendComponents,legendInteractions:()=>p.legendInteractions,updateLegend:t=>{const{components:n,interactions:o,scales:s}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,c={eventName:"legend-c",key:cs.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:ig({layoutService:n,seriesModel:r,colorService:o})},{components:u,interactions:m}=o.getLegend(c,{actions:a,navigationDisabled:!a.interact.enabled()}),d=o.getScales();return{components:u.filter(Boolean).map(e=>{const{layout:t}=e,{dock:n}=t,r=d[`${cs.SCALE.COLOR}Range`];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e}),interactions:m,scales:d}}({viewState:c,chart:r,environment:i,colorService:u,seriesModel:l,layoutService:a,actions:e,styleModel:t});p.wrappedScales=s,p.legendComponents=n,p.legendInteractions=o}}}),u}const sg="REJECTED",lg=()=>{},cg=2,ug=20,mg=200,dg=10;var pg={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),c=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-dg<=t.qTop,i=n.qLeft+n.qWidth+dg>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+dg>=t.qTop+t.qHeight,a=n.qLeft-dg<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var hg={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-dg<=t.qTop,i=n.qTop+n.qHeight+dg>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeStackData",args:[e,[t]]})}};var fg={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 gg="pages";const yg="discretePan";function vg({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:yg,pointers:1,threshold:10,enable(r,i){return this.started===yg||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some(e=>e.key===n)}},events:{[`${yg}start`](e){e.preventDefault(),this.started=yg;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},[`${yg}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${yg}end`](e){e.preventDefault(),this.started=!1},[`${yg}cancel`](e){e.preventDefault(),this.started=!1}}}}function Sg({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter(e=>e.key===t);if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function Mg({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(1e4/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(mg,n));return{width:e,height:Math.max(ug,Math.min(n*cg,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function Eg(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then(e=>{if(t.canceled||n)return t.reject(sg),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null})},i=e=>new Promise((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(sg),n=e})(a):r(a)});return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject(sg),n=null)},i}const xg={command:{update:()=>{}}};function bg({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=xg,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&c&&c();const u=r(l);return o(i(u)).then(n=>(s(n),e.add(n),t(n,l)))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:Mg({layoutService:r}),request:c({definitionPath:o}),process:Eg(n),connectionless:r.meta.isSnapshot,processDataPage:a}),m=T((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then(e=>n(e)).catch(e=>{if(e!==sg)throw e})},50);return function(e,{onProcessing:t=lg,onDataPage:n=lg}={}){m(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var Cg={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var Ag={inTotal:function({layoutService:e,getReducedCube:t}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const n=t();if(n){const[t]=b({qHyperCube:n},e.refs.dataPages);if(t)return t.qArea.qHeight}const[r]=e.getDataPages();if(r)return r.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function Ng(e){const{groupSize:t,measureCount:n}=e.meta;return t??n}function Og(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function Tg(e){return Og(e.qMatrix,e=>e[0].qElemNumber)-1}var Lg={inTotal:function({layoutService:e}){const t=Ng(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=Ng(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=Ng(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=Tg(o),c=o.qArea.qHeight*i+l,u=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const Rg=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function Ig(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return Rg(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n})(t.qMatrix,n);return r.successful?r.count:Rg(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return Rg(e,n);return Og(t.qMatrix.slice(0,r.qTop+1),e=>e[0].qElemNumber)-1}}}var kg={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=Ig(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:c}=n,u=Ig(t).area(e(),l,a.qArea),m=Tg(a),d=a.qArea.qHeight+m,p=c===o?(r.inView-d)*s/i:(c+(a.qArea.qTop+u)*s)/i;return[p,r.inView>=r.inTotal?p+1:p+d/r.inView]}};function wg({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:m,SQUEEZE:d,LABELLESS:p}=r[n.meta.chart.mode],h="horizontal"===n.meta.major.orientation,{axisDisplayMode:f="auto",maxVisibleItems:g=10,label:y}=s,v=h?t.width:t.height;if(!v||!Number.isFinite(v))return 0;const S=v/l>=d;switch(f){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);default:return c?v/p:S?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:m}=s.settings.settings.labels,{height:d}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return d>o;const p=(90-m)*(Math.PI/180);return d>Math.cos(p)*o}({chart:e,isHorizontal:h,axisKey:i,renderer:o,isGrouped:a,itemSize:d,label:y})?v/m:l:v/m}}function Dg({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:c,getReducedCube:u}){const{inTotal:m,area:d,scaleRange:p}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?Cg:n?r?Lg:kg:Ag}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,f=e=>e?h()/e:0,g=(e,t)=>-(e-t)*f(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=m({layoutService:r,getReducedCube:u});return{inTotal:l,inView:wg({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(1e4/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return f(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,g(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return g(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,Math.min(1,o+e/i)]}({viewSize:h(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=p({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:g(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=g(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*f(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(f(r)*n)}}}}function qg({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:m,viewState:d,rtl:p,getReducedCube: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 f=Dg({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:m,rtl:p,getReducedCube:h}),g=()=>{const e=f.getItems();return n.set("items",e),e},y=({pixelOffset:e,items:t})=>{const r=f.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},v=e=>{const t=Date.now(),r=g(),a=y({pixelOffset:e,items:r}),s=f.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every(n=>e[n]===t[n])})(s))return void((f.validate.offset({pixelOffset:e,items:r})||d.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:a.start,items:r})),d.preventSet("viewRange",f.getViewRange({pixelOffset:a.start.pixel,items:r})),d.set("scrollOffset",{start:a.start.item,end:a.end.item})));d.preventSet("viewRange",f.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:a.start,items:r})),d.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=g();n.set("itemSize",f.getItemSize({items:a}));const c=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=d.get("scrollOffset");if(void 0===n)return 1===t?f.getUpperBound({items:e}):0;if("number"==typeof n)return f.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return f.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),u=y({pixelOffset:c,items:a});d.preventSet("viewRange",f.getViewRange({pixelOffset:u.start.pixel,items:a}));const m=f.getArea({itemOffset:u.start.item,items:a});return new Promise(e=>{i(m,{onDataPage:()=>{n.set("scaleRange",f.getScaleRange({offsets:u.start,items:a})),d.preventSet("scrollOffset",{start:u.start.item,end:u.end.item}),e()}})})},scroll(e){const t=n.get("offsets").start.pixel+e;v(t)},scrollToRelative(e){const t=n.get("items"),r=f.convert.relativeToPixelOffset({relativeOffset:e,items:t});v(r)}}}function Pg({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:m,axisKey:d,renderer:p,areaBuffer:h,processDataPage:f=()=>{},getReducedCube:g=()=>{}}={}}){const y=N(),v=function({qMode:e}){switch(e){case"K":return hg;case"T":return fg;default:return pg}}({qMode:i.getHyperCubeValue("qMode")}),S=function({state:e,contains:t}){return e.set(gg,[]),{add:t=>{const n=e.get(gg);n.length=0,n.push(t)},getCurrent:()=>e.get(gg)[0],getAll:()=>e.get(gg),contains:n=>t(e.get(gg)[0],n)}}({state:y,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:S,composition:v});const M=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:h}),E=bg({dataStore:S,composition:v,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:u,processDataPage:f}),x=qg({chart:e,componentKey:n,state:y,dataStore:S,pageData:E,layoutService:i,dockService:o,itemWidths:s,getRect:m,axisKey:d,renderer:p,areaBuffer:M,viewState:l,rtl:c,getReducedCube:g}),C=function({layoutService:e,dataStore:t}){return function(n){const r=b(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:S}),A=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[vg({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:Sg({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:c,scroller:x});return{interactions:A,query:{getCanScroll:()=>x.enabled(),getItemSize:()=>x.itemSize(),getScaleRange:()=>x.scaleRange(),getCurrentDataPage:()=>S.getCurrent()},command:{initialize:()=>x.initialize(),scrollTo:e=>x.scrollToRelative(e),setSnapshotData:e=>C(e)}}}var zg={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 $g({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 _g({layoutService:e,dockService:t,themeService:n,colorService:r,flags:i}){const{BAR:o,LINE:a,POINT:s}=nc,l=n.getStyles(),c=(e=>!!e&&Of.gt(Of.coerce(e),Of.coerce("1.45.0")))(e.getLayoutValue("version"))&&i.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS"),u=$g({layoutService:e,key:"bar"}),m=$g({layoutService:e,key:"line"}),d=()=>{const e=u({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},p=t=>i.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find(e=>e.key===t):void 0,h=(e,t)=>{const n=r.getPaletteColor;if(e?.color&&n){const r=n(e);return"none"===r&&e.index>0?e?.color??t:r??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:()=>{const e=p("bar")?.bar?.label?.value;return{fill:h(e?.color,l.label.value.color),useContrastColor:e?.useContrastColor??!0,fontSize:e?.fontSize??12,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},line:{getCurveFn:()=>()=>m({property:"lineCurve",defaultValue:c?a.CURVE.MONOTONE:a.CURVE.LINEAR}),getStrokeWidthFn:()=>()=>m({property:"lineThickness",defaultValue:c?a.WIDTH.DEFAULT:"FULL"===t.meta.chart.mode?a.WIDTH.FULL.DEFAULT:a.WIDTH.LESS.DEFAULT}),getStrokeDasharrayFn:()=>()=>{const e=m({property:"lineType",defaultValue:a.TYPE.SOLID});return e&&a.TYPE[e.toUpperCase()]}},point:{getSize:()=>m({property:"dataPointSize",defaultValue:c?s.SIZE.NEW_DEFAULT:s.SIZE.DEFAULT}),label:{getStyle:()=>{const e=p("line")?.line?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},marker:{label:{getStyle:()=>{const e=p("marker")?.marker?.label?.value;return{fill:h(e?.color,l.label.value.color),fontSize:e?.fontSize??l.label.value.fontSize,fontFamily:e?.fontFamily??l.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{const e=p("axis")?.axis?.title;return{fontFamily:e?.fontFamily??l.axis.title.fontFamily,fontSize:e?.fontSize??l.axis.title.fontSize,color:h(e?.color,l.axis.title.color)}}},label:{getStyle:()=>{const e=p("axis")?.axis?.label?.name;return{fill:h(e?.color,l.axis.label.name.color),fontSize:e?.fontSize??l.axis.label.name.fontSize,fontFamily:e?.fontFamily??l.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{const e=p("legend")?.legend?.title;return{fontFamily:e?.fontFamily??l.legend.title.fontFamily,fontSize:e?.fontSize??l.legend.title.fontSize,color:h(e?.color,l.legend.title.color)}}},label:{getStyle:()=>{const e=p("legend")?.legend?.label;return{fontFamily:e?.fontFamily??l.legend.label.fontFamily,fontSize:e?.fontSize??l.legend.label.fontSize,color:h(e?.color,l.legend.label.color)}}}}}}}function Fg({layoutService:e}){return q({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanDataMeasure:!0,OnlyNanDataDimensionContinuous:!0}}})}function Bg({dataset:e,data:t,valueData:n}){const{source:r,label:i,value:o}=n,a=e(r.key).field(r.field);return de.shouldUseFormat(a.raw())?"-"===i||""===o||Number.isNaN(o)||"NaN"===o||t.null?.value?"-":a.formatter()(o):i}function Vg({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,layoutService:l,propertiesModel:c,custom:u}){const m=s.getStyles(),{isLineStacked:d}=l.meta,p=({data:e})=>e.major.value,h=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:f}=cs.COMPONENT,{PRIMARY:g,SECONDARY:y}=us.AXIS,v=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=cs.COMPONENT,{PRIMARY:a,SECONDARY:s}=us.AXIS,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[m]=t,{triggerer:d}=l,p=d===n.MAJOR?m.data.value:m.data.major.value;if(c){const t=e.findShapes("container").find(e=>(e.key===`${o}-max-${a}`||e.key===`${o}-max-${s}`)&&e.data&&e.data.value===p&&e.children.length);if(t)return{key:t.key,bounds:t.bounds}}const h=e.findShapes("path").find(e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===`${i}-max`)&&e.data.major.value===p);if(c&&h)return{key:h.key,bounds:h.bounds};const f=e.findShapes("path").find(e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===`${i}-min`)&&e.data.major.value===p),g=e.findShapes("*").filter(e=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===p);if(c&&f&&!g.find(e=>e.data.end?.source?.field!==f.data.end?.source?.field)&&!g.find(e=>e.data.segment?.source?.field!==f.data.source?.field))return{key:f.key,bounds:f.bounds};const y=h||f;return!(c||!y||g.find(e=>e.data.end?.source?.field!==y.data.end?.source?.field)||g.find(e=>e.data.segment?.source?.field!==y.data.source?.field))&&{key:y.key,bounds:y.bounds}},"collectible"]}({dockService:i,seriesModel:o});return P({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:m.fontFamily},main:{key:cs.COMPONENT.TOOLTIP,getGroupByValue:p,collectibles:[...o.meta.barComponentKeys.map(e=>({key:e,type:"bar",major:p})),...o.meta.pointComponentKeys.map(e=>({key:e,type:"point",major:p})),...o.meta.markers.map(e=>({key:e.key,type:e.type,major:p}))],triggers:[{keys:[cs.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:h},placement:v},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${f}-max-${g}`,`${f}-max-${y}`,`${f}-min-${g}`,`${f}-min-${y}`,`${cs.COMPONENT.BAR_OOB}-max-${g}`,`${cs.COMPONENT.BAR_OOB}-max-${y}`,`${cs.COMPONENT.BAR_OOB}-min-${g}`,`${cs.COMPONENT.BAR_OOB}-min-${y}`,`${cs.COMPONENT.DATA_OOB_MARKER}-max`,`${cs.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:p,filter:h},placement:v},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:p,filter:h},placement:v}],section:({h:e,nodes:t,dataset:n,create:r,util:i})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(r.text({value:a,style:{bold:!0}})),s&&c.push(r.text({value:s}));const m=u.hideBasic();m&&!l.length&&(a||s)||c.push(r.text({value:o.data.label,style:{bold:!0}})),m||(c.push(r.color({nodes:t,property:cs.SCALE.COLOR})),c.push(...t.map(e=>{const{segment:t,end:o,point:a}=e.data,s=e.key.includes("point-component")&&d?a:t||o,{key:l,field:c}=s.source;return r.measure({label:i.dataset.title(l,c),value:Bg({dataset:n,data:e.data,valueData:s})})}))),l&&c.push(...l.map(e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}}))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(r.raw({value:u.chart.createLimitationRow()}))):c.push(r.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:p}=o.data;return u.isEnabled()&&p&&c.push(...p.map(t=>r.raw({value:u.createImageRow({value:t,h:e})}))),c},layout:{grouping:!0,single:()=>!(!u.isEnabled()||!u.hasImages())||u.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>u.isEnabled()&&u.hasImages()?u.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{u.chart.isEnabled()&&!u.chart.hasLimitation()&&u.chart.show({nodes:e,properties:c.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:cs.COMPONENT.LEGEND_TOOLTIP,component:cs.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:jg}=cd,Ug=({picasso:e,chart:t,environment:p,flags:h,viewState:f,viewCache:g,actions:y,selectionService:v})=>{const S=s(),{width:M,height:E}=i(),[x,C]=n(),[A,N]=n(),O=a(),T=l(),L=c(),R=u(),I=m(),k=hp({enable:!1===x?.layoutService?.meta?.isSnapshot}),w=d();r(()=>{if(!(S&&t?.update&&p&&f&&v))return;const n=z({source:S,metaAdditionsFn:function({layout:e}){const t=b(e,"qHyperCube.qMeasureInfo",[]),n=If(t,us.TYPE.LINE),r=n.length>0,i=ge.continuous({layout:e,auto:()=>r&&ce.isTime(!0,e)}),o=!Lf(b(e,"version","")),a=If(t,us.TYPE.BAR),s=a.length,l=a.filter(kf).length,c=a.filter(wf).length,u=o?l>1||c>1:s>1,m=("grouped"!==b(e,"barGrouping.grouping")||i)&&u,d=!m&&s>1,p=o&&m&&(l>0&&c>1||l>1&&c>0),h=!!e?.qHyperCube?.qDimensionInfo?.[0]?.qLocked,f=!("area"!==e?.lineType),g=n.filter(kf).length>1||n.filter(wf).length>1,y=f&&e.stackedArea&&g;return{canBeContinuous:ce.canBeContinuous(e),isDiscrete:!i,isContinuous:i,isTime:ce.isTime(i,e),isSnapshot:ge.snapshot(e),isBarSeriesStacked:m,isBarSeriesGrouped:d,isBarSeriesStackedInBothAxis:p,isGrouped:d||p,isGroupedByMeasure:d||p,isDimensionLocked:h,groupSize:p?2:s,hasLineSeries:r,isArea:f,isLineStacked:y}},experimental:{filter:!0}}),{options:r,translator:i}=p,{direction:o}=r,a="rtl"===o,s=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=Pf({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then(({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)}),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:O,layoutService:n}),l=$({app:T,translator:i}),c=_({chart:t,layoutService:n,config:{logicalSize:{width:M,height:E},rtl:a},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),u=Rf({layoutService:n}),m=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return Pg({chart:e,actions:s,componentKey:ud(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:zg,options:{axisKey:cs.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:O,layoutService:n,dockService:c,seriesModel:u,viewState:f,rtl:"rtl"===p.options.direction,actions:y,picasso:e}):void 0,d=n.meta.isContinuous?jg({model:O,layoutService:n,viewState:f,viewCache:g}):void 0,x=F({theme:p.theme,config:{id:"comboChart",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),A=ag({actions:y,appLayoutModel:L,appModel:T,chart:t,environment:p,genericObjectModel:O,layoutService:n,picasso:e,seriesModel:u,viewState:f}),N=_g({layoutService:n,dockService:c,themeService:x,colorService:A,flags:h}),k=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map(e=>e.ref),minorsSecondary:t.meta.secondarySeries.map(e=>e.ref)},virtuals:n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0}}({layoutService:n,seriesModel:u}),w=Bf({isPrimary:!0,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:d}),D=Bf({isPrimary:!1,layoutService:n,reducedModel:s,seriesModel:u,continuousModel:d}),q=Fg({layoutService:n}),P=ng({config:{measureAxesRef:"measureAxes.0",formatter:cs.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:w,dockService:c,seriesModel:u,themeService:x}),V=ng({config:{measureAxesRef:"measureAxes.1",formatter:cs.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:D,dockService:c,seriesModel:u,themeService:x}),j=rg({genericObjectModel:O,layoutService:n}),U=Rs({flags:h,layout:S,app:T,model:O,picasso:e,chart:t,translator:i,localeInfo:L.qLocaleInfo,embed:I,options:r}),H=Vg({chart:t,actions:y,translator:i,rtl:a,dockService:c,seriesModel:u,colorService:A,themeService:x,layoutService:n,propertiesModel:j,custom:U}),Y=$a({layoutService:n,discreteModel:m}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:cs.SCALE.MAJOR,MAJOR_INNER:cs.SCALE.MAJOR_INNER,MINOR:{PRIMARY:cs.SCALE.MINOR.PRIMARY,SECONDARY:cs.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${cs.COMPONENT.BAR}-${us.AXIS.PRIMARY}`,BAR_SECONDARY:`${cs.COMPONENT.BAR}-${us.AXIS.SECONDARY}`,AXIS:{MAJOR:cs.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:cs.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:cs.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:cs.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:cs.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:cs.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:cs.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:cs.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:cs.COLLECTION.MAIN}}}}(n),X=B({picassoInstance:e,plugins:R,pluginArgs:W}),K=function({options:e,viewCache:t,layoutService:n}){const r={hasSlicedHats:!1,isPartialUpdating:!1,isSizeChanging:!1};return{enabled:()=>!(!1===e.chartAnimations||r.hasSlicedHats||r.isPartialUpdating||r.isSizeChanging||Ta.propertiesHaveChanged({viewCache:t,layout:n.getLayout()})),meta:r}}({options:r,viewCache:g,layoutService:n});C({alternativeService:l,selectionService:v,genericObjectModel:O,appModel:T,dockService:c,styleModel:N,layoutService:n,fieldModel:k,seriesModel:u,reducedModel:s,primaryExtremumModel:w,secondaryExtremumModel:D,primaryTickModel:P,secondaryTickModel:V,propertiesModel:j,colorService:A,themeService:x,appLayoutModel:L,tooltipService:H,disclaimerService:q,flags:h,...m&&{discreteModel:m},...d&&{continuousModel:d},refLineModel:Y,pluginService:X,animationsModel:K})},[S,O,T,L,p,t?.update,f,v]);const[,D]=o(()=>{if(!x)return Promise.resolve();const{alternativeService:e,layoutService:t,colorService:n,reducedModel:r,primaryExtremumModel:i,secondaryExtremumModel:o,propertiesModel:a,continuousModel:s,discreteModel:l,pluginService:c,disclaimerService:u,styleModel:m}=x,d=s?()=>{s.update(t.getLayout());const e=s.initialFetch(),n=!t.meta.isSnapshot&&p?.options?.viewState?.zoom;return n&&f.preventSet("zoom",n),e}:()=>Promise.resolve(),h=n.initialize().then(()=>{const e=n.getSettings().field;v&&v.setBrushAliases({colorField:e}),n.custom.updateLegend(m)});return Promise.all([c.initialize(),r.command.initialize(),O?a.command.initialize():Promise.resolve(),h,d(),y.scroll.attachDiscreteModel(l)]).then(async()=>{let n;if(t.meta.isSnapshot||(n=a.query.getProperties()),n?.qHyperCubeDef){const e=re(!0,{},n),r=(({properties:e,layout:t,model:n,layoutService:r})=>{const i=t.qHyperCube.qMeasureInfo,o=re(!0,{},e);return((e,t)=>{const{color:{mode:n}}=t;"byExpression"===n&&0===e.length?t.color.mode="primary":"byDimension"===n&&e.length>1&&(t.color.mode="byMultiple")})(i,e),n.colorSupport?.colorByUpdater?.(e,"qHyperCubeDef.",t),function({properties:e,layoutService:t}){const{filteredFields:n}=t.meta;if(!(n.measures.length>0))return;const{mode:r}=e.color||{};if("byExpression"===r){const r=t.getLayout();if("colorByExpression"===r.qHyperCube.qMeasureInfo?.[0]?.qAttrExprInfo?.[0]?.id)return;const{current:i,target:o}=function({properties:e,filtered:t}){const{qMeasures:n}=e.qHyperCubeDef||[],{current:r,target:i}=n.reduce((e,n,r)=>("colorByExpression"===n.qAttributeExpressions[0]?.id&&(e.current=r),void 0!==e.target||t.includes(r)||(e.target=r),e),{current:void 0,target:void 0});return{current:r,target:i}}({properties:e,filtered:n.measures});if(void 0===i)return;const a=e.qHyperCubeDef.qMeasures[i].qAttributeExpressions[0];e.qHyperCubeDef.qMeasures[i].qAttributeExpressions.splice(0,1),e.qHyperCubeDef.qMeasures[o].qAttributeExpressions.splice(0,0,a)}}({properties:e,layoutService:r}),!Lo.compare(o,e,!0)&&JSON.stringify(o)!==JSON.stringify(e)&&(e.hash=Math.random(),!0)})({properties:n,layout:t.getLayout(),model:O,layoutService:t});if(r)return(e=>!(!e||e.qHasSoftPatches||e.qExtendsId||!((e.qMeta?.privileges||[]).indexOf("update")>-1)))(S)?(await O.setProperties(n),T.clearUndoBuffer()):await((e,t,n)=>{if(!e)return Promise.resolve();let r=Lo.generate(t,n);return re(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(r,!0)):Promise.resolve()})(O,e,n),void w.pending();w.restore()}return Promise.all([i.command.initialize(),o.command.initialize()]).then(async()=>{await e.initialize({properties:a.query.getProperties()||{}}),u.initialize(),N({...x})})})},[x,k]);if(D)throw D;return A};const Hg={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 Yg={query:{getCanScroll:()=>!0}};function Wg({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function Xg({setSelectionInfo:e,event:t,components:n,clear:r}){const i=n?.length?n.map(e=>e.key).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===cs.COMPONENT.LEGEND_CATEGORICAL}),r()}function Kg({chart:e,actions:t}){const i=M(),o=s(),[a,l]=n();return r(()=>{if(!e?.update||!e.scale)return null;const n=e.scale(cs.SCALE.MAJOR),r=j({chart:e,actions:t,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:Wg},selectionEvents:{start:Xg}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}},[i,e?.update,e?.scale]),r(()=>{a?.setLayout&&o&&a.setLayout(o)},[o]),a}const Gg={version:"1.46.0",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},lineType:"line",stackedArea:!1,separateStacking:!0,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 Jg=e=>t=>{const n=t.qHyperCubeDef.qMeasures,{lineType:r}=t,i=[0,0,0];let o;const a="area"===r?["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Area","Visualizations.Descriptions.ComboChart.Dimension.AreaMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarArea","Visualizations.Descriptions.ComboChart.Dimension.BarAreaMarker"]:["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"];if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)o=Mu(n[e].qDef.series),o===us.TYPE.BAR?i[0]=1:o===us.TYPE.LINE?i[1]=1:i[2]=1;const s=a[parseInt(i.join(""),2)-1];return e.get(s)},Zg=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===us.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===us.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function Qg(e){const t=e.qHyperCubeDef.qMeasures,n=e.color?.mode;"byDimension"===n&&1===t.length&&Mu(t[0].qDef?.series)===us.TYPE.LINE?e.color.mode="primary":"byDimension"===n&&t.length>1&&(e.color.mode="byMultiple")}function ey(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:Jg(t),added(e,t){Cs.addCallbackCustomTooltip(t)},moved(e,t){Cs.moveCallbackCustomTooltip(t,e)},removed(e,t){Cs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){Cs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:Zg(t),added({qDef:e},t){Qg(t),e.series?.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:us.TYPE.LINE,axis:us.AXIS.SECONDARY}:e.series={type:us.TYPE.BAR,axis:us.AXIS.PRIMARY})},moved(e,t){Qg(t)}}}}function ty(e){const t=ey(e);return{properties:Gg,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=J.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach(e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)});const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&re(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>J.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const ny=({models:e,chart:t,viewState:n})=>{E(r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:m}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:u,h:m}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,cs.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),c.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then(e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}}).catch(()=>{}))}),x(()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:ye(t,cs.COMPONENT.LEGEND_CATEGORICAL)}}}),[n,t])};const ry=e=>7005!==e.qError?.qErrorCode,iy=e=>void 0===e?.qHyperCube?.qMeasureInfo?[]:e?.qHyperCube?.qMeasureInfo.filter(e=>ry(e)),oy=e=>(e=>e.qHyperCube.qDimensionInfo.filter(e=>ry(e)))(e).length&&iy(e).length,ay=e=>{const t=iy(e).some(({series:e=us.NOPE_SERIES})=>Mu(e)===us.TYPE.LINE);return ge.continuous({layout:e,auto:()=>t&&ce.isTime(!0,e)})},sy=(e,t,n)=>{const r=n||0;return iy(e?e.layout:t.layout).filter(e=>{const{series:t}=e||{};return 0===r?Sp(t,!0):!Sp(t,!0)})},ly=(e,t)=>{const n=sy(e,t,0).filter(e=>e.series.type===us.TYPE.BAR),r=sy(e,t,1).filter(e=>e.series.type===us.TYPE.BAR),i="stacked"===b(t.layout,"barGrouping.grouping");return!ge.continuous({layout:t.layout})&&i&&(n.length>1||r.length>1)},cy=(e,t,n,r,i=void 0)=>{const o=`${t}.fontFamily`,a=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(a),defaultValue:()=>i??n.getDefaultValue(a)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function uy(e,t,n){const r=U({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: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)=>!ay(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:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:{...cy("bar.label.value","label.value",r,t,"12px"),contrastColor:{component:"checkbox",type:"boolean",ref:"bar.label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:e?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")?8: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:e?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")?3: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:e?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")?"monotone":"linear",schemaIgnore:!0}}}}},labelValueSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:cy("line.label.value","label.value",r,t)}}}:void 0}},markerSection:{translation:"Visualizations.Descriptions.Markers",component:"accordion",items:{labelValueSection:{translation:"properties.dataPoints.markerlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"marker",items:cy("marker.label.value","label.value",r,t)}}}}},axisTitleSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:cy("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:e?.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:cy("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:cy("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:e?.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:cy("legend.label","legend.label",r,t)}}}:void 0}}}const my={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)=>!ay(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 dy(e){return!!e.qDef?.color?.on}function py(e){return dy(e)&&"primary"===(e.qDef?.color?.mode??"primary")}function hy(e){return dy(e)&&"byExpression"===e.qDef?.color?.mode}function fy(e){if(e?.color?.auto||"byExpression"!==e?.color?.mode)return[];const t=e?.color?.colorExpression;return t?[{qExpression:t,label:e?.color?.expressionLabel??"",id:"colorByExpression"}]:[]}function gy(e){return hy(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function yy(e){(e?.qHyperCubeDef?.qMeasures??[]).forEach((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...fy(n),...gy(e)]:gy(e)}(t,n,e))}function vy(e){const t={type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Chart.Measures.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},n={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||ay(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},r={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show:e=>Mu(e.qDef?.series)===us.TYPE.MARKER},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show:e=>Mu(e.qDef?.series)===us.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)=>dy(...e)},a=e.anything?.sense?.theme;return{type:"items",items:{series:{type:"items",items:{visibilityCondition:t,supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>n.measureTitle?.(),component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:n,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:r,seriesMarkerFill:i}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:o,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{const{primary:e}=a.getDataColorSpecials(),t=a.getDataColorPickerPalettes()[0]?.colors,n=t.indexOf(e);return{index:-1===n?Math.min(6,t.length-1):n}},show:py},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:hy}}}}}}}}}}}}const Sy=10,My=!0,Ey=({series:e=us.NOPE_SERIES})=>e.axis!==us.AXIS.SECONDARY,xy=({series:e=us.NOPE_SERIES})=>e.axis===us.AXIS.SECONDARY;function by(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map(e=>e.qDef)}function Cy(e){return iy(e).filter(e=>Mu(e.series)===us.TYPE.LINE).length>0}const Ay=(e,t,n)=>{const r=iy(n.layout).filter(e=>Mu(e.series)===us.TYPE.LINE),i=r.filter(Ey).length>1||r.filter(xy).length>1;return"area"===e.lineType&&by(e,t).length>0&&i};function Ny(e,t){const n=iy(e).filter(e=>Mu(e.series)===us.TYPE.BAR);return n.filter(e=>e.series.axis!==us.AXIS.SECONDARY).length>t||n.filter(e=>e.series.axis===us.AXIS.SECONDARY).length>t}function Oy(e){return iy(e).filter(e=>Mu(e.series)===us.TYPE.MARKER).length>0}const Ty=(e,t,n,r)=>{const i="vertical"===e.layout.orientation||ay(e.layout)?"y":"x",o=sy(e,t,r).map(e=>e.qFallbackTitle);let a;return a=o.length?n.get(`properties.${i}AxisWithInfo`,[o.join(",")]):n.get(`properties.${i}Axis`),a};function Ly(e){const{translator:t,flags:n,anything:r}=e,i=e?.anything?.sense?.theme,o=e?.anything?.sense?.isUnsupportedFeature?.("continuousData"),a={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>yy(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>dy(e))}}},s=e=>e.qHyperCubeDef.qMeasures.some(e=>dy(e)),l=(e,t)=>0!==e.filter(e=>e.series.axis===t).length,c={items:{disclaimer:{show:(e,t)=>s(e),reset:e=>{e.qHyperCubeDef.qMeasures.forEach(e=>{var t;b(t=e,"qDef.color.on",void 0)&&C(t,"qDef.color.on",!1)})}},simpleItems:{show:(e,t)=>!s(e)}}},u={items:{labels:{items:{header:{show:(e,t)=>oy(t.layout)},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t,n)=>oy(n.layout)&&Ny(n.layout,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t,n)=>oy(n.layout)&&Cy(n.layout),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,i){i.dataPoint.showLineLabels=e,i.dataPoint.show=e}},reset(e){C(e,"dataPoint.show",!1),C(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:(e,t)=>oy(t.layout),convertFunctions:{get:(e,t,n,r)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,n,r)=>t.get(sy(n,r,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t,n)=>oy(n.layout)&&sy(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,i){i.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&sy(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,i){i.measureAxes[1].show=e?"labels":"all"}}}}}}},m={uses:"settings",items:{simpleStyling:my,simpleLabels:u,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:uy(n,i,t),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)=>Ny(n.layout,1)&&!ay(n.layout)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",defaultValue:"line",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:(e,t,n)=>Cy(n.layout)},stackedProps:{type:"items",grouped:!1,items:{stackedArea:{ref:"stackedArea",translation:"properties.style.stackedArea",type:"boolean",defaultValue:!1,show:(e,t,n)=>Ay(e,t,n)},separateStacking:{ref:"separateStacking",translation:"properties.separateStacking",type:"boolean",defaultValue:!0,readOnly:e=>!e.stackedArea,show:(e,t,n)=>Ay(e,t,n)}}},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)=>ay(n.layout),convertFunctions:(d="vertical",{get:(e,t,n)=>ay(n.layout)?d:e(t.type),set(e,t,n,r){t(n.type,ay(r.layout)?d:e,d)}})},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)=>!ay(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)=>Cy(n.layout)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint",show:e=>Cy(e)},show:(e,t,n)=>Cy(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=>Ny(e,0)},show:(e,t,n)=>Ny(n.layout,0),items:{showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t,n)=>Ny(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&&ly(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&&ly(t,n)}}},showMarkerLabels:{ref:"dataPoint.showMarkerLabels",type:"boolean",translation:"properties.dataPoints.markerlabelmode",component:"switch",snapshot:{tid:"property-markerLabels",show:e=>Oy(e)},show:(e,t,n)=>Oy(n.layout),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridLineAxis:{ref:"gridLine.axis",type:"integer",component:"dropdown",defaultValue:0,options(e,t,n){const r=[],i=n.layout.qHyperCube.qMeasureInfo,o=l(i,0),a=l(i,1);return o&&r.push({translation:"properties.axis.primary",value:0}),a&&r.push({translation:"properties.axis.secondary",value:1}),r},show:(e,t,n)=>e.gridLine&&!e.gridLine.auto&&0!==n.layout.qHyperCube.qMeasureInfo.length,convertFunctions:{get(e,t,n,r){const i=r.gridLine.axis??0,o=n.layout.qHyperCube.qMeasureInfo,a=l(o,0),s=l(o,1);return 0===i&&!a&&s?(C(r,"gridLine.axis",1),1):1===i&&a&&!s?(C(r,"gridLine.axis",0),0):i}}},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:a,simpleColors:c,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,n){const r="vertical"===n.layout.orientation||ay(n.layout)?"x":"y",i=by(e,n).map(e=>e.qFallbackTitle||"").join(", ");let o;return o=i?t.get(`properties.${r}AxisWithInfo`,[i]):t.get(`properties.${r}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||ay(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},label:{options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!ay(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:Sy,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=Sy:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!o}},measureAxis:{uses:"axis.measureAxis",label:(e,n,r)=>Ty(n,r,t,0),show:(e,t,n)=>sy(t,n,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,r)=>Ty(n,r,t,0),show:(e,t,n)=>sy(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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&Sp(e?.series,My))}},dock:{ref:"measureAxes.0.dock",show:(e,t,n)=>"none"!==e.measureAxes[0].show&&sy(t,n,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||ay(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t,n)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&sy(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)=>sy(t,n,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=r?.measureAxes[0]||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(C(i,"measureAxes.0.autoMinMax",!1),C(i,"measureAxes.0.minMax","min"),C(i,"measureAxes.0.min",0)):C(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,n,r)=>Ty(n,r,t,1),show:(e,t,n)=>sy(t,n,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,n,r)=>Ty(n,r,t,1),show:(e,t,n)=>sy(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=>(e?.qHyperCube?.qMeasureInfo||[]).some(e=>e?.series&&!Sp(e?.series,My))}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t,n)=>"none"!==e.measureAxes[1].show&&sy(t,n,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||ay(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t,n)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&sy(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)=>sy(t,n,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=r?.measureAxes[1]||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(C(i,"measureAxes.1.autoMinMax",!1),C(i,"measureAxes.1.minMax","min"),C(i,"measureAxes.1.min",0)):C(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var d;const p={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){if(r?.sense?.isUnsupportedFeature?.("includeZeroValues"))return!1;return!ay(n.layout)}}}},measures:{items:{measureDefinition:vy(e)}}}};return{type:"items",component:"accordion",items:{data:p,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=>Sp(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,My)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some(e=>!Sp(e.qDef.series,t))}(e.qHyperCubeDef.qMeasures,My)},dimRefLines:{uses:"dimReflines"},plugins:os({translator:t,pluginOptions:[{value:"point",translation:t.get("Visualizations.Descriptions.Point")},{value:"line",translation:t.get("Visualizations.Descriptions.Line")}],supportNewStyles:n?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS")})}};return e})(),settings:m}}}function Ry(e,t){return iy(t).filter(e=>Mu(e.series)===us.TYPE.LINE).length>0}function Iy(){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)=>Ry(0,t)||!ay(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)=>function(e,t,n){const r=iy(t).filter(e=>Mu(e.series)===us.TYPE.BAR);return n?r.filter(e=>e.series.axis===us.AXIS.PRIMARY).length>1||r.filter(e=>e.series.axis===us.AXIS.SECONDARY).length>1:r.length>1}(0,t,!Lf(e?.version??""))&&!ay(t)},lineType:{ref:"lineType",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"line_chart_area",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.area",value:"area"}],show:(e,t)=>Ry(0,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)=>!ay(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,t)=>Ry(0,t)&&iy(t).length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:(e,t)=>Ry(0,t)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some(e=>dy(e))}}}}}}const ky={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 wy(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=ky[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function Dy(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});wy(r,o,t,n,"bar"),wy(r,o,t,n,"line"),wy(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function qy(e){const t={},{tooltip:n}=e;if(n){t.chart_tooltip_custom=!n.auto;const e=n.chart?.object?.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const Py=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function zy(e){return{definition:Ly(e),softDefinition:Iy(),support:{snapshot:Py,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:Dy,extendMetrics:qy,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=J.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:ey(e),defaultPropertyValues:a,hypercubePath:i,extension:r});!function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach(e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)});const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&re(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),yy(e.qProperty)}(s,0,t);const l=s.qProperty;return J.conditionalShow.unquarantine(l),J.conditionalShow.unquarantineAlternative(l),s},exportProperties:(e,t,n)=>{J.conditionalShow.quarantine(e.qProperty),J.conditionalShow.quarantineAlternative(e.qProperty),function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach(e=>{e.qAttributeExpressions=[]})}(e);return J.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:(function(e){e.qHyperCubeDef.qDimensions.forEach(Ot),e.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions&&e.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.forEach(Ot)}(e),function(e){return Lf(e.version)&&(e.qHyperCubeDef.qMeasures.forEach(e=>{const{qDef:t}=e;void 0===t.series&&(t.series=us.NOPE_SERIES),void 0===t.series.type&&(t.series.type=us.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===us.TYPE.BAR?us.AXIS.PRIMARY:us.AXIS.SECONDARY),t.series.type===us.TYPE.BAR&&t.series.axis===us.AXIS.SECONDARY&&(t.series.axis=us.AXIS.PRIMARY)}),e.version=Tf.BAR_IN_SECONDARY_AXIS),e}(e))}}}}}});
|