@orbcharts/plugins-basic 3.0.0-beta.15 → 3.0.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +200 -200
- package/dist/orbcharts-plugins-basic.es.js +11839 -10485
- package/dist/orbcharts-plugins-basic.umd.js +231 -171
- package/dist/{orbcharts-plugins-basic/src → src}/base/BaseBars.d.ts +3 -3
- package/dist/{orbcharts-plugins-basic/src → src}/base/BaseBarsTriangle.d.ts +3 -3
- package/dist/{orbcharts-plugins-basic/src → src}/base/BaseDots.d.ts +3 -3
- package/dist/{orbcharts-plugins-basic/src → src}/base/BaseLineAreas.d.ts +3 -3
- package/dist/{orbcharts-plugins-basic/src → src}/base/BaseLines.d.ts +3 -3
- package/dist/src/base/BaseRacingBars.d.ts +23 -0
- package/dist/src/base/BaseRacingLabels.d.ts +20 -0
- package/dist/src/base/BaseRacingValueLabels.d.ts +20 -0
- package/dist/{orbcharts-plugins-basic/src/base/BaseStackedBar.d.ts → src/base/BaseStackedBars.d.ts} +7 -7
- package/dist/{orbcharts-plugins-basic/src → src}/base/BaseValueAxis.d.ts +4 -7
- package/dist/src/base/BaseXAxis.d.ts +20 -0
- package/dist/src/base/BaseYAxis.d.ts +18 -0
- package/dist/{orbcharts-plugins-basic/src → src}/grid/defaults.d.ts +3 -3
- package/dist/{orbcharts-plugins-basic/src → src}/grid/gridObservables.d.ts +8 -1
- package/dist/{orbcharts-plugins-basic/src → src}/grid/index.d.ts +2 -2
- package/dist/src/grid/plugins/GroupZoom.d.ts +1 -0
- package/dist/src/grid/plugins/StackedBars.d.ts +1 -0
- package/dist/src/index.d.ts +7 -1
- package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/defaults.d.ts +2 -2
- package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/index.d.ts +1 -1
- package/dist/src/multiGrid/plugins/MultiStackedBars.d.ts +1 -0
- package/dist/src/multiValue/defaults.d.ts +13 -0
- package/dist/{orbcharts-plugins-basic/src → src}/multiValue/index.d.ts +5 -1
- package/dist/src/multiValue/multiValueObservables.d.ts +56 -0
- package/dist/src/multiValue/plugins/RacingBars.d.ts +1 -0
- package/dist/src/multiValue/plugins/RacingCounterTexts.d.ts +3 -0
- package/dist/src/multiValue/plugins/RacingValueAxis.d.ts +1 -0
- package/dist/src/multiValue/plugins/XAxis.d.ts +1 -0
- package/dist/src/multiValue/plugins/XYAxes.d.ts +1 -0
- package/dist/src/multiValue/plugins/XZoom.d.ts +1 -0
- package/dist/{orbcharts-plugins-basic/src → src}/utils/commonUtils.d.ts +1 -0
- package/dist/{orbcharts-plugins-basic/src → src}/utils/d3Graphics.d.ts +2 -1
- package/lib/core-types.ts +7 -7
- package/lib/core.ts +6 -6
- package/lib/plugins-basic-types.ts +6 -6
- package/package.json +44 -44
- package/src/base/BaseBars.ts +765 -765
- package/src/base/BaseBarsTriangle.ts +676 -676
- package/src/base/BaseDots.ts +464 -464
- package/src/base/BaseGroupAxis.ts +691 -679
- package/src/base/BaseLegend.ts +684 -684
- package/src/base/BaseLineAreas.ts +629 -629
- package/src/base/BaseLines.ts +706 -706
- package/src/base/BaseRacingBars.ts +552 -0
- package/src/base/BaseRacingLabels.ts +396 -0
- package/src/base/BaseRacingValueLabels.ts +403 -0
- package/src/base/{BaseStackedBar.ts → BaseStackedBars.ts} +782 -782
- package/src/base/BaseTooltip.ts +386 -385
- package/src/base/BaseValueAxis.ts +600 -583
- package/src/base/BaseXAxis.ts +427 -0
- package/src/base/BaseYAxis.ts +389 -0
- package/src/base/types.ts +2 -2
- package/src/const.ts +30 -30
- package/src/grid/defaults.ts +213 -250
- package/src/grid/gridObservables.ts +612 -554
- package/src/grid/index.ts +16 -16
- package/src/grid/plugins/Bars.ts +69 -69
- package/src/grid/plugins/BarsPN.ts +66 -66
- package/src/grid/plugins/BarsTriangle.ts +73 -73
- package/src/grid/plugins/Dots.ts +68 -68
- package/src/grid/plugins/GridLegend.ts +107 -107
- package/src/grid/plugins/GridTooltip.ts +66 -66
- package/src/grid/plugins/GroupAux.ts +1120 -1103
- package/src/grid/plugins/GroupAxis.ts +73 -97
- package/src/grid/plugins/{GridZoom.ts → GroupZoom.ts} +218 -218
- package/src/grid/plugins/LineAreas.ts +65 -65
- package/src/grid/plugins/Lines.ts +59 -59
- package/src/grid/plugins/{StackedBar.ts → StackedBars.ts} +64 -64
- package/src/grid/plugins/StackedValueAxis.ts +96 -96
- package/src/grid/plugins/ValueAxis.ts +94 -94
- package/src/index.ts +6 -6
- package/src/multiGrid/defaults.ts +244 -228
- package/src/multiGrid/index.ts +14 -14
- package/src/multiGrid/multiGridObservables.ts +50 -49
- package/src/multiGrid/plugins/MultiBars.ts +108 -108
- package/src/multiGrid/plugins/MultiBarsTriangle.ts +114 -114
- package/src/multiGrid/plugins/MultiDots.ts +102 -102
- package/src/multiGrid/plugins/MultiGridLegend.ts +169 -159
- package/src/multiGrid/plugins/MultiGridTooltip.ts +66 -66
- package/src/multiGrid/plugins/MultiGroupAxis.ts +137 -137
- package/src/multiGrid/plugins/MultiLineAreas.ts +107 -107
- package/src/multiGrid/plugins/MultiLines.ts +101 -101
- package/src/multiGrid/plugins/{MultiStackedBar.ts → MultiStackedBars.ts} +106 -106
- package/src/multiGrid/plugins/MultiStackedValueAxis.ts +134 -134
- package/src/multiGrid/plugins/MultiValueAxis.ts +134 -134
- package/src/multiGrid/plugins/OverlappingStackedValueAxes.ts +300 -299
- package/src/multiGrid/plugins/OverlappingValueAxes.ts +300 -300
- package/src/multiValue/defaults.ts +388 -166
- package/src/multiValue/index.ts +13 -9
- package/src/multiValue/multiValueObservables.ts +667 -297
- package/src/multiValue/plugins/MultiValueLegend.ts +107 -107
- package/src/multiValue/plugins/MultiValueTooltip.ts +66 -66
- package/src/multiValue/plugins/OrdinalBubbles.ts +0 -0
- package/src/multiValue/plugins/OrdinalXAxis.ts +0 -0
- package/src/multiValue/plugins/RacingBars.ts +373 -0
- package/src/multiValue/plugins/RacingCounterAxis.ts +0 -0
- package/src/multiValue/plugins/RacingCounterTexts.ts +300 -0
- package/src/multiValue/plugins/RacingValueAxis.ts +115 -0
- package/src/multiValue/plugins/RankingAxis_legacy.ts +109 -0
- package/src/multiValue/plugins/Scatter.ts +426 -426
- package/src/multiValue/plugins/ScatterBubbles.ts +554 -554
- package/src/multiValue/plugins/XAxis.ts +108 -0
- package/src/multiValue/plugins/XYAux.ts +682 -681
- package/src/multiValue/plugins/XYAxes.ts +194 -684
- package/src/multiValue/plugins/XYAxes_legacy.ts +684 -0
- package/src/multiValue/plugins/{XYZoom.ts → XZoom.ts} +299 -299
- package/src/noneData/defaults.ts +102 -102
- package/src/noneData/index.ts +3 -3
- package/src/noneData/plugins/Container.ts +27 -27
- package/src/noneData/plugins/Tooltip.ts +373 -373
- package/src/relationship/defaults.ts +220 -218
- package/src/relationship/index.ts +5 -5
- package/src/relationship/plugins/ForceDirected.ts +1168 -1168
- package/src/relationship/plugins/ForceDirectedBubbles.ts +1403 -1403
- package/src/relationship/plugins/RelationshipLegend.ts +100 -100
- package/src/relationship/plugins/RelationshipTooltip.ts +66 -66
- package/src/relationship/relationshipObservables.ts +49 -49
- package/src/series/defaults.ts +221 -230
- package/src/series/index.ts +9 -9
- package/src/series/plugins/Bubbles.ts +636 -620
- package/src/series/plugins/Pie.ts +623 -623
- package/src/series/plugins/PieEventTexts.ts +284 -284
- package/src/series/plugins/PieLabels.ts +640 -640
- package/src/series/plugins/Rose.ts +516 -516
- package/src/series/plugins/RoseLabels.ts +600 -600
- package/src/series/plugins/SeriesLegend.ts +107 -107
- package/src/series/plugins/SeriesTooltip.ts +66 -66
- package/src/series/seriesObservables.ts +145 -145
- package/src/series/seriesUtils.ts +51 -51
- package/src/tree/defaults.ts +102 -100
- package/src/tree/index.ts +4 -4
- package/src/tree/plugins/TreeLegend.ts +100 -100
- package/src/tree/plugins/TreeMap.ts +341 -341
- package/src/tree/plugins/TreeTooltip.ts +66 -66
- package/src/utils/commonUtils.ts +31 -22
- package/src/utils/d3Graphics.ts +176 -174
- package/src/utils/d3Utils.ts +92 -92
- package/src/utils/observables.ts +14 -14
- package/src/utils/orbchartsUtils.ts +129 -129
- package/tsconfig.base.json +13 -13
- package/tsconfig.json +2 -2
- package/vite.config.js +22 -22
- package/dist/orbcharts-plugins-basic/src/grid/plugins/GridZoom.d.ts +0 -1
- package/dist/orbcharts-plugins-basic/src/grid/plugins/StackedBar.d.ts +0 -1
- package/dist/orbcharts-plugins-basic/src/index.d.ts +0 -7
- package/dist/orbcharts-plugins-basic/src/multiGrid/plugins/MultiStackedBar.d.ts +0 -1
- package/dist/orbcharts-plugins-basic/src/multiValue/defaults.d.ts +0 -9
- package/dist/orbcharts-plugins-basic/src/multiValue/multiValueObservables.d.ts +0 -33
- package/dist/orbcharts-plugins-basic/src/multiValue/plugins/XYZoom.d.ts +0 -1
- /package/dist/{orbcharts-plugins-basic/lib → lib}/core-types.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/lib → lib}/core.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/lib → lib}/plugins-basic-types.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/base/BaseGroupAxis.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/base/BaseLegend.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/base/BaseTooltip.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/base/types.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/const.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/Bars.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/BarsPN.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/BarsTriangle.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/Dots.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GridLegend.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GridTooltip.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GroupAux.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/GroupAxis.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/LineAreas.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/Lines.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/StackedValueAxis.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/grid/plugins/ValueAxis.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/multiGridObservables.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiBars.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiBarsTriangle.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiDots.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiGridLegend.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiGridTooltip.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiGroupAxis.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiLineAreas.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiLines.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiStackedValueAxis.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/MultiValueAxis.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/OverlappingStackedValueAxes.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiGrid/plugins/OverlappingValueAxes.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/MultiValueLegend.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/MultiValueTooltip.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src/multiValue/plugins/Ranking.d.ts → src/multiValue/plugins/OrdinalBubbles.d.ts} +0 -0
- /package/dist/{orbcharts-plugins-basic/src/multiValue/plugins/RankingAxis.d.ts → src/multiValue/plugins/OrdinalXAxis.d.ts} +0 -0
- /package/dist/{orbcharts-plugins-basic/src/noneData/plugins/Container.d.ts → src/multiValue/plugins/RacingCounterAxis.d.ts} +0 -0
- /package/dist/{orbcharts-plugins-basic/src/noneData/plugins/Tooltip.d.ts → src/multiValue/plugins/RankingAxis_legacy.d.ts} +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/Scatter.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/ScatterBubbles.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/multiValue/plugins/XYAux.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src/multiValue/plugins/XYAxes.d.ts → src/multiValue/plugins/XYAxes_legacy.d.ts} +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/noneData/defaults.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/noneData/index.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src/series/plugins/Waffle.d.ts → src/noneData/plugins/Container.d.ts} +0 -0
- /package/{src/multiValue/plugins/Ranking.ts → dist/src/noneData/plugins/Tooltip.d.ts} +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/relationship/defaults.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/relationship/index.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/ForceDirected.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/ForceDirectedBubbles.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/RelationshipLegend.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/relationship/plugins/RelationshipTooltip.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/relationship/relationshipObservables.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/defaults.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/index.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/Bubbles.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/Pie.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/PieEventTexts.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/PieLabels.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/Rose.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/RoseLabels.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/SeriesLegend.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/plugins/SeriesTooltip.d.ts +0 -0
- /package/{src/multiValue/plugins/RankingAxis.ts → dist/src/series/plugins/Waffle.d.ts} +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/seriesObservables.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/series/seriesUtils.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/tree/defaults.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/tree/index.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/tree/plugins/TreeLegend.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/tree/plugins/TreeMap.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/tree/plugins/TreeTooltip.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/utils/d3Utils.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/utils/observables.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/src → src}/utils/orbchartsUtils.d.ts +0 -0
- /package/dist/{orbcharts-plugins-basic/vite.config.d.ts → vite.config.d.ts} +0 -0
@@ -1,18 +1,25 @@
|
|
1
|
-
(function(
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
(function(X,Mr){typeof exports=="object"&&typeof module<"u"?Mr(exports):typeof define=="function"&&define.amd?define(["exports"],Mr):(X=typeof globalThis<"u"?globalThis:X||self,Mr(X["orbcharts-plugins-basic"]={}))})(this,function(X){"use strict";const Mr={lineCurve:"curveLinear",lineWidth:2},hd={lineCurve:"curveLinear",linearGradientOpacity:[1,0]},pd={radius:4,fillColorType:"background",strokeColorType:"label",strokeWidth:2,onlyShowHighlighted:!1},Su={showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:e=>e,labelPadding:20,labelRotate:0};Su.labelTextFormat.toString=()=>"text => text";const va={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1},pS={...va},dd={barWidth:0,barGroupPadding:10,barRadius:!1},gd={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0]},_u={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:e=>e,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"};_u.tickFormat.toString=()=>"text => text";const Sa={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"};Sa.tickFormat.toString=()=>`num => {
|
2
|
+
if (num === null || Number.isNaN(num) == true) {
|
3
|
+
return num || 0
|
4
|
+
}
|
5
|
+
var parts = num.toString().split('.')
|
6
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
7
|
+
return parts.join('.')
|
8
|
+
}`;const md={...Sa},yd={},bd={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},wu={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(e,{styles:t,utils:n})=>{const r=t.textSizePx*.7,i=t.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${t.textSizePx}" fill="${t.textColor}">${e.groupLabel}</text></g>`,a=n.measureTextWidth(e.groupLabel,t.textSizePx),s=e.group.reduce((h,f)=>{const p=`${f.seriesLabel}${n.toCurrency(f.value)}`,d=n.measureTextWidth(p,t.textSizePx);return d>h?d:h},0),u=Math.max(a,s)+t.textSizePx*3,c=e.group.map((h,f)=>{const p=f*t.textSizePx*1.5,d=h.id===(e.datum&&e.datum.id);return`<g transform="translate(0, ${t.textSizePx*2})">
|
9
|
+
<rect width="${r}" height="${r}" x="${i}" y="${p+i}" rx="${r/2}" fill="${h.color}"></rect>
|
10
|
+
<text x="${t.textSizePx*1.5}" y="${p}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
11
|
+
<tspan font-weight="${d?"bold":""}">${h.seriesLabel}</tspan>
|
12
|
+
<tspan font-weight="bold" text-anchor="end" x="${u}">${n.toCurrency(h.value)}</tspan>
|
6
13
|
</text>
|
7
14
|
</g>`}).join("");return`${o}
|
8
|
-
${c}`}};
|
15
|
+
${c}`}};wu.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
9
16
|
const bulletWidth = styles.textSizePx * 0.7
|
10
17
|
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
11
18
|
|
12
19
|
const titleSvg = \`<g><text dominant-baseline="hanging" font-size="\${styles.textSizePx}" fill="\${styles.textColor}">\${eventData.groupLabel}</text></g>\`
|
13
20
|
const groupLabelTextWidth = utils.measureTextWidth(eventData.groupLabel, styles.textSizePx)
|
14
21
|
const listTextWidth = eventData.group.reduce((acc, group) => {
|
15
|
-
const text = \`\${group.seriesLabel}\${group.value}\`
|
22
|
+
const text = \`\${group.seriesLabel}\${utils.toCurrency(group.value)}\`
|
16
23
|
const _maxTextWidth = utils.measureTextWidth(text, styles.textSizePx)
|
17
24
|
return _maxTextWidth > acc ? _maxTextWidth : acc
|
18
25
|
}, 0)
|
@@ -26,45 +33,52 @@ ${c}`}};vu.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
|
26
33
|
<rect width="\${bulletWidth}" height="\${bulletWidth}" x="\${offset}" y="\${y + offset}" rx="\${bulletWidth / 2}" fill="\${group.color}"></rect>
|
27
34
|
<text x="\${styles.textSizePx * 1.5}" y="\${y}" font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
28
35
|
<tspan font-weight="\${isHighlight ? 'bold' : ''}">\${group.seriesLabel}</tspan>
|
29
|
-
<tspan font-weight="bold" text-anchor="end" x="\${lineEndX}">\${group.value}</tspan>
|
36
|
+
<tspan font-weight="bold" text-anchor="end" x="\${lineEndX}">\${utils.toCurrency(group.value)}</tspan>
|
30
37
|
</text>
|
31
38
|
</g>\`
|
32
39
|
})
|
33
40
|
.join('')
|
34
41
|
return \`\${titleSvg}
|
35
42
|
\${contentSvg}\`
|
36
|
-
}`;var
|
43
|
+
}`;var Tu=function(e,t){return Tu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Tu(e,t)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Tu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function dS(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(h){a(h)}}function l(c){try{u(r.throw(c))}catch(h){a(h)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function xd(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Lr(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function kr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Rr(e){return this instanceof Rr?(this.v=e,this):new Rr(e)}function gS(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||l(p,g)})},d&&(i[p]=d(i[p])))}function l(p,d){try{u(r[p](d))}catch(g){f(o[0][3],g)}}function u(p){p.value instanceof Rr?Promise.resolve(p.value.v).then(c,h):f(o[0][2],p)}function c(p){l("next",p)}function h(p){l("throw",p)}function f(p,d){p(d),o.shift(),o.length&&l(o[0][0],o[0][1])}}function mS(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Lr=="function"?Lr(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,l){a=e[o](a),i(s,l,a.done,a.value)})}}function i(o,a,s,l){Promise.resolve(l).then(function(u){o({value:u,done:s})},a)}}typeof SuppressedError=="function"&&SuppressedError;function xe(e){return typeof e=="function"}function Au(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Pu=Au(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
37
44
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
38
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function ba(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Gi=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Cr(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(m){e={error:m}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(xt(c))try{c()}catch(m){o=m instanceof Su?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Cr(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{fd(d)}catch(m){o=o??[],m instanceof Su?o=Mr(Mr([],zn(o)),zn(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Su(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)fd(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&ba(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&ba(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ud=Gi.EMPTY;function cd(t){return t instanceof Gi||t&&"closed"in t&&xt(t.remove)&&xt(t.add)&&xt(t.unsubscribe)}function fd(t){xt(t)?t():t.unsubscribe()}var hd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},pd={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Mr([t,e],zn(n)))},clearTimeout:function(t){var e=pd.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function dd(t){pd.setTimeout(function(){throw t})}function wu(){}function xa(t){t()}var Tu=function(t){ze(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,cd(n)&&n.add(r)):r.destination=t_,r}return e.create=function(n,r,i){return new Wi(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Gi),K2=Function.prototype.bind;function Au(t,e){return K2.call(t,e)}var Q2=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){va(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){va(r)}else va(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){va(n)}},t}(),Wi=function(t){ze(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(xt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&hd.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Au(n.next,s),error:n.error&&Au(n.error,s),complete:n.complete&&Au(n.complete,s)}):a=n}return o.destination=new Q2(a),o}return e}(Tu);function va(t){dd(t)}function J2(t){throw t}var t_={closed:!0,next:wu,error:J2,complete:wu},Pu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function kr(t){return t}function e_(t){return t.length===0?kr:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var dt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=r_(e)?e:new Wi(e,n,r);return xa(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=gd(n),new n(function(i,o){var a=new Wi({next:function(s){try{e(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[Pu]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e_(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=gd(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function gd(t){var e;return(e=t??hd.Promise)!==null&&e!==void 0?e:Promise}function n_(t){return t&&xt(t.next)&&xt(t.error)&&xt(t.complete)}function r_(t){return t&&t instanceof Tu||n_(t)&&cd(t)}function i_(t){return xt(t==null?void 0:t.lift)}function fe(t){return function(e){if(i_(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function oe(t,e,n,r,i){return new o_(t,e,n,r,i)}var o_=function(t){ze(e,t);function e(n,r,i,o,a,s){var l=t.call(this,n)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=r?function(u){try{r(u)}catch(c){n.error(c)}}:t.prototype._next,l._error=o?function(u){try{o(u)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,l._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,l}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(Tu),a_=_u(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),J=function(t){ze(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new md(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new a_},e.prototype.next=function(n){var r=this;xa(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Cr(r.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;xa(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;xa(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?ud:(this.currentObservers=null,s.push(n),new Gi(function(){r.currentObservers=null,ba(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new dt;return n.source=this,n},e.create=function(n,r){return new md(n,r)},e}(dt),md=function(t){ze(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ud},e}(J),Du=function(t){ze(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(J),Cu={now:function(){return(Cu.delegate||Date).now()},delegate:void 0},s_=function(t){ze(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Cu);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,l=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+l)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!n.closed;l+=o?1:2)n.next(s[l]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,c=1;c<o.length&&o[c]<=l;c+=2)u=c;u&&o.splice(0,u+1)}},e}(J),l_=function(t){ze(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Gi),Mu={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Mr([t,e],zn(n)))},clearInterval:function(t){var e=Mu.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},u_=function(t){ze(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Mu.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Mu.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ba(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(l_),yd=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=Cu.now,t}(),c_=function(t){ze(e,t);function e(n,r){r===void 0&&(r=yd.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(yd),f_=new c_(u_),$a=new dt(function(t){return t.complete()});function h_(t){return t&&xt(t.schedule)}function Lu(t){return t[t.length-1]}function p_(t){return xt(Lu(t))?t.pop():void 0}function ku(t){return h_(Lu(t))?t.pop():void 0}function d_(t,e){return typeof Lu(t)=="number"?t.pop():e}var Ru=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function bd(t){return xt(t==null?void 0:t.then)}function xd(t){return xt(t[Pu])}function vd(t){return Symbol.asyncIterator&&xt(t==null?void 0:t[Symbol.asyncIterator])}function $d(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function g_(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var _d=g_();function Sd(t){return xt(t==null?void 0:t[_d])}function wd(t){return q2(this,arguments,function(){var n,r,i,o;return ld(this,function(a){switch(a.label){case 0:n=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Lr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Lr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Lr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Td(t){return xt(t==null?void 0:t.getReader)}function xe(t){if(t instanceof dt)return t;if(t!=null){if(xd(t))return m_(t);if(Ru(t))return y_(t);if(bd(t))return b_(t);if(vd(t))return Ad(t);if(Sd(t))return x_(t);if(Td(t))return v_(t)}throw $d(t)}function m_(t){return new dt(function(e){var n=t[Pu]();if(xt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function y_(t){return new dt(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function b_(t){return new dt(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,dd)})}function x_(t){return new dt(function(e){var n,r;try{for(var i=Cr(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Ad(t){return new dt(function(e){$_(t,e).catch(function(n){return e.error(n)})})}function v_(t){return Ad(wd(t))}function $_(t,e){var n,r,i,o;return j2(this,void 0,void 0,function(){var a,s;return ld(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=Z2(t),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function $n(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function Pd(t,e){return e===void 0&&(e=0),fe(function(n,r){n.subscribe(oe(r,function(i){return $n(r,t,function(){return r.next(i)},e)},function(){return $n(r,t,function(){return r.complete()},e)},function(i){return $n(r,t,function(){return r.error(i)},e)}))})}function Dd(t,e){return e===void 0&&(e=0),fe(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function __(t,e){return xe(t).pipe(Dd(e),Pd(e))}function S_(t,e){return xe(t).pipe(Dd(e),Pd(e))}function w_(t,e){return new dt(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function T_(t,e){return new dt(function(n){var r;return $n(n,e,function(){r=t[_d](),$n(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return xt(r==null?void 0:r.return)&&r.return()}})}function Cd(t,e){if(!t)throw new Error("Iterable cannot be null");return new dt(function(n){$n(n,e,function(){var r=t[Symbol.asyncIterator]();$n(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function A_(t,e){return Cd(wd(t),e)}function P_(t,e){if(t!=null){if(xd(t))return __(t,e);if(Ru(t))return w_(t,e);if(bd(t))return S_(t,e);if(vd(t))return Cd(t,e);if(Sd(t))return T_(t,e);if(Td(t))return A_(t,e)}throw $d(t)}function _a(t,e){return e?P_(t,e):xe(t)}function Sa(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ku(t);return _a(t,n)}var Md=_u(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function R(t,e){return fe(function(n,r){var i=0;n.subscribe(oe(r,function(o){r.next(t.call(e,o,i++))}))})}var D_=Array.isArray;function C_(t,e){return D_(e)?t.apply(void 0,Mr([],zn(e))):t(e)}function Ld(t){return R(function(e){return C_(t,e)})}var M_=Array.isArray,L_=Object.getPrototypeOf,k_=Object.prototype,R_=Object.keys;function E_(t){if(t.length===1){var e=t[0];if(M_(e))return{args:e,keys:null};if(I_(e)){var n=R_(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function I_(t){return t&&typeof t=="object"&&L_(t)===k_}function B_(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function W(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ku(t),r=p_(t),i=E_(t),o=i.args,a=i.keys;if(o.length===0)return _a([],n);var s=new dt(N_(o,n,a?function(l){return B_(a,l)}:kr));return r?s.pipe(Ld(r)):s}function N_(t,e,n){return n===void 0&&(n=kr),function(r){kd(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,l=function(c){kd(e,function(){var f=_a(t[c],e),h=!1;f.subscribe(oe(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)l(u)},r)}}function kd(t,e,n){t?$n(n,t,e):e()}function F_(t,e,n,r,i,o,a,s){var l=[],u=0,c=0,f=!1,h=function(){f&&!l.length&&!u&&e.complete()},p=function(m){return u<r?d(m):l.push(m)},d=function(m){u++;var g=!1;xe(n(m,c++)).subscribe(oe(e,function(y){e.next(y)},function(){g=!0},void 0,function(){if(g)try{u--;for(var y=function(){var b=l.shift();a||d(b)};l.length&&u<r;)y();h()}catch(b){e.error(b)}}))};return t.subscribe(oe(e,p,function(){f=!0,h()})),function(){}}function Eu(t,e,n){return n===void 0&&(n=1/0),xt(e)?Eu(function(r,i){return R(function(o,a){return e(r,o,i,a)})(xe(t(r,i)))},n):(typeof e=="number"&&(n=e),fe(function(r,i){return F_(r,i,t,n)}))}function z_(t){return t===void 0&&(t=1/0),Eu(kr,t)}function O_(t){return new dt(function(e){xe(t()).subscribe(e)})}var G_=["addListener","removeListener"],W_=["addEventListener","removeEventListener"],Y_=["on","off"];function Iu(t,e,n,r){if(xt(n)&&(r=n,n=void 0),r)return Iu(t,e,n).pipe(Ld(r));var i=zn(U_(t)?W_.map(function(s){return function(l){return t[s](e,l,n)}}):X_(t)?G_.map(Rd(t,e)):V_(t)?Y_.map(Rd(t,e)):[],2),o=i[0],a=i[1];if(!o&&Ru(t))return Eu(function(s){return Iu(s,e,n)})(xe(t));if(!o)throw new TypeError("Invalid event target");return new dt(function(s){var l=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return s.next(1<u.length?u:u[0])};return o(l),function(){return a(l)}})}function Rd(t,e){return function(n){return function(r){return t[n](e,r)}}}function X_(t){return xt(t.addListener)&&xt(t.removeListener)}function V_(t){return xt(t.on)&&xt(t.off)}function U_(t){return xt(t.addEventListener)&&xt(t.removeEventListener)}function Yi(t,e,n){return O_(function(){return t()?e:n})}function Bu(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ku(t),r=d_(t,1/0),i=t;return i.length?i.length===1?xe(i[0]):z_(r)(_a(i,n)):$a}function Rr(t,e){return fe(function(n,r){var i=0;n.subscribe(oe(r,function(o){return t.call(e,o,i++)&&r.next(o)}))})}function H_(t,e){return e===void 0&&(e=f_),fe(function(n,r){var i=null,o=null,a=null,s=function(){if(i){i.unsubscribe(),i=null;var u=o;o=null,r.next(u)}};function l(){var u=a+t,c=e.now();if(c<u){i=this.schedule(void 0,u-c),r.add(i);return}s()}n.subscribe(oe(r,function(u){o=u,a=e.now(),i||(i=e.schedule(l,t),r.add(i))},function(){s(),r.complete()},void 0,function(){o=i=null}))})}function j_(t){return fe(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function q_(t){return t<=0?function(){return $a}:fe(function(e,n){var r=0;e.subscribe(oe(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function tt(t,e){return e===void 0&&(e=kr),t=t??Z_,fe(function(n,r){var i,o=!0;n.subscribe(oe(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function Z_(t,e){return t===e}function K_(t){return t===void 0&&(t=Q_),fe(function(e,n){var r=!1;e.subscribe(oe(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function Q_(){return new Md}function Xi(t,e){var n=arguments.length>=2;return function(r){return r.pipe(kr,q_(1),n?j_(e):K_(function(){return new Md}))}}function J_(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new J}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,l=s===void 0?!0:s;return function(u){var c,f,h,p=0,d=!1,m=!1,g=function(){f==null||f.unsubscribe(),f=void 0},y=function(){g(),c=h=void 0,d=m=!1},b=function(){var v=c;y(),v==null||v.unsubscribe()};return fe(function(v,x){p++,!m&&!d&&g();var _=h=h??n();x.add(function(){p--,p===0&&!m&&!d&&(f=Nu(b,l))}),_.subscribe(x),!c&&p>0&&(c=new Wi({next:function(A){return _.next(A)},error:function(A){m=!0,g(),f=Nu(y,i,A),_.error(A)},complete:function(){d=!0,g(),f=Nu(y,a),_.complete()}}),xe(v).subscribe(c))})(u)}}function Nu(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Wi({next:function(){i.unsubscribe(),t()}});return xe(e.apply(void 0,Mr([],zn(n)))).subscribe(i)}}function pt(t,e,n){var r,i=!1;return r=t,J_({connector:function(){return new s_(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function G(t,e){return fe(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(oe(r,function(l){i==null||i.unsubscribe();var u=0,c=o++;xe(t(l,c)).subscribe(i=oe(r,function(f){return r.next(e?e(l,f,c,u++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function L(t){return fe(function(e,n){xe(t).subscribe(oe(n,function(){return n.complete()},wu)),!n.closed&&e.subscribe(n)})}const he={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},tS={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},eS={gap:120,rowAmount:1,columnAmount:1},nS={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...he},groupAxis:{...tS},separateSeries:!1},rS={type:"grid",visibleFilter:(t,e)=>!0,...nS,container:{...eS}};rS.visibleFilter.toString=()=>"(datum, context) => true";function Er(t){return Object.prototype.toString.call(t)==="[object Object]"}function iS(t){return Object.prototype.toString.call(t)==="[object Function]"}function Fu(t,e){if(Er(t)===!1||Er(e)===!1)return Object.assign({},e);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;Er(r[a])&&Er(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(t,e)}function oS(t,e){const n={string:i=>typeof i=="string",number:i=>typeof i=="number",boolean:i=>typeof i=="boolean",object:i=>Er(i),"object[]":i=>Array.isArray(i)&&i.every(o=>Er(o)),"string[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="string"),"number[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="number"),Function:i=>iS(i),null:i=>i===null,undefined:i=>i===void 0},r={ColorType:i=>i==="none"||i==="label"||i==="primary"||i==="secondary"||i==="labelContrast"||i==="background"};return Object.keys(t).find(i=>{if(e[i]){const o=e[i],a=t[i];if(o.toBeTypes){if(o.toBeTypes.some(s=>n[s](a))===!1)return!0}else if(o.toBe){const{toBe:s,test:l}=o;if(l(a)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](a)===!1)return!0}}return!1})}function aS(t,e){const n=oS(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}function wa(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function sS(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ed(t){let e,n,r;t.length!==2?(e=wa,n=(s,l)=>wa(t(s),l),r=(s,l)=>t(s)-l):(e=t===wa||t===sS?t:lS,n=t,r=t);function i(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){const f=i(s,l,u,c-1);return f>u&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:a,right:o}}function lS(){return 0}function uS(t){return t===null?NaN:+t}const cS=Ed(wa),Id=cS.right;Ed(uS).center;const fS=Math.sqrt(50),hS=Math.sqrt(10),pS=Math.sqrt(2);function Ta(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=fS?10:o>=hS?5:o>=pS?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/u<t&&++s,l/u>e&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*u<t&&++s,l*u>e&&--l),l<s&&.5<=n&&n<2?Ta(t,e,n*2):[s,l,u]}function dS(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Ta(e,t,n):Ta(t,e,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function zu(t,e,n){return e=+e,t=+t,n=+n,Ta(t,e,n)[2]}function gS(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?zu(e,t,n):zu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var mS={value:()=>{}};function Bd(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Aa(n)}function Aa(t){this._=t}function yS(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Aa.prototype=Bd.prototype={constructor:Aa,on:function(t,e){var n=this._,r=yS(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=bS(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Nd(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Nd(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Aa(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function bS(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Nd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=mS,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ou="http://www.w3.org/1999/xhtml";const Fd={svg:"http://www.w3.org/2000/svg",xhtml:Ou,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Pa(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Fd.hasOwnProperty(e)?{space:Fd[e],local:t}:t}function xS(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ou&&e.documentElement.namespaceURI===Ou?e.createElement(t):e.createElementNS(n,t)}}function vS(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function zd(t){var e=Pa(t);return(e.local?vS:xS)(e)}function $S(){}function Gu(t){return t==null?$S:function(){return this.querySelector(t)}}function _S(t){typeof t!="function"&&(t=Gu(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=t.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new De(r,this._parents)}function SS(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function wS(){return[]}function Od(t){return t==null?wS:function(){return this.querySelectorAll(t)}}function TS(t){return function(){return SS(t.apply(this,arguments))}}function AS(t){typeof t=="function"?t=TS(t):t=Od(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(t.call(l,l.__data__,u,a)),i.push(l));return new De(r,i)}function Gd(t){return function(){return this.matches(t)}}function Wd(t){return function(e){return e.matches(t)}}var PS=Array.prototype.find;function DS(t){return function(){return PS.call(this.children,t)}}function CS(){return this.firstElementChild}function MS(t){return this.select(t==null?CS:DS(typeof t=="function"?t:Wd(t)))}var LS=Array.prototype.filter;function kS(){return Array.from(this.children)}function RS(t){return function(){return LS.call(this.children,t)}}function ES(t){return this.selectAll(t==null?kS:RS(typeof t=="function"?t:Wd(t)))}function IS(t){typeof t!="function"&&(t=Gd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new De(r,this._parents)}function Yd(t){return new Array(t.length)}function BS(){return new De(this._enter||this._groups.map(Yd),this._parents)}function Da(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Da.prototype={constructor:Da,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function NS(t){return function(){return t}}function FS(t,e,n,r,i,o){for(var a=0,s,l=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new Da(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function zS(t,e,n,r,i,o,a){var s,l,u=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(l=e[s])&&(h[s]=p=a.call(l,l.__data__,s,e)+"",u.has(p)?i[s]=l:u.set(p,l));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(l=u.get(p))?(r[s]=l,l.__data__=o[s],u.delete(p)):n[s]=new Da(t,o[s]);for(s=0;s<c;++s)(l=e[s])&&u.get(h[s])===l&&(i[s]=l)}function OS(t){return t.__data__}function GS(t,e){if(!arguments.length)return Array.from(this,OS);var n=e?zS:FS,r=this._parents,i=this._groups;typeof t!="function"&&(t=NS(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],h=f.length,p=WS(t.call(c,c&&c.__data__,u,r)),d=p.length,m=s[u]=new Array(d),g=a[u]=new Array(d),y=l[u]=new Array(h);n(c,f,m,g,y,p,e);for(var b=0,v=0,x,_;b<d;++b)if(x=m[b]){for(b>=v&&(v=b+1);!(_=g[v])&&++v<d;);x._next=_||null}}return a=new De(a,r),a._enter=s,a._exit=l,a}function WS(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function YS(){return new De(this._exit||this._groups.map(Yd),this._parents)}function XS(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function VS(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],f=u.length,h=s[l]=new Array(f),p,d=0;d<f;++d)(p=u[d]||c[d])&&(h[d]=p);for(;l<i;++l)s[l]=n[l];return new De(s,this._parents)}function US(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function HS(t){t||(t=jS);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(e)}return new De(i,this._parents).order()}function jS(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function qS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ZS(){return Array.from(this)}function KS(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function QS(){let t=0;for(const e of this)++t;return t}function JS(){return!this.node()}function tw(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function ew(t){return function(){this.removeAttribute(t)}}function nw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function rw(t,e){return function(){this.setAttribute(t,e)}}function iw(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ow(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function aw(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function sw(t,e){var n=Pa(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?nw:ew:typeof e=="function"?n.local?aw:ow:n.local?iw:rw)(n,e))}function Xd(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function lw(t){return function(){this.style.removeProperty(t)}}function uw(t,e,n){return function(){this.style.setProperty(t,e,n)}}function cw(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function fw(t,e,n){return arguments.length>1?this.each((e==null?lw:typeof e=="function"?cw:uw)(t,e,n??"")):Ir(this.node(),t)}function Ir(t,e){return t.style.getPropertyValue(e)||Xd(t).getComputedStyle(t,null).getPropertyValue(e)}function hw(t){return function(){delete this[t]}}function pw(t,e){return function(){this[t]=e}}function dw(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function gw(t,e){return arguments.length>1?this.each((e==null?hw:typeof e=="function"?dw:pw)(t,e)):this.node()[t]}function Vd(t){return t.trim().split(/^|\s+/)}function Wu(t){return t.classList||new Ud(t)}function Ud(t){this._node=t,this._names=Vd(t.getAttribute("class")||"")}Ud.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Hd(t,e){for(var n=Wu(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function jd(t,e){for(var n=Wu(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function mw(t){return function(){Hd(this,t)}}function yw(t){return function(){jd(this,t)}}function bw(t,e){return function(){(e.apply(this,arguments)?Hd:jd)(this,t)}}function xw(t,e){var n=Vd(t+"");if(arguments.length<2){for(var r=Wu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?bw:e?mw:yw)(n,e))}function vw(){this.textContent=""}function $w(t){return function(){this.textContent=t}}function _w(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Sw(t){return arguments.length?this.each(t==null?vw:(typeof t=="function"?_w:$w)(t)):this.node().textContent}function ww(){this.innerHTML=""}function Tw(t){return function(){this.innerHTML=t}}function Aw(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Pw(t){return arguments.length?this.each(t==null?ww:(typeof t=="function"?Aw:Tw)(t)):this.node().innerHTML}function Dw(){this.nextSibling&&this.parentNode.appendChild(this)}function Cw(){return this.each(Dw)}function Mw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Lw(){return this.each(Mw)}function kw(t){var e=typeof t=="function"?t:zd(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Rw(){return null}function Ew(t,e){var n=typeof t=="function"?t:zd(t),r=e==null?Rw:typeof e=="function"?e:Gu(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Iw(){var t=this.parentNode;t&&t.removeChild(this)}function Bw(){return this.each(Iw)}function Nw(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Fw(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zw(t){return this.select(t?Fw:Nw)}function Ow(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Gw(t){return function(e){t.call(this,e,this.__data__)}}function Ww(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Yw(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function Xw(t,e,n){return function(){var r=this.__on,i,o=Gw(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Vw(t,e,n){var r=Ww(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?Xw:Yw,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function qd(t,e,n){var r=Xd(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Uw(t,e){return function(){return qd(this,t,e)}}function Hw(t,e){return function(){return qd(this,t,e.apply(this,arguments))}}function jw(t,e){return this.each((typeof e=="function"?Hw:Uw)(t,e))}function*qw(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Zw=[null];function De(t,e){this._groups=t,this._parents=e}function Vi(){return new De([[document.documentElement]],Zw)}function Kw(){return this}De.prototype=Vi.prototype={constructor:De,select:_S,selectAll:AS,selectChild:MS,selectChildren:ES,filter:IS,data:GS,enter:BS,exit:YS,join:XS,merge:VS,selection:Kw,order:US,sort:HS,call:qS,nodes:ZS,node:KS,size:QS,empty:JS,each:tw,attr:sw,style:fw,property:gw,classed:xw,text:Sw,html:Pw,raise:Cw,lower:Lw,append:kw,insert:Ew,remove:Bw,clone:zw,datum:Ow,on:Vw,dispatch:jw,[Symbol.iterator]:qw};function Yu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Zd(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ui(){}var Hi=.7,Ca=1/Hi,Br="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qw=/^#([0-9a-f]{3,8})$/,Jw=new RegExp(`^rgb\\(${Br},${Br},${Br}\\)$`),tT=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),eT=new RegExp(`^rgba\\(${Br},${Br},${Br},${ji}\\)$`),nT=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${ji}\\)$`),rT=new RegExp(`^hsl\\(${ji},${Oe},${Oe}\\)$`),iT=new RegExp(`^hsla\\(${ji},${Oe},${Oe},${ji}\\)$`),Kd={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};Yu(Ui,On,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Qd,formatHex:Qd,formatHex8:oT,formatHsl:aT,formatRgb:Jd,toString:Jd});function Qd(){return this.rgb().formatHex()}function oT(){return this.rgb().formatHex8()}function aT(){return ig(this).formatHsl()}function Jd(){return this.rgb().formatRgb()}function On(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Qw.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?tg(e):n===3?new ae(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ma(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ma(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Jw.exec(t))?new ae(e[1],e[2],e[3],1):(e=tT.exec(t))?new ae(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eT.exec(t))?Ma(e[1],e[2],e[3],e[4]):(e=nT.exec(t))?Ma(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rT.exec(t))?rg(e[1],e[2]/100,e[3]/100,1):(e=iT.exec(t))?rg(e[1],e[2]/100,e[3]/100,e[4]):Kd.hasOwnProperty(t)?tg(Kd[t]):t==="transparent"?new ae(NaN,NaN,NaN,0):null}function tg(t){return new ae(t>>16&255,t>>8&255,t&255,1)}function Ma(t,e,n,r){return r<=0&&(t=e=n=NaN),new ae(t,e,n,r)}function sT(t){return t instanceof Ui||(t=On(t)),t?(t=t.rgb(),new ae(t.r,t.g,t.b,t.opacity)):new ae}function Xu(t,e,n,r){return arguments.length===1?sT(t):new ae(t,e,n,r??1)}function ae(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Yu(ae,Xu,Zd(Ui,{brighter(t){return t=t==null?Ca:Math.pow(Ca,t),new ae(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Hi:Math.pow(Hi,t),new ae(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ae(Gn(this.r),Gn(this.g),Gn(this.b),La(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:eg,formatHex:eg,formatHex8:lT,formatRgb:ng,toString:ng}));function eg(){return`#${Wn(this.r)}${Wn(this.g)}${Wn(this.b)}`}function lT(){return`#${Wn(this.r)}${Wn(this.g)}${Wn(this.b)}${Wn((isNaN(this.opacity)?1:this.opacity)*255)}`}function ng(){const t=La(this.opacity);return`${t===1?"rgb(":"rgba("}${Gn(this.r)}, ${Gn(this.g)}, ${Gn(this.b)}${t===1?")":`, ${t})`}`}function La(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Gn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Wn(t){return t=Gn(t),(t<16?"0":"")+t.toString(16)}function rg(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ce(t,e,n,r)}function ig(t){if(t instanceof Ce)return new Ce(t.h,t.s,t.l,t.opacity);if(t instanceof Ui||(t=On(t)),!t)return new Ce;if(t instanceof Ce)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ce(a,s,l,t.opacity)}function uT(t,e,n,r){return arguments.length===1?ig(t):new Ce(t,e,n,r??1)}function Ce(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Yu(Ce,uT,Zd(Ui,{brighter(t){return t=t==null?Ca:Math.pow(Ca,t),new Ce(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Hi:Math.pow(Hi,t),new Ce(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ae(Vu(t>=240?t-240:t+120,i,r),Vu(t,i,r),Vu(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ce(og(this.h),ka(this.s),ka(this.l),La(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 t=La(this.opacity);return`${t===1?"hsl(":"hsla("}${og(this.h)}, ${ka(this.s)*100}%, ${ka(this.l)*100}%${t===1?")":`, ${t})`}`}}));function og(t){return t=(t||0)%360,t<0?t+360:t}function ka(t){return Math.max(0,Math.min(1,t||0))}function Vu(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Uu=t=>()=>t;function cT(t,e){return function(n){return t+n*e}}function fT(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function hT(t){return(t=+t)==1?ag:function(e,n){return n-e?fT(e,n,t):Uu(isNaN(e)?n:e)}}function ag(t,e){var n=e-t;return n?cT(t,n):Uu(isNaN(t)?e:t)}const Ra=function t(e){var n=hT(e);function r(i,o){var a=n((i=Xu(i)).r,(o=Xu(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=ag(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=t,r}(1);function pT(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function dT(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function gT(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=qu(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function mT(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Me(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function yT(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=qu(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Hu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ju=new RegExp(Hu.source,"g");function bT(t){return function(){return t}}function xT(t){return function(e){return t(e)+""}}function sg(t,e){var n=Hu.lastIndex=ju.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(r=Hu.exec(t))&&(i=ju.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Me(r,i)})),n=ju.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?xT(l[0].x):bT(e):(e=l.length,function(u){for(var c=0,f;c<e;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function qu(t,e){var n=typeof e,r;return e==null||n==="boolean"?Uu(e):(n==="number"?Me:n==="string"?(r=On(e))?(e=r,Ra):sg:e instanceof On?Ra:e instanceof Date?mT:dT(e)?pT:Array.isArray(e)?gT:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?yT:Me)(t,e)}function vT(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var lg=180/Math.PI,ug={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cg(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*lg,skewX:Math.atan(l)*lg,scaleX:a,scaleY:s}}var Ea;function $T(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ug:cg(e.a,e.b,e.c,e.d,e.e,e.f)}function _T(t){return t==null||(Ea||(Ea=document.createElementNS("http://www.w3.org/2000/svg","g")),Ea.setAttribute("transform",t),!(t=Ea.transform.baseVal.consolidate()))?ug:(t=t.matrix,cg(t.a,t.b,t.c,t.d,t.e,t.f))}function fg(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:Me(u,f)},{i:m-2,x:Me(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Me(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Me(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:Me(u,f)},{i:m-2,x:Me(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=t(u),c=t(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,h),a(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,m=h.length,g;++d<m;)f[(g=h[d]).i]=g.x(p);return f.join("")}}}var ST=fg($T,"px, ","px)","deg)"),wT=fg(_T,", ",")",")"),Nr=0,qi=0,Zi=0,hg=1e3,Ia,Ki,Ba=0,Yn=0,Na=0,Qi=typeof performance=="object"&&performance.now?performance:Date,pg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zu(){return Yn||(pg(TT),Yn=Qi.now()+Na)}function TT(){Yn=0}function Fa(){this._call=this._time=this._next=null}Fa.prototype=dg.prototype={constructor:Fa,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Zu():+n)+(e==null?0:+e),!this._next&&Ki!==this&&(Ki?Ki._next=this:Ia=this,Ki=this),this._call=t,this._time=n,Ku()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ku())}};function dg(t,e,n){var r=new Fa;return r.restart(t,e,n),r}function AT(){Zu(),++Nr;for(var t=Ia,e;t;)(e=Yn-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Nr}function gg(){Yn=(Ba=Qi.now())+Na,Nr=qi=0;try{AT()}finally{Nr=0,DT(),Yn=0}}function PT(){var t=Qi.now(),e=t-Ba;e>hg&&(Na-=e,Ba=t)}function DT(){for(var t,e=Ia,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ia=n);Ki=t,Ku(r)}function Ku(t){if(!Nr){qi&&(qi=clearTimeout(qi));var e=t-Yn;e>24?(t<1/0&&(qi=setTimeout(gg,t-Qi.now()-Na)),Zi&&(Zi=clearInterval(Zi))):(Zi||(Ba=Qi.now(),Zi=setInterval(PT,hg)),Nr=1,pg(gg))}}function mg(t,e,n){var r=new Fa;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var CT=Bd("start","end","cancel","interrupt"),MT=[],yg=0,bg=1,Qu=2,za=3,xg=4,Ju=5,Oa=6;function Ga(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;LT(t,n,{name:e,index:r,group:i,on:CT,tween:MT,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:yg})}function tc(t,e){var n=Le(t,e);if(n.state>yg)throw new Error("too late; already scheduled");return n}function Ge(t,e){var n=Le(t,e);if(n.state>za)throw new Error("too late; already running");return n}function Le(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function LT(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=dg(o,0,n.time);function o(u){n.state=bg,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,h,p;if(n.state!==bg)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===za)return mg(a);p.state===xg?(p.state=Oa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=Oa,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(mg(function(){n.state===za&&(n.state=xg,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Qu,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Qu){for(n.state=za,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Ju,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===Ju&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Oa,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function kT(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Qu&&r.state<Ju,r.state=Oa,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function RT(t){return this.each(function(){kT(this,t)})}function ET(t,e){var n,r;return function(){var i=Ge(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function IT(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ge(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function BT(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Le(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?ET:IT)(n,t,e))}function ec(t,e,n){var r=t._id;return t.each(function(){var i=Ge(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Le(i,r).value[e]}}function vg(t,e){var n;return(typeof e=="number"?Me:e instanceof On?Ra:(n=On(e))?(e=n,Ra):sg)(t,e)}function NT(t){return function(){this.removeAttribute(t)}}function FT(t){return function(){this.removeAttributeNS(t.space,t.local)}}function zT(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function OT(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function GT(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function WT(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function YT(t,e){var n=Pa(t),r=n==="transform"?wT:vg;return this.attrTween(t,typeof e=="function"?(n.local?WT:GT)(n,r,ec(this,"attr."+t,e)):e==null?(n.local?FT:NT)(n):(n.local?OT:zT)(n,r,e))}function XT(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function VT(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function UT(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&VT(t,o)),n}return i._value=e,i}function HT(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&XT(t,o)),n}return i._value=e,i}function jT(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Pa(t);return this.tween(n,(r.local?UT:HT)(r,e))}function qT(t,e){return function(){tc(this,t).delay=+e.apply(this,arguments)}}function ZT(t,e){return e=+e,function(){tc(this,t).delay=e}}function KT(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?qT:ZT)(e,t)):Le(this.node(),e).delay}function QT(t,e){return function(){Ge(this,t).duration=+e.apply(this,arguments)}}function JT(t,e){return e=+e,function(){Ge(this,t).duration=e}}function tA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?QT:JT)(e,t)):Le(this.node(),e).duration}function eA(t,e){if(typeof e!="function")throw new Error;return function(){Ge(this,t).ease=e}}function nA(t){var e=this._id;return arguments.length?this.each(eA(e,t)):Le(this.node(),e).ease}function rA(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ge(this,t).ease=n}}function iA(t){if(typeof t!="function")throw new Error;return this.each(rA(this._id,t))}function oA(t){typeof t!="function"&&(t=Gd(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new tn(r,this._parents,this._name,this._id)}function aA(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=e[s],u=n[s],c=l.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=l[p]||u[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new tn(a,this._parents,this._name,this._id)}function sA(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function lA(t,e,n){var r,i,o=sA(e)?tc:Ge;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function uA(t,e){var n=this._id;return arguments.length<2?Le(this.node(),n).on.on(t):this.each(lA(n,t,e))}function cA(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function fA(){return this.on("end.remove",cA(this._id))}function hA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Gu(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,f,h=0;h<l;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,Ga(u[h],e,n,h,u,Le(c,n)));return new tn(o,this._parents,e,n)}function pA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Od(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var h=t.call(c,c.__data__,f,l),p,d=Le(c,n),m=0,g=h.length;m<g;++m)(p=h[m])&&Ga(p,e,n,m,h,d);o.push(h),a.push(c)}return new tn(o,a,e,n)}var dA=Vi.prototype.constructor;function gA(){return new dA(this._groups,this._parents)}function mA(t,e){var n,r,i;return function(){var o=Ir(this,t),a=(this.style.removeProperty(t),Ir(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function $g(t){return function(){this.style.removeProperty(t)}}function yA(t,e,n){var r,i=n+"",o;return function(){var a=Ir(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function bA(t,e,n){var r,i,o;return function(){var a=Ir(this,t),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),Ir(this,t))),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}function xA(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var l=Ge(this,t),u=l.on,c=l.value[o]==null?s||(s=$g(e)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function vA(t,e,n){var r=(t+="")=="transform"?ST:vg;return e==null?this.styleTween(t,mA(t,r)).on("end.style."+t,$g(t)):typeof e=="function"?this.styleTween(t,bA(t,r,ec(this,"style."+t,e))).each(xA(this._id,t)):this.styleTween(t,yA(t,r,e),n).on("end.style."+t,null)}function $A(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function _A(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&$A(t,a,n)),r}return o._value=e,o}function SA(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,_A(t,e,n??""))}function wA(t){return function(){this.textContent=t}}function TA(t){return function(){var e=t(this);this.textContent=e??""}}function AA(t){return this.tween("text",typeof t=="function"?TA(ec(this,"text",t)):wA(t==null?"":t+""))}function PA(t){return function(e){this.textContent=t.call(this,e)}}function DA(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&PA(i)),e}return r._value=t,r}function CA(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,DA(t))}function MA(){for(var t=this._name,e=this._id,n=_g(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Le(l,e);Ga(l,t,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new tn(r,this._parents,t,n)}function LA(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=Ge(this,r),c=u.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),u.on=e}),i===0&&o()})}var kA=0;function tn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function _g(){return++kA}var en=Vi.prototype;tn.prototype={constructor:tn,select:hA,selectAll:pA,selectChild:en.selectChild,selectChildren:en.selectChildren,filter:oA,merge:aA,selection:gA,transition:MA,call:en.call,nodes:en.nodes,node:en.node,size:en.size,empty:en.empty,each:en.each,on:uA,attr:YT,attrTween:jT,style:vA,styleTween:SA,text:AA,textTween:CA,remove:fA,tween:BT,delay:KT,duration:tA,ease:nA,easeVarying:iA,end:LA,[Symbol.iterator]:en[Symbol.iterator]};function RA(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var EA={time:null,delay:0,duration:250,ease:RA};function IA(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function BA(t){var e,n;t instanceof tn?(e=t._id,t=t._name):(e=_g(),(n=EA).time=Zu(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Ga(l,t,e,u,a,n||IA(l,e));return new tn(r,this._parents,t,e)}Vi.prototype.interrupt=RT,Vi.prototype.transition=BA;function NA(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Wa(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Fr(t){return t=Wa(Math.abs(t)),t?t[1]:NaN}function FA(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function zA(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var OA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ya(t){if(!(e=OA.exec(t)))throw new Error("invalid format: "+t);var e;return new nc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ya.prototype=nc.prototype;function nc(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}nc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function GA(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Sg;function WA(t,e){var n=Wa(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Sg=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+Wa(t,Math.max(0,e+o-1))[0]}function wg(t,e){var n=Wa(t,e);if(!n)return t+"";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")}const Tg={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:NA,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>wg(t*100,e),r:wg,s:WA,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ag(t){return t}var Pg=Array.prototype.map,Dg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function YA(t){var e=t.grouping===void 0||t.thousands===void 0?Ag:FA(Pg.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Ag:zA(Pg.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=Ya(f);var h=f.fill,p=f.align,d=f.sign,m=f.symbol,g=f.zero,y=f.width,b=f.comma,v=f.precision,x=f.trim,_=f.type;_==="n"?(b=!0,_="g"):Tg[_]||(v===void 0&&(v=12),x=!0,_="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var A=m==="$"?n:m==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",S=m==="$"?r:/[%p]/.test(_)?a:"",P=Tg[_],C=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function B($){var k=A,M=S,T,w,D;if(_==="c")M=P($)+M,$="";else{$=+$;var F=$<0||1/$<0;if($=isNaN($)?l:P(Math.abs($),v),x&&($=GA($)),F&&+$==0&&d!=="+"&&(F=!1),k=(F?d==="("?d:s:d==="-"||d==="("?"":d)+k,M=(_==="s"?Dg[8+Sg/3]:"")+M+(F&&d==="("?")":""),C){for(T=-1,w=$.length;++T<w;)if(D=$.charCodeAt(T),48>D||D>57){M=(D===46?i+$.slice(T+1):$.slice(T))+M,$=$.slice(0,T);break}}}b&&!g&&($=e($,1/0));var z=k.length+$.length+M.length,I=z<y?new Array(y-z+1).join(h):"";switch(b&&g&&($=e(I+$,I.length?y-M.length:1/0),I=""),p){case"<":$=k+$+M+I;break;case"=":$=k+I+$+M;break;case"^":$=I.slice(0,z=I.length>>1)+k+$+M+I.slice(z);break;default:$=I+k+$+M;break}return o($)}return B.toString=function(){return f+""},B}function c(f,h){var p=u((f=Ya(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Fr(h)/3)))*3,m=Math.pow(10,-d),g=Dg[8+d/3];return function(y){return p(m*y)+g}}return{format:u,formatPrefix:c}}var Xa,Cg,Mg;XA({thousands:",",grouping:[3],currency:["$",""]});function XA(t){return Xa=YA(t),Cg=Xa.format,Mg=Xa.formatPrefix,Xa}function VA(t){return Math.max(0,-Fr(Math.abs(t)))}function UA(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fr(e)/3)))*3-Fr(Math.abs(t)))}function HA(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Fr(e)-Fr(t))+1}function Lg(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function jA(t){return function(){return t}}function qA(t){return+t}var kg=[0,1];function zr(t){return t}function rc(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:jA(isNaN(e)?NaN:.5)}function ZA(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function KA(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=rc(i,r),o=n(a,o)):(r=rc(r,i),o=n(o,a)),function(s){return o(r(s))}}function QA(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=rc(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var l=Id(t,s,1,r)-1;return o[l](i[l](s))}}function JA(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function tP(){var t=kg,e=kg,n=qu,r,i,o,a=zr,s,l,u;function c(){var h=Math.min(t.length,e.length);return a!==zr&&(a=ZA(t[0],t[h-1])),s=h>2?QA:KA,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((u||(u=s(e,t.map(r),Me)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,qA),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=vT,c()},f.clamp=function(h){return arguments.length?(a=h?!0:zr,c()):a!==zr},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function eP(){return tP()(zr,zr)}function nP(t,e,n,r){var i=gS(t,e,n),o;switch(r=Ya(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=UA(i,a))&&(r.precision=o),Mg(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=HA(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=VA(i))&&(r.precision=o-(r.type==="%")*2);break}}return Cg(r)}function Rg(t){var e=t.domain;return t.ticks=function(n){var r=e();return dS(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return nP(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);c-- >0;){if(u=zu(a,s,n),u===l)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function Ji(){var t=eP();return t.copy=function(){return JA(t,Ji())},Lg.apply(t,arguments),Rg(t)}function Eg(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[Id(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*e-(l-n)*t)/(n+1);return a}return a.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,s()):[t,e]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Eg().domain([t,e]).range(i).unknown(o)},Lg.apply(Rg(a),arguments)}function to(t,e,n){this.k=t,this.x=e,this.y=n}to.prototype={constructor:to,scale:function(t){return t===1?this:new to(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new to(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},to.prototype;function ic(t){const e=[0,0];return t.length?t.reduce((n,r)=>[r<n[0]?r:n[0],r>n[1]?r:n[1]],[t[0],t[0]]):e}function rP(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function Ig(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:o}=e.rowAmount*e.columnAmount>=n?e:rP(n);return new Array(n).fill(null).map((a,s)=>{const l=s%o,u=Math.floor(s/o),c=(t.width-r*(o-1))/o,f=(t.height-r*(i-1))/i,h=l*c+l*r,p=u*f+u*r,d=[h,p],m=[c/t.width,f/t.height];return{slotIndex:s,rowIndex:u,columnIndex:l,translate:d,scale:m}})}var oc=function(t,e){return oc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},oc(t,e)};function We(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");oc(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function iP(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(f){a(f)}}function l(c){try{u(r.throw(c))}catch(f){a(f)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(t,[])).next())})}function Bg(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Or(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gr(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Wr(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}function Yr(t){return this instanceof Yr?(this.v=t,this):new Yr(t)}function oP(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,f)}}function s(p,d){r[p]&&(i[p]=function(m){return new Promise(function(g,y){o.push([p,m,g,y])>1||l(p,m)})},d&&(i[p]=d(i[p])))}function l(p,d){try{u(r[p](d))}catch(m){h(o[0][3],m)}}function u(p){p.value instanceof Yr?Promise.resolve(p.value.v).then(c,f):h(o[0][2],p)}function c(p){l("next",p)}function f(p){l("throw",p)}function h(p,d){p(d),o.shift(),o.length&&l(o[0][0],o[0][1])}}function aP(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Or=="function"?Or(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=t[o]&&function(a){return new Promise(function(s,l){a=t[o](a),i(s,l,a.done,a.value)})}}function i(o,a,s,l){Promise.resolve(l).then(function(u){o({value:u,done:s})},a)}}function Lt(t){return typeof t=="function"}function ac(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var sc=ac(function(t){return function(e){t(this),this.message=e?e.length+` errors occurred during unsubscription:
|
39
|
-
`+
|
40
|
-
`):"",this.name="UnsubscriptionError",this.errors=e}});function Va(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var eo=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Or(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(m){e={error:m}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(Lt(c))try{c()}catch(m){o=m instanceof sc?m.errors:[m]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var h=Or(f),p=h.next();!p.done;p=h.next()){var d=p.value;try{zg(d)}catch(m){o=o??[],m instanceof sc?o=Wr(Wr([],Gr(o)),Gr(m.errors)):o.push(m)}}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new sc(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)zg(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Va(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Va(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Ng=eo.EMPTY;function Fg(t){return t instanceof eo||t&&"closed"in t&&Lt(t.remove)&&Lt(t.add)&&Lt(t.unsubscribe)}function zg(t){Lt(t)?t():t.unsubscribe()}var Og={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},sP={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Wr([t,e],Gr(n)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Gg(t){sP.setTimeout(function(){throw t})}function lc(){}function Ua(t){t()}var uc=function(t){We(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Fg(n)&&n.add(r)):r.destination=fP,r}return e.create=function(n,r,i){return new no(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(eo),lP=Function.prototype.bind;function cc(t,e){return lP.call(t,e)}var uP=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Ha(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Ha(r)}else Ha(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Ha(n)}},t}(),no=function(t){We(e,t);function e(n,r,i){var o=t.call(this)||this,a;if(Lt(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&Og.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&cc(n.next,s),error:n.error&&cc(n.error,s),complete:n.complete&&cc(n.complete,s)}):a=n}return o.destination=new uP(a),o}return e}(uc);function Ha(t){Gg(t)}function cP(t){throw t}var fP={closed:!0,next:lc,error:cP,complete:lc},fc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ja(t){return t}function hP(t){return t.length===0?ja:t.length===1?t[0]:function(e){return t.reduce(function(n,r){return r(n)},e)}}var pe=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,o=dP(e)?e:new no(e,n,r);return Ua(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=Wg(n),new n(function(i,o){var a=new no({next:function(s){try{e(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[fc]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return hP(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=Wg(e),new e(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},t.create=function(e){return new t(e)},t}();function Wg(t){var e;return(e=t??Og.Promise)!==null&&e!==void 0?e:Promise}function pP(t){return t&&Lt(t.next)&&Lt(t.error)&&Lt(t.complete)}function dP(t){return t&&t instanceof uc||pP(t)&&Fg(t)}function gP(t){return Lt(t==null?void 0:t.lift)}function Xn(t){return function(e){if(gP(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Vn(t,e,n,r,i){return new mP(t,e,n,r,i)}var mP=function(t){We(e,t);function e(n,r,i,o,a,s){var l=t.call(this,n)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=r?function(u){try{r(u)}catch(c){n.error(c)}}:t.prototype._next,l._error=o?function(u){try{o(u)}catch(c){n.error(c)}finally{this.unsubscribe()}}:t.prototype._error,l._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:t.prototype._complete,l}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(uc),yP=ac(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Xr=function(t){We(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new Yg(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new yP},e.prototype.next=function(n){var r=this;Ua(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Or(r.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Ua(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Ua(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Ng:(this.currentObservers=null,s.push(n),new eo(function(){r.currentObservers=null,Va(s,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},e.prototype.asObservable=function(){var n=new pe;return n.source=this,n},e.create=function(n,r){return new Yg(n,r)},e}(pe),Yg=function(t){We(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Ng},e}(Xr),Xg=function(t){We(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(Xr),hc={now:function(){return(hc.delegate||Date).now()},delegate:void 0},bP=function(t){We(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=hc);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return e.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,l=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+l)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!n.closed;l+=o?1:2)n.next(s[l]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,c=1;c<o.length&&o[c]<=l;c+=2)u=c;u&&o.splice(0,u+1)}},e}(Xr),xP=function(t){We(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(eo),Vg={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Wr([t,e],Gr(n)))},clearInterval:function(t){return clearInterval(t)},delegate:void 0},vP=function(t){We(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Vg.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Vg.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Va(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(xP),Ug=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=hc.now,t}(),$P=function(t){We(e,t);function e(n,r){r===void 0&&(r=Ug.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(Ug);new $P(vP);function _P(t){return t&&Lt(t.schedule)}function Hg(t){return t[t.length-1]}function SP(t){return Lt(Hg(t))?t.pop():void 0}function wP(t){return _P(Hg(t))?t.pop():void 0}var jg=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function qg(t){return Lt(t==null?void 0:t.then)}function Zg(t){return Lt(t[fc])}function Kg(t){return Symbol.asyncIterator&&Lt(t==null?void 0:t[Symbol.asyncIterator])}function Qg(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function TP(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Jg=TP();function t0(t){return Lt(t==null?void 0:t[Jg])}function e0(t){return oP(this,arguments,function(){var e,n,r,i;return Bg(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Yr(e.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,Yr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Yr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function n0(t){return Lt(t==null?void 0:t.getReader)}function Un(t){if(t instanceof pe)return t;if(t!=null){if(Zg(t))return AP(t);if(jg(t))return PP(t);if(qg(t))return DP(t);if(Kg(t))return r0(t);if(t0(t))return CP(t);if(n0(t))return MP(t)}throw Qg(t)}function AP(t){return new pe(function(e){var n=t[fc]();if(Lt(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function PP(t){return new pe(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function DP(t){return new pe(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,Gg)})}function CP(t){return new pe(function(e){var n,r;try{for(var i=Or(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function r0(t){return new pe(function(e){LP(t,e).catch(function(n){return e.error(n)})})}function MP(t){return r0(e0(t))}function LP(t,e){var n,r,i,o;return iP(this,void 0,void 0,function(){var a,s;return Bg(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=aP(t),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(a=r.value,e.next(a),e.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function _n(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}function i0(t,e){return e===void 0&&(e=0),Xn(function(n,r){n.subscribe(Vn(r,function(i){return _n(r,t,function(){return r.next(i)},e)},function(){return _n(r,t,function(){return r.complete()},e)},function(i){return _n(r,t,function(){return r.error(i)},e)}))})}function o0(t,e){return e===void 0&&(e=0),Xn(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function kP(t,e){return Un(t).pipe(o0(e),i0(e))}function RP(t,e){return Un(t).pipe(o0(e),i0(e))}function EP(t,e){return new pe(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function IP(t,e){return new pe(function(n){var r;return _n(n,e,function(){r=t[Jg](),_n(n,e,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Lt(r==null?void 0:r.return)&&r.return()}})}function a0(t,e){if(!t)throw new Error("Iterable cannot be null");return new pe(function(n){_n(n,e,function(){var r=t[Symbol.asyncIterator]();_n(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function BP(t,e){return a0(e0(t),e)}function NP(t,e){if(t!=null){if(Zg(t))return kP(t,e);if(jg(t))return EP(t,e);if(qg(t))return RP(t,e);if(Kg(t))return a0(t,e);if(t0(t))return IP(t,e);if(n0(t))return BP(t,e)}throw Qg(t)}function s0(t,e){return e?NP(t,e):Un(t)}ac(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Vr(t,e){return Xn(function(n,r){var i=0;n.subscribe(Vn(r,function(o){r.next(t.call(e,o,i++))}))})}var FP=Array.isArray;function zP(t,e){return FP(e)?t.apply(void 0,Wr([],Gr(e))):t(e)}function OP(t){return Vr(function(e){return zP(t,e)})}var GP=Array.isArray,WP=Object.getPrototypeOf,YP=Object.prototype,XP=Object.keys;function VP(t){if(t.length===1){var e=t[0];if(GP(e))return{args:e,keys:null};if(UP(e)){var n=XP(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function UP(t){return t&&typeof t=="object"&&WP(t)===YP}function HP(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function l0(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=wP(t),r=SP(t),i=VP(t),o=i.args,a=i.keys;if(o.length===0)return s0([],n);var s=new pe(jP(o,n,a?function(l){return HP(a,l)}:ja));return r?s.pipe(OP(r)):s}function jP(t,e,n){return n===void 0&&(n=ja),function(r){u0(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,l=function(c){u0(e,function(){var f=s0(t[c],e),h=!1;f.subscribe(Vn(r,function(p){o[c]=p,h||(h=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)l(u)},r)}}function u0(t,e,n){t?_n(n,t,e):e()}function qP(t,e){return e===void 0&&(e=ja),t=t??ZP,Xn(function(n,r){var i,o=!0;n.subscribe(Vn(r,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,r.next(a))}))})}function ZP(t,e){return t===e}function KP(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new Xr}:e,r=t.resetOnError,i=r===void 0?!0:r,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,l=s===void 0?!0:s;return function(u){var c,f,h,p=0,d=!1,m=!1,g=function(){f==null||f.unsubscribe(),f=void 0},y=function(){g(),c=h=void 0,d=m=!1},b=function(){var v=c;y(),v==null||v.unsubscribe()};return Xn(function(v,x){p++,!m&&!d&&g();var _=h=h??n();x.add(function(){p--,p===0&&!m&&!d&&(f=pc(b,l))}),_.subscribe(x),!c&&p>0&&(c=new no({next:function(A){return _.next(A)},error:function(A){m=!0,g(),f=pc(y,i,A),_.error(A)},complete:function(){d=!0,g(),f=pc(y,a),_.complete()}}),Un(v).subscribe(c))})(u)}}function pc(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new no({next:function(){i.unsubscribe(),t()}});return Un(e.apply(void 0,Wr([],Gr(n)))).subscribe(i)}}function QP(t,e,n){var r,i=!1;return r=t,KP({connector:function(){return new bP(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function dc(t,e){return Xn(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(Vn(r,function(l){i==null||i.unsubscribe();var u=0,c=o++;Un(t(l,c)).subscribe(i=Vn(r,function(f){return r.next(e?e(l,f,c,u++):f)},function(){i=null,s()}))},function(){a=!0,s()}))})}function c0(t){return Xn(function(e,n){Un(t).subscribe(Vn(n,function(){return n.complete()},lc)),!n.closed&&e.subscribe(n)})}const JP=t=>t.pipe(Vr(e=>e.styles.textSize),qP(),Vr(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),ro=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=he.scaleDomain,scaleRange:i=he.scaleRange,reverse:o=!1})=>{const a=r[0]??he.scaleDomain[0],s=r[1]??he.scaleDomain[1],l=i[0]??he.scaleRange[0],u=i[1]??he.scaleRange[1];let c=a==="auto"?e<0?e:0:a==="min"?e:a,f=s==="auto"?t>=0?t:0:s==="max"?t:s;const h=t-(t-c)/(1-l),p=f/u;return o?Ji().domain([h,p]).range([n,0]):Ji().domain([h,p]).range([0,n])},f0=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=he.scaleDomain,scaleRange:i=he.scaleRange,reverse:o=!1})=>{e===t&&(t+=1,e-=1);const a=r[0]??he.scaleDomain[0],s=r[1]??he.scaleDomain[1],l=i[0]??he.scaleRange[0],u=i[1]??he.scaleRange[1];let c=a==="auto"?e<0?e:0:a==="min"?e:a,f=s==="auto"?t>=0?t:0:s==="max"?t:s;const h=t-(t-c)/(1-l),p=f/u;return o?Ji().domain([n,0]).range([h,p]):Ji().domain([0,n]).range([h,p])},h0=({axisLabels:t,axisWidth:e,padding:n=0,reverse:r=!1})=>{let i=t.map((l,u)=>u);r&&i.reverse();const o=i.length-1+n*2,a=e/o,s=a*n-a*.5;return Eg().domain([s,e-s]).range(i)},p0=({computedData$:t,fullDataFormatter$:e,layout$:n})=>l0({computedData:t,fullDataFormatter:e,layout:n}).pipe(dc(async r=>r),Vr(r=>{if(r.fullDataFormatter.separateSeries)return Ig(r.layout,r.fullDataFormatter.container,r.computedData.length);{const i=Ig(r.layout,r.fullDataFormatter.container,1);return r.computedData.map((o,a)=>i[0])}})),d0=({fullDataFormatter$:t,layout$:e})=>{const n=new Xr;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let l=0,u=0,c=0,f=0,h=0;return i.position==="bottom"?o.position==="left"?(f=180,u=s):o.position==="right"?(f=180,h=180,l=a,u=s):(f=180,u=s):i.position==="top"?o.position==="left"||(o.position==="right"?(h=180,l=a):(f=180,u=s)):i.position==="left"?o.position==="bottom"?(c=-90,u=s):o.position==="top"?(c=-90,h=180):(f=180,u=s):i.position==="right"?o.position==="bottom"?(c=-90,f=180,u=s,l=a):o.position==="top"?(c=-90,f=180,h=180,l=a):(f=180,u=s):(f=180,u=s),{translate:[l,u],scale:[1,1],rotate:c,rotateX:f,rotateY:h,value:`translate(${l}px, ${u}px) rotate(${c}deg) rotateX(${f}deg) rotateY(${h}deg)`}}return new pe(i=>(l0({fullDataFormatter:t,layout:e}).pipe(c0(n),dc(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.groupAxis,yAxis:o.fullDataFormatter.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},g0=({gridAxesTransform$:t})=>t.pipe(Vr(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,o=e.rotateX*-1,a=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${o}deg) rotateY(${a}deg) rotate(${i}deg)`}}));function tD(t){return`[OrbCharts warn]: ${t.message}`}function eD({columnName:t,expectToBe:e,from:n}){return`Invalid value: '${t}' must be '${e}'
|
45
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function _a(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Vi=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Lr(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(xe(c))try{c()}catch(g){o=g instanceof Pu?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=Lr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{Sd(d)}catch(g){o=o??[],g instanceof Pu?o=kr(kr([],Wn(o)),Wn(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new Pu(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Sd(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&_a(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&_a(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),$d=Vi.EMPTY;function vd(e){return e instanceof Vi||e&&"closed"in e&&xe(e.remove)&&xe(e.add)&&xe(e.unsubscribe)}function Sd(e){xe(e)?e():e.unsubscribe()}var _d={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},wd={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,kr([e,t],Wn(n)))},clearTimeout:function(e){var t=wd.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Td(e){wd.setTimeout(function(){throw e})}function Cu(){}function wa(e){e()}var Du=function(e){Gt(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,vd(n)&&n.add(r)):r.destination=$S,r}return t.create=function(n,r,i){return new ji(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Vi),yS=Function.prototype.bind;function Mu(e,t){return yS.call(e,t)}var bS=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Ta(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Ta(r)}else Ta(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Ta(n)}},e}(),ji=function(e){Gt(t,e);function t(n,r,i){var o=e.call(this)||this,a;if(xe(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&_d.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&Mu(n.next,s),error:n.error&&Mu(n.error,s),complete:n.complete&&Mu(n.complete,s)}):a=n}return o.destination=new bS(a),o}return t}(Du);function Ta(e){Td(e)}function xS(e){throw e}var $S={closed:!0,next:Cu,error:xS,complete:Cu},Lu=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Er(e){return e}function vS(e){return e.length===0?Er:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var ge=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=_S(t)?t:new ji(t,n,r);return wa(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=Ad(n),new n(function(i,o){var a=new ji({next:function(s){try{t(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Lu]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return vS(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=Ad(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function Ad(e){var t;return(t=e??_d.Promise)!==null&&t!==void 0?t:Promise}function SS(e){return e&&xe(e.next)&&xe(e.error)&&xe(e.complete)}function _S(e){return e&&e instanceof Du||SS(e)&&vd(e)}function wS(e){return xe(e==null?void 0:e.lift)}function pt(e){return function(t){if(wS(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function at(e,t,n,r,i){return new TS(e,t,n,r,i)}var TS=function(e){Gt(t,e);function t(n,r,i,o,a,s){var l=e.call(this,n)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=r?function(u){try{r(u)}catch(c){n.error(c)}}:e.prototype._next,l._error=o?function(u){try{o(u)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(Du),AS=Au(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Q=function(e){Gt(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new Pd(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new AS},t.prototype.next=function(n){var r=this;wa(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Lr(r.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;wa(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;wa(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?$d:(this.currentObservers=null,s.push(n),new Vi(function(){r.currentObservers=null,_a(s,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},t.prototype.asObservable=function(){var n=new ge;return n.source=this,n},t.create=function(n,r){return new Pd(n,r)},t}(ge),Pd=function(e){Gt(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:$d},t}(Q),ku=function(e){Gt(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(Q),Ru={now:function(){return(Ru.delegate||Date).now()},delegate:void 0},PS=function(e){Gt(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Ru);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,l=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+l)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!n.closed;l+=o?1:2)n.next(s[l]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,c=1;c<o.length&&o[c]<=l;c+=2)u=c;u&&o.splice(0,u+1)}},t}(Q),CS=function(e){Gt(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(Vi),Eu={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,kr([e,t],Wn(n)))},clearInterval:function(e){var t=Eu.delegate;return((t==null?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},DS=function(e){Gt(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),Eu.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&Eu.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,_a(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(CS),Cd=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=Ru.now,e}(),MS=function(e){Gt(t,e);function t(n,r){r===void 0&&(r=Cd.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(Cd),LS=new MS(DS),Aa=new ge(function(e){return e.complete()});function kS(e){return e&&xe(e.schedule)}function Iu(e){return e[e.length-1]}function RS(e){return xe(Iu(e))?e.pop():void 0}function Bu(e){return kS(Iu(e))?e.pop():void 0}function ES(e,t){return typeof Iu(e)=="number"?e.pop():t}var Nu=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function Dd(e){return xe(e==null?void 0:e.then)}function Md(e){return xe(e[Lu])}function Ld(e){return Symbol.asyncIterator&&xe(e==null?void 0:e[Symbol.asyncIterator])}function kd(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function IS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Rd=IS();function Ed(e){return xe(e==null?void 0:e[Rd])}function Id(e){return gS(this,arguments,function(){var n,r,i,o;return xd(this,function(a){switch(a.label){case 0:n=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,Rr(n.read())];case 3:return r=a.sent(),i=r.value,o=r.done,o?[4,Rr(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,Rr(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Bd(e){return xe(e==null?void 0:e.getReader)}function vt(e){if(e instanceof ge)return e;if(e!=null){if(Md(e))return BS(e);if(Nu(e))return NS(e);if(Dd(e))return FS(e);if(Ld(e))return Nd(e);if(Ed(e))return zS(e);if(Bd(e))return OS(e)}throw kd(e)}function BS(e){return new ge(function(t){var n=e[Lu]();if(xe(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function NS(e){return new ge(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function FS(e){return new ge(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,Td)})}function zS(e){return new ge(function(t){var n,r;try{for(var i=Lr(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function Nd(e){return new ge(function(t){GS(e,t).catch(function(n){return t.error(n)})})}function OS(e){return Nd(Id(e))}function GS(e,t){var n,r,i,o;return dS(this,void 0,void 0,function(){var a,s;return xd(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=mS(e),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function wn(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function Fd(e,t){return t===void 0&&(t=0),pt(function(n,r){n.subscribe(at(r,function(i){return wn(r,e,function(){return r.next(i)},t)},function(){return wn(r,e,function(){return r.complete()},t)},function(i){return wn(r,e,function(){return r.error(i)},t)}))})}function zd(e,t){return t===void 0&&(t=0),pt(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function WS(e,t){return vt(e).pipe(zd(t),Fd(t))}function YS(e,t){return vt(e).pipe(zd(t),Fd(t))}function VS(e,t){return new ge(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function jS(e,t){return new ge(function(n){var r;return wn(n,t,function(){r=e[Rd](),wn(n,t,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return xe(r==null?void 0:r.return)&&r.return()}})}function Od(e,t){if(!e)throw new Error("Iterable cannot be null");return new ge(function(n){wn(n,t,function(){var r=e[Symbol.asyncIterator]();wn(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function XS(e,t){return Od(Id(e),t)}function US(e,t){if(e!=null){if(Md(e))return WS(e,t);if(Nu(e))return VS(e,t);if(Dd(e))return YS(e,t);if(Ld(e))return Od(e,t);if(Ed(e))return jS(e,t);if(Bd(e))return XS(e,t)}throw kd(e)}function Pa(e,t){return t?US(e,t):vt(e)}function Wt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Bu(e);return Pa(e,n)}var Gd=Au(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function L(e,t){return pt(function(n,r){var i=0;n.subscribe(at(r,function(o){r.next(e.call(t,o,i++))}))})}var HS=Array.isArray;function qS(e,t){return HS(t)?e.apply(void 0,kr([],Wn(t))):e(t)}function Wd(e){return L(function(t){return qS(e,t)})}var ZS=Array.isArray,KS=Object.getPrototypeOf,QS=Object.prototype,JS=Object.keys;function e_(e){if(e.length===1){var t=e[0];if(ZS(t))return{args:t,keys:null};if(t_(t)){var n=JS(t);return{args:n.map(function(r){return t[r]}),keys:n}}}return{args:e,keys:null}}function t_(e){return e&&typeof e=="object"&&KS(e)===QS}function n_(e,t){return e.reduce(function(n,r,i){return n[r]=t[i],n},{})}function G(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Bu(e),r=RS(e),i=e_(e),o=i.args,a=i.keys;if(o.length===0)return Pa([],n);var s=new ge(r_(o,n,a?function(l){return n_(a,l)}:Er));return r?s.pipe(Wd(r)):s}function r_(e,t,n){return n===void 0&&(n=Er),function(r){Yd(t,function(){for(var i=e.length,o=new Array(i),a=i,s=i,l=function(c){Yd(t,function(){var h=Pa(e[c],t),f=!1;h.subscribe(at(r,function(p){o[c]=p,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)l(u)},r)}}function Yd(e,t,n){e?wn(n,e,t):t()}function i_(e,t,n,r,i,o,a,s){var l=[],u=0,c=0,h=!1,f=function(){h&&!l.length&&!u&&t.complete()},p=function(g){return u<r?d(g):l.push(g)},d=function(g){u++;var m=!1;vt(n(g,c++)).subscribe(at(t,function(b){t.next(b)},function(){m=!0},void 0,function(){if(m)try{u--;for(var b=function(){var y=l.shift();a||d(y)};l.length&&u<r;)b();f()}catch(y){t.error(y)}}))};return e.subscribe(at(t,p,function(){h=!0,f()})),function(){}}function Fu(e,t,n){return n===void 0&&(n=1/0),xe(t)?Fu(function(r,i){return L(function(o,a){return t(r,o,i,a)})(vt(e(r,i)))},n):(typeof t=="number"&&(n=t),pt(function(r,i){return i_(r,i,e,n)}))}function o_(e){return e===void 0&&(e=1/0),Fu(Er,e)}function a_(e){return new ge(function(t){vt(e()).subscribe(t)})}var s_=["addListener","removeListener"],l_=["addEventListener","removeEventListener"],u_=["on","off"];function zu(e,t,n,r){if(xe(n)&&(r=n,n=void 0),r)return zu(e,t,n).pipe(Wd(r));var i=Wn(h_(e)?l_.map(function(s){return function(l){return e[s](t,l,n)}}):c_(e)?s_.map(Vd(e,t)):f_(e)?u_.map(Vd(e,t)):[],2),o=i[0],a=i[1];if(!o&&Nu(e))return Fu(function(s){return zu(s,t,n)})(vt(e));if(!o)throw new TypeError("Invalid event target");return new ge(function(s){var l=function(){for(var u=[],c=0;c<arguments.length;c++)u[c]=arguments[c];return s.next(1<u.length?u:u[0])};return o(l),function(){return a(l)}})}function Vd(e,t){return function(n){return function(r){return e[n](t,r)}}}function c_(e){return xe(e.addListener)&&xe(e.removeListener)}function f_(e){return xe(e.on)&&xe(e.off)}function h_(e){return xe(e.addEventListener)&&xe(e.removeEventListener)}function Yn(e,t,n){return a_(function(){return e()?t:n})}function Ou(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Bu(e),r=ES(e,1/0),i=e;return i.length?i.length===1?vt(i[0]):o_(r)(Pa(i,n)):Aa}function Ir(e,t){return pt(function(n,r){var i=0;n.subscribe(at(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function p_(e,t){return t===void 0&&(t=LS),pt(function(n,r){var i=null,o=null,a=null,s=function(){if(i){i.unsubscribe(),i=null;var u=o;o=null,r.next(u)}};function l(){var u=a+e,c=t.now();if(c<u){i=this.schedule(void 0,u-c),r.add(i);return}s()}n.subscribe(at(r,function(u){o=u,a=t.now(),i||(i=t.schedule(l,e),r.add(i))},function(){s(),r.complete()},void 0,function(){o=i=null}))})}function d_(e){return pt(function(t,n){var r=!1;t.subscribe(at(n,function(i){r=!0,n.next(i)},function(){r||n.next(e),n.complete()}))})}function g_(e){return e<=0?function(){return Aa}:pt(function(t,n){var r=0;t.subscribe(at(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function K(e,t){return t===void 0&&(t=Er),e=e??m_,pt(function(n,r){var i,o=!0;n.subscribe(at(r,function(a){var s=t(a);(o||!e(i,s))&&(o=!1,i=s,r.next(a))}))})}function m_(e,t){return e===t}function y_(e){return e===void 0&&(e=b_),pt(function(t,n){var r=!1;t.subscribe(at(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(e())}))})}function b_(){return new Gd}function Xi(e,t){var n=arguments.length>=2;return function(r){return r.pipe(Er,g_(1),n?d_(t):y_(function(){return new Gd}))}}function x_(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new Q}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,a=o===void 0?!0:o,s=e.resetOnRefCountZero,l=s===void 0?!0:s;return function(u){var c,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},b=function(){m(),c=f=void 0,d=g=!1},y=function(){var x=c;b(),x==null||x.unsubscribe()};return pt(function(x,$){p++,!g&&!d&&m();var S=f=f??n();$.add(function(){p--,p===0&&!g&&!d&&(h=Gu(y,l))}),S.subscribe($),!c&&p>0&&(c=new ji({next:function(A){return S.next(A)},error:function(A){g=!0,m(),h=Gu(b,i,A),S.error(A)},complete:function(){d=!0,m(),h=Gu(b,a),S.complete()}}),vt(x).subscribe(c))})(u)}}function Gu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new ji({next:function(){i.unsubscribe(),e()}});return vt(t.apply(void 0,kr([],Wn(n)))).subscribe(i)}}function se(e,t,n){var r,i=!1;return r=e,x_({connector:function(){return new PS(r,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function z(e,t){return pt(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(at(r,function(l){i==null||i.unsubscribe();var u=0,c=o++;vt(e(l,c)).subscribe(i=at(r,function(h){return r.next(t?t(l,h,c,u++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function D(e){return pt(function(t,n){vt(e).subscribe(at(n,function(){return n.complete()},Cu)),!n.closed&&t.subscribe(n)})}const dt={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},$_={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},v_={gap:120,rowAmount:1,columnAmount:1},S_={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...dt},groupAxis:{...$_},separateSeries:!1},__={type:"grid",visibleFilter:(e,t)=>!0,...S_,container:{...v_}};__.visibleFilter.toString=()=>"(datum, context) => true";function Br(e){return Object.prototype.toString.call(e)==="[object Object]"}function w_(e){return Object.prototype.toString.call(e)==="[object Function]"}function Wu(e,t){if(Br(e)===!1||Br(t)===!1)return Object.assign({},t);const n=(r,i)=>{const o=Object.assign({},i);for(let a of Object.keys(r)){if(!(a in i))continue;let s;Br(r[a])&&Br(i[a])?(s=n(r[a],i[a]),o[a]=s):o[a]=r[a]}return o};return n(e,t)}function T_(e,t){const n={string:i=>typeof i=="string",number:i=>typeof i=="number",boolean:i=>typeof i=="boolean",object:i=>Br(i),"object[]":i=>Array.isArray(i)&&i.every(o=>Br(o)),"string[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="string"),"number[]":i=>Array.isArray(i)&&i.every(o=>typeof o=="number"),Function:i=>w_(i),null:i=>i===null,undefined:i=>i===void 0},r={ColorType:i=>i==="none"||i==="label"||i==="primary"||i==="secondary"||i==="labelContrast"||i==="background"};return Object.keys(e).find(i=>{if(t[i]){const o=t[i],a=e[i];if(o.toBeTypes){if(o.toBeTypes.some(s=>n[s](a))===!1)return!0}else if(o.toBe){const{toBe:s,test:l}=o;if(l(a)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](a)===!1)return!0}}return!1})}function A_(e,t){const n=T_(e,t);if(n){const r=t[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}function Ca(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function P_(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function jd(e){let t,n,r;e.length!==2?(t=Ca,n=(s,l)=>Ca(e(s),l),r=(s,l)=>e(s)-l):(t=e===Ca||e===P_?e:C_,n=e,r=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const h=u+c>>>1;n(s[h],l)<0?u=h+1:c=h}while(u<c)}return u}function o(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const h=u+c>>>1;n(s[h],l)<=0?u=h+1:c=h}while(u<c)}return u}function a(s,l,u=0,c=s.length){const h=i(s,l,u,c-1);return h>u&&r(s[h-1],l)>-r(s[h],l)?h-1:h}return{left:i,center:a,right:o}}function C_(){return 0}function D_(e){return e===null?NaN:+e}const M_=jd(Ca),Xd=M_.right;jd(D_).center;class Ud extends Map{constructor(t,n=R_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Hd(this,t))}has(t){return super.has(Hd(this,t))}set(t,n){return super.set(L_(this,t),n)}delete(t){return super.delete(k_(this,t))}}function Hd({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function L_({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function k_({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function R_(e){return e!==null&&typeof e=="object"?e.valueOf():e}const E_=Math.sqrt(50),I_=Math.sqrt(10),B_=Math.sqrt(2);function Da(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=E_?10:o>=I_?5:o>=B_?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?Da(e,t,n*2):[s,l,u]}function N_(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Da(t,e,n):Da(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function Yu(e,t,n){return t=+t,e=+e,n=+n,Da(e,t,n)[2]}function F_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Yu(t,e,n):Yu(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function z_(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}var O_={value:()=>{}};function qd(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ma(n)}function Ma(e){this._=e}function G_(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ma.prototype=qd.prototype={constructor:Ma,on:function(e,t){var n=this._,r=G_(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=W_(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=Zd(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Zd(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ma(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function W_(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Zd(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=O_,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Vu="http://www.w3.org/1999/xhtml";const Kd={svg:"http://www.w3.org/2000/svg",xhtml:Vu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function La(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Kd.hasOwnProperty(t)?{space:Kd[t],local:e}:e}function Y_(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Vu&&t.documentElement.namespaceURI===Vu?t.createElement(e):t.createElementNS(n,e)}}function V_(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qd(e){var t=La(e);return(t.local?V_:Y_)(t)}function j_(){}function ju(e){return e==null?j_:function(){return this.querySelector(e)}}function X_(e){typeof e!="function"&&(e=ju(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=e.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Ct(r,this._parents)}function U_(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function H_(){return[]}function Jd(e){return e==null?H_:function(){return this.querySelectorAll(e)}}function q_(e){return function(){return U_(e.apply(this,arguments))}}function Z_(e){typeof e=="function"?e=q_(e):e=Jd(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new Ct(r,i)}function eg(e){return function(){return this.matches(e)}}function tg(e){return function(t){return t.matches(e)}}var K_=Array.prototype.find;function Q_(e){return function(){return K_.call(this.children,e)}}function J_(){return this.firstElementChild}function ew(e){return this.select(e==null?J_:Q_(typeof e=="function"?e:tg(e)))}var tw=Array.prototype.filter;function nw(){return Array.from(this.children)}function rw(e){return function(){return tw.call(this.children,e)}}function iw(e){return this.selectAll(e==null?nw:rw(typeof e=="function"?e:tg(e)))}function ow(e){typeof e!="function"&&(e=eg(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Ct(r,this._parents)}function ng(e){return new Array(e.length)}function aw(){return new Ct(this._enter||this._groups.map(ng),this._parents)}function ka(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ka.prototype={constructor:ka,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function sw(e){return function(){return e}}function lw(e,t,n,r,i,o){for(var a=0,s,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new ka(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function uw(e,t,n,r,i,o,a){var s,l,u=new Map,c=t.length,h=o.length,f=new Array(c),p;for(s=0;s<c;++s)(l=t[s])&&(f[s]=p=a.call(l,l.__data__,s,t)+"",u.has(p)?i[s]=l:u.set(p,l));for(s=0;s<h;++s)p=a.call(e,o[s],s,o)+"",(l=u.get(p))?(r[s]=l,l.__data__=o[s],u.delete(p)):n[s]=new ka(e,o[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function cw(e){return e.__data__}function fw(e,t){if(!arguments.length)return Array.from(this,cw);var n=t?uw:lw,r=this._parents,i=this._groups;typeof e!="function"&&(e=sw(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],f=h.length,p=hw(e.call(c,c&&c.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),b=l[u]=new Array(f);n(c,h,g,m,b,p,t);for(var y=0,x=0,$,S;y<d;++y)if($=g[y]){for(y>=x&&(x=y+1);!(S=m[x])&&++x<d;);$._next=S||null}}return a=new Ct(a,r),a._enter=s,a._exit=l,a}function hw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function pw(){return new Ct(this._exit||this._groups.map(ng),this._parents)}function dw(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function gw(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],h=u.length,f=s[l]=new Array(h),p,d=0;d<h;++d)(p=u[d]||c[d])&&(f[d]=p);for(;l<i;++l)s[l]=n[l];return new Ct(s,this._parents)}function mw(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function yw(e){e||(e=bw);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Ct(i,this._parents).order()}function bw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function xw(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function $w(){return Array.from(this)}function vw(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Sw(){let e=0;for(const t of this)++e;return e}function _w(){return!this.node()}function ww(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function Tw(e){return function(){this.removeAttribute(e)}}function Aw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pw(e,t){return function(){this.setAttribute(e,t)}}function Cw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Dw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Mw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Lw(e,t){var n=La(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Aw:Tw:typeof t=="function"?n.local?Mw:Dw:n.local?Cw:Pw)(n,t))}function rg(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function kw(e){return function(){this.style.removeProperty(e)}}function Rw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ew(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Iw(e,t,n){return arguments.length>1?this.each((t==null?kw:typeof t=="function"?Ew:Rw)(e,t,n??"")):Nr(this.node(),e)}function Nr(e,t){return e.style.getPropertyValue(t)||rg(e).getComputedStyle(e,null).getPropertyValue(t)}function Bw(e){return function(){delete this[e]}}function Nw(e,t){return function(){this[e]=t}}function Fw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function zw(e,t){return arguments.length>1?this.each((t==null?Bw:typeof t=="function"?Fw:Nw)(e,t)):this.node()[e]}function ig(e){return e.trim().split(/^|\s+/)}function Xu(e){return e.classList||new og(e)}function og(e){this._node=e,this._names=ig(e.getAttribute("class")||"")}og.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ag(e,t){for(var n=Xu(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function sg(e,t){for(var n=Xu(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ow(e){return function(){ag(this,e)}}function Gw(e){return function(){sg(this,e)}}function Ww(e,t){return function(){(t.apply(this,arguments)?ag:sg)(this,e)}}function Yw(e,t){var n=ig(e+"");if(arguments.length<2){for(var r=Xu(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Ww:t?Ow:Gw)(n,t))}function Vw(){this.textContent=""}function jw(e){return function(){this.textContent=e}}function Xw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Uw(e){return arguments.length?this.each(e==null?Vw:(typeof e=="function"?Xw:jw)(e)):this.node().textContent}function Hw(){this.innerHTML=""}function qw(e){return function(){this.innerHTML=e}}function Zw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Kw(e){return arguments.length?this.each(e==null?Hw:(typeof e=="function"?Zw:qw)(e)):this.node().innerHTML}function Qw(){this.nextSibling&&this.parentNode.appendChild(this)}function Jw(){return this.each(Qw)}function eT(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tT(){return this.each(eT)}function nT(e){var t=typeof e=="function"?e:Qd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function rT(){return null}function iT(e,t){var n=typeof e=="function"?e:Qd(e),r=t==null?rT:typeof t=="function"?t:ju(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function oT(){var e=this.parentNode;e&&e.removeChild(this)}function aT(){return this.each(oT)}function sT(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function lT(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function uT(e){return this.select(e?lT:sT)}function cT(e){return arguments.length?this.property("__data__",e):this.node().__data__}function fT(e){return function(t){e.call(this,t,this.__data__)}}function hT(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function pT(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function dT(e,t,n){return function(){var r=this.__on,i,o=fT(t);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function gT(e,t,n){var r=hT(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?dT:pT,i=0;i<o;++i)this.each(s(r[i],t,n));return this}function lg(e,t,n){var r=rg(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function mT(e,t){return function(){return lg(this,e,t)}}function yT(e,t){return function(){return lg(this,e,t.apply(this,arguments))}}function bT(e,t){return this.each((typeof t=="function"?yT:mT)(e,t))}function*xT(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var $T=[null];function Ct(e,t){this._groups=e,this._parents=t}function Ui(){return new Ct([[document.documentElement]],$T)}function vT(){return this}Ct.prototype=Ui.prototype={constructor:Ct,select:X_,selectAll:Z_,selectChild:ew,selectChildren:iw,filter:ow,data:fw,enter:aw,exit:pw,join:dw,merge:gw,selection:vT,order:mw,sort:yw,call:xw,nodes:$w,node:vw,size:Sw,empty:_w,each:ww,attr:Lw,style:Iw,property:zw,classed:Yw,text:Uw,html:Kw,raise:Jw,lower:tT,append:nT,insert:iT,remove:aT,clone:uT,datum:cT,on:gT,dispatch:bT,[Symbol.iterator]:xT};function Uu(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ug(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Hi(){}var qi=.7,Ra=1/qi,Fr="\\s*([+-]?\\d+)\\s*",Zi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ST=/^#([0-9a-f]{3,8})$/,_T=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),wT=new RegExp(`^rgb\\(${Yt},${Yt},${Yt}\\)$`),TT=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${Zi}\\)$`),AT=new RegExp(`^rgba\\(${Yt},${Yt},${Yt},${Zi}\\)$`),PT=new RegExp(`^hsl\\(${Zi},${Yt},${Yt}\\)$`),CT=new RegExp(`^hsla\\(${Zi},${Yt},${Yt},${Zi}\\)$`),cg={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};Uu(Hi,Vn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fg,formatHex:fg,formatHex8:DT,formatHsl:MT,formatRgb:hg,toString:hg});function fg(){return this.rgb().formatHex()}function DT(){return this.rgb().formatHex8()}function MT(){return yg(this).formatHsl()}function hg(){return this.rgb().formatRgb()}function Vn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ST.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?pg(t):n===3?new st(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ea(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ea(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_T.exec(e))?new st(t[1],t[2],t[3],1):(t=wT.exec(e))?new st(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=TT.exec(e))?Ea(t[1],t[2],t[3],t[4]):(t=AT.exec(e))?Ea(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PT.exec(e))?mg(t[1],t[2]/100,t[3]/100,1):(t=CT.exec(e))?mg(t[1],t[2]/100,t[3]/100,t[4]):cg.hasOwnProperty(e)?pg(cg[e]):e==="transparent"?new st(NaN,NaN,NaN,0):null}function pg(e){return new st(e>>16&255,e>>8&255,e&255,1)}function Ea(e,t,n,r){return r<=0&&(e=t=n=NaN),new st(e,t,n,r)}function LT(e){return e instanceof Hi||(e=Vn(e)),e?(e=e.rgb(),new st(e.r,e.g,e.b,e.opacity)):new st}function Hu(e,t,n,r){return arguments.length===1?LT(e):new st(e,t,n,r??1)}function st(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Uu(st,Hu,ug(Hi,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new st(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new st(jn(this.r),jn(this.g),jn(this.b),Ia(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:dg,formatHex:dg,formatHex8:kT,formatRgb:gg,toString:gg}));function dg(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}`}function kT(){return`#${Xn(this.r)}${Xn(this.g)}${Xn(this.b)}${Xn((isNaN(this.opacity)?1:this.opacity)*255)}`}function gg(){const e=Ia(this.opacity);return`${e===1?"rgb(":"rgba("}${jn(this.r)}, ${jn(this.g)}, ${jn(this.b)}${e===1?")":`, ${e})`}`}function Ia(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xn(e){return e=jn(e),(e<16?"0":"")+e.toString(16)}function mg(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dt(e,t,n,r)}function yg(e){if(e instanceof Dt)return new Dt(e.h,e.s,e.l,e.opacity);if(e instanceof Hi||(e=Vn(e)),!e)return new Dt;if(e instanceof Dt)return e;e=e.rgb();var t=e.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?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Dt(a,s,l,e.opacity)}function RT(e,t,n,r){return arguments.length===1?yg(e):new Dt(e,t,n,r??1)}function Dt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Uu(Dt,RT,ug(Hi,{brighter(e){return e=e==null?Ra:Math.pow(Ra,e),new Dt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qi:Math.pow(qi,e),new Dt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,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 st(qu(e>=240?e-240:e+120,i,r),qu(e,i,r),qu(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Dt(bg(this.h),Ba(this.s),Ba(this.l),Ia(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=Ia(this.opacity);return`${e===1?"hsl(":"hsla("}${bg(this.h)}, ${Ba(this.s)*100}%, ${Ba(this.l)*100}%${e===1?")":`, ${e})`}`}}));function bg(e){return e=(e||0)%360,e<0?e+360:e}function Ba(e){return Math.max(0,Math.min(1,e||0))}function qu(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Zu=e=>()=>e;function ET(e,t){return function(n){return e+n*t}}function IT(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)}}function BT(e){return(e=+e)==1?xg:function(t,n){return n-t?IT(t,n,e):Zu(isNaN(t)?n:t)}}function xg(e,t){var n=t-e;return n?ET(e,n):Zu(isNaN(e)?t:e)}const Na=function e(t){var n=BT(t);function r(i,o){var a=n((i=Hu(i)).r,(o=Hu(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=xg(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function NT(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function FT(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zT(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Ju(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function OT(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Mt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function GT(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Ju(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Ku=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qu=new RegExp(Ku.source,"g");function WT(e){return function(){return e}}function YT(e){return function(t){return e(t)+""}}function $g(e,t){var n=Ku.lastIndex=Qu.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=Ku.exec(e))&&(i=Qu.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Mt(r,i)})),n=Qu.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?YT(l[0].x):WT(t):(t=l.length,function(u){for(var c=0,h;c<t;++c)s[(h=l[c]).i]=h.x(u);return s.join("")})}function Ju(e,t){var n=typeof t,r;return t==null||n==="boolean"?Zu(t):(n==="number"?Mt:n==="string"?(r=Vn(t))?(t=r,Na):$g:t instanceof Vn?Na:t instanceof Date?OT:FT(t)?NT:Array.isArray(t)?zT:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?GT:Mt)(e,t)}function VT(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var vg=180/Math.PI,Sg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _g(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*vg,skewX:Math.atan(l)*vg,scaleX:a,scaleY:s}}var Fa;function jT(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Sg:_g(t.a,t.b,t.c,t.d,t.e,t.f)}function XT(e){return e==null||(Fa||(Fa=document.createElementNS("http://www.w3.org/2000/svg","g")),Fa.setAttribute("transform",e),!(e=Fa.transform.baseVal.consolidate()))?Sg:(e=e.matrix,_g(e.a,e.b,e.c,e.d,e.e,e.f))}function wg(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,h,f,p,d){if(u!==h||c!==f){var g=p.push("translate(",null,t,null,n);d.push({i:g-4,x:Mt(u,h)},{i:g-2,x:Mt(c,f)})}else(h||f)&&p.push("translate("+h+t+f+n)}function a(u,c,h,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Mt(u,c)})):c&&h.push(i(h)+"rotate("+c+r)}function s(u,c,h,f){u!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Mt(u,c)}):c&&h.push(i(h)+"skewX("+c+r)}function l(u,c,h,f,p,d){if(u!==h||c!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Mt(u,h)},{i:g-2,x:Mt(c,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(u,c){var h=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,h,f),a(u.rotate,c.rotate,h,f),s(u.skewX,c.skewX,h,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,h,f),u=c=null,function(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var UT=wg(jT,"px, ","px)","deg)"),HT=wg(XT,", ",")",")"),zr=0,Ki=0,Qi=0,Tg=1e3,za,Ji,Oa=0,Un=0,Ga=0,eo=typeof performance=="object"&&performance.now?performance:Date,Ag=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ec(){return Un||(Ag(qT),Un=eo.now()+Ga)}function qT(){Un=0}function Wa(){this._call=this._time=this._next=null}Wa.prototype=Pg.prototype={constructor:Wa,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ec():+n)+(t==null?0:+t),!this._next&&Ji!==this&&(Ji?Ji._next=this:za=this,Ji=this),this._call=e,this._time=n,tc()},stop:function(){this._call&&(this._call=null,this._time=1/0,tc())}};function Pg(e,t,n){var r=new Wa;return r.restart(e,t,n),r}function ZT(){ec(),++zr;for(var e=za,t;e;)(t=Un-e._time)>=0&&e._call.call(void 0,t),e=e._next;--zr}function Cg(){Un=(Oa=eo.now())+Ga,zr=Ki=0;try{ZT()}finally{zr=0,QT(),Un=0}}function KT(){var e=eo.now(),t=e-Oa;t>Tg&&(Ga-=t,Oa=e)}function QT(){for(var e,t=za,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:za=n);Ji=e,tc(r)}function tc(e){if(!zr){Ki&&(Ki=clearTimeout(Ki));var t=e-Un;t>24?(e<1/0&&(Ki=setTimeout(Cg,e-eo.now()-Ga)),Qi&&(Qi=clearInterval(Qi))):(Qi||(Oa=eo.now(),Qi=setInterval(KT,Tg)),zr=1,Ag(Cg))}}function Dg(e,t,n){var r=new Wa;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var JT=qd("start","end","cancel","interrupt"),eA=[],Mg=0,Lg=1,nc=2,Ya=3,kg=4,rc=5,Va=6;function ja(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;tA(e,n,{name:t,index:r,group:i,on:JT,tween:eA,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Mg})}function ic(e,t){var n=Lt(e,t);if(n.state>Mg)throw new Error("too late; already scheduled");return n}function Vt(e,t){var n=Lt(e,t);if(n.state>Ya)throw new Error("too late; already running");return n}function Lt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function tA(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Pg(o,0,n.time);function o(u){n.state=Lg,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,h,f,p;if(n.state!==Lg)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Ya)return Dg(a);p.state===kg?(p.state=Va,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c<t&&(p.state=Va,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[c])}if(Dg(function(){n.state===Ya&&(n.state=kg,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=nc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===nc){for(n.state=Ya,i=new Array(f=n.tween.length),c=0,h=-1;c<f;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=rc,1),h=-1,f=i.length;++h<f;)i[h].call(e,c);n.state===rc&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Va,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function nA(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>nc&&r.state<rc,r.state=Va,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function rA(e){return this.each(function(){nA(this,e)})}function iA(e,t){var n,r;return function(){var i=Vt(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function oA(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Vt(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function aA(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Lt(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?iA:oA)(n,e,t))}function oc(e,t,n){var r=e._id;return e.each(function(){var i=Vt(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Lt(i,r).value[t]}}function Rg(e,t){var n;return(typeof t=="number"?Mt:t instanceof Vn?Na:(n=Vn(t))?(t=n,Na):$g)(e,t)}function sA(e){return function(){this.removeAttribute(e)}}function lA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function uA(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function cA(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function fA(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function hA(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function pA(e,t){var n=La(e),r=n==="transform"?HT:Rg;return this.attrTween(e,typeof t=="function"?(n.local?hA:fA)(n,r,oc(this,"attr."+e,t)):t==null?(n.local?lA:sA)(n):(n.local?cA:uA)(n,r,t))}function dA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function gA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function mA(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&gA(e,o)),n}return i._value=t,i}function yA(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&dA(e,o)),n}return i._value=t,i}function bA(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=La(e);return this.tween(n,(r.local?mA:yA)(r,t))}function xA(e,t){return function(){ic(this,e).delay=+t.apply(this,arguments)}}function $A(e,t){return t=+t,function(){ic(this,e).delay=t}}function vA(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xA:$A)(t,e)):Lt(this.node(),t).delay}function SA(e,t){return function(){Vt(this,e).duration=+t.apply(this,arguments)}}function _A(e,t){return t=+t,function(){Vt(this,e).duration=t}}function wA(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?SA:_A)(t,e)):Lt(this.node(),t).duration}function TA(e,t){if(typeof t!="function")throw new Error;return function(){Vt(this,e).ease=t}}function AA(e){var t=this._id;return arguments.length?this.each(TA(t,e)):Lt(this.node(),t).ease}function PA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Vt(this,e).ease=n}}function CA(e){if(typeof e!="function")throw new Error;return this.each(PA(this._id,e))}function DA(e){typeof e!="function"&&(e=eg(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new on(r,this._parents,this._name,this._id)}function MA(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,h=a[s]=new Array(c),f,p=0;p<c;++p)(f=l[p]||u[p])&&(h[p]=f);for(;s<r;++s)a[s]=t[s];return new on(a,this._parents,this._name,this._id)}function LA(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function kA(e,t,n){var r,i,o=LA(t)?ic:Vt;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function RA(e,t){var n=this._id;return arguments.length<2?Lt(this.node(),n).on.on(e):this.each(kA(n,e,t))}function EA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function IA(){return this.on("end.remove",EA(this._id))}function BA(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ju(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,h,f=0;f<l;++f)(c=s[f])&&(h=e.call(c,c.__data__,f,s))&&("__data__"in c&&(h.__data__=c.__data__),u[f]=h,ja(u[f],t,n,f,u,Lt(c,n)));return new on(o,this._parents,t,n)}function NA(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Jd(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,h=0;h<u;++h)if(c=l[h]){for(var f=e.call(c,c.__data__,h,l),p,d=Lt(c,n),g=0,m=f.length;g<m;++g)(p=f[g])&&ja(p,t,n,g,f,d);o.push(f),a.push(c)}return new on(o,a,t,n)}var FA=Ui.prototype.constructor;function zA(){return new FA(this._groups,this._parents)}function OA(e,t){var n,r,i;return function(){var o=Nr(this,e),a=(this.style.removeProperty(e),Nr(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function Eg(e){return function(){this.style.removeProperty(e)}}function GA(e,t,n){var r,i=n+"",o;return function(){var a=Nr(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function WA(e,t,n){var r,i,o;return function(){var a=Nr(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Nr(this,e))),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}function YA(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var l=Vt(this,e),u=l.on,c=l.value[o]==null?s||(s=Eg(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function VA(e,t,n){var r=(e+="")=="transform"?UT:Rg;return t==null?this.styleTween(e,OA(e,r)).on("end.style."+e,Eg(e)):typeof t=="function"?this.styleTween(e,WA(e,r,oc(this,"style."+e,t))).each(YA(this._id,e)):this.styleTween(e,GA(e,r,t),n).on("end.style."+e,null)}function jA(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function XA(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&jA(e,a,n)),r}return o._value=t,o}function UA(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,XA(e,t,n??""))}function HA(e){return function(){this.textContent=e}}function qA(e){return function(){var t=e(this);this.textContent=t??""}}function ZA(e){return this.tween("text",typeof e=="function"?qA(oc(this,"text",e)):HA(e==null?"":e+""))}function KA(e){return function(t){this.textContent=e.call(this,t)}}function QA(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&KA(i)),t}return r._value=e,r}function JA(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,QA(e))}function eP(){for(var e=this._name,t=this._id,n=Ig(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Lt(l,t);ja(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new on(r,this._parents,e,n)}function tP(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=Vt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),i===0&&o()})}var nP=0;function on(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ig(){return++nP}var an=Ui.prototype;on.prototype={constructor:on,select:BA,selectAll:NA,selectChild:an.selectChild,selectChildren:an.selectChildren,filter:DA,merge:MA,selection:zA,transition:eP,call:an.call,nodes:an.nodes,node:an.node,size:an.size,empty:an.empty,each:an.each,on:RA,attr:pA,attrTween:bA,style:VA,styleTween:UA,text:ZA,textTween:JA,remove:IA,tween:aA,delay:vA,duration:wA,ease:AA,easeVarying:CA,end:tP,[Symbol.iterator]:an[Symbol.iterator]};function rP(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var iP={time:null,delay:0,duration:250,ease:rP};function oP(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function aP(e){var t,n;e instanceof on?(t=e._id,e=e._name):(t=Ig(),(n=iP).time=ec(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&ja(l,e,t,u,a,n||oP(l,t));return new on(r,this._parents,e,t)}Ui.prototype.interrupt=rA,Ui.prototype.transition=aP;function sP(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Xa(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 Or(e){return e=Xa(Math.abs(e)),e?e[1]:NaN}function lP(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)}}function uP(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var cP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ua(e){if(!(t=cP.exec(e)))throw new Error("invalid format: "+e);var t;return new ac({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]})}Ua.prototype=ac.prototype;function ac(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ac.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function fP(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Bg;function hP(e,t){var n=Xa(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Bg=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+Xa(e,Math.max(0,t+o-1))[0]}function Ng(e,t){var n=Xa(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")}const Fg={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:sP,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ng(e*100,t),r:Ng,s:hP,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function zg(e){return e}var Og=Array.prototype.map,Gg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pP(e){var t=e.grouping===void 0||e.thousands===void 0?zg:lP(Og.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?zg:uP(Og.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(h){h=Ua(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,b=h.width,y=h.comma,x=h.precision,$=h.trim,S=h.type;S==="n"?(y=!0,S="g"):Fg[S]||(x===void 0&&(x=12),$=!0,S="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var A=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",_=g==="$"?r:/[%p]/.test(S)?a:"",P=Fg[S],M=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function R(v){var E=A,k=_,T,w,C;if(S==="c")k=P(v)+k,v="";else{v=+v;var F=v<0||1/v<0;if(v=isNaN(v)?l:P(Math.abs(v),x),$&&(v=fP(v)),F&&+v==0&&d!=="+"&&(F=!1),E=(F?d==="("?d:s:d==="-"||d==="("?"":d)+E,k=(S==="s"?Gg[8+Bg/3]:"")+k+(F&&d==="("?")":""),M){for(T=-1,w=v.length;++T<w;)if(C=v.charCodeAt(T),48>C||C>57){k=(C===46?i+v.slice(T+1):v.slice(T))+k,v=v.slice(0,T);break}}}y&&!m&&(v=t(v,1/0));var O=E.length+v.length+k.length,B=O<b?new Array(b-O+1).join(f):"";switch(y&&m&&(v=t(B+v,B.length?b-k.length:1/0),B=""),p){case"<":v=E+v+k+B;break;case"=":v=E+B+v+k;break;case"^":v=B.slice(0,O=B.length>>1)+E+v+k+B.slice(O);break;default:v=B+E+v+k;break}return o(v)}return R.toString=function(){return h+""},R}function c(h,f){var p=u((h=Ua(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Or(f)/3)))*3,g=Math.pow(10,-d),m=Gg[8+d/3];return function(b){return p(g*b)+m}}return{format:u,formatPrefix:c}}var Ha,Wg,Yg;dP({thousands:",",grouping:[3],currency:["$",""]});function dP(e){return Ha=pP(e),Wg=Ha.format,Yg=Ha.formatPrefix,Ha}function gP(e){return Math.max(0,-Or(Math.abs(e)))}function mP(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Or(t)/3)))*3-Or(Math.abs(e)))}function yP(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Or(t)-Or(e))+1}function qa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Vg=Symbol("implicit");function jg(){var e=new Ud,t=[],n=[],r=Vg;function i(o){let a=e.get(o);if(a===void 0){if(r!==Vg)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Ud;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return jg(t,n).unknown(r)},qa.apply(i,arguments),i}function Xg(){var e=jg().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,u=0,c=.5;delete e.unknown;function h(){var f=t().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-l+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-l))*c,a=o*(1-l),s&&(d=Math.round(d),a=Math.round(a));var m=z_(f).map(function(b){return d+o*b});return n(p?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),h()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,h()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),h()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),h()):l},e.paddingOuter=function(f){return arguments.length?(u=+f,h()):u},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),h()):c},e.copy=function(){return Xg(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},qa.apply(h(),arguments)}function Ug(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ug(t())},e}function bP(){return Ug(Xg.apply(null,arguments).paddingInner(1))}function xP(e){return function(){return e}}function $P(e){return+e}var Hg=[0,1];function Gr(e){return e}function sc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:xP(isNaN(t)?NaN:.5)}function vP(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function SP(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=sc(i,r),o=n(a,o)):(r=sc(r,i),o=n(o,a)),function(s){return o(r(s))}}function _P(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]=sc(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=Xd(e,s,1,r)-1;return o[l](i[l](s))}}function wP(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function TP(){var e=Hg,t=Hg,n=Ju,r,i,o,a=Gr,s,l,u;function c(){var f=Math.min(e.length,t.length);return a!==Gr&&(a=vP(e[0],e[f-1])),s=f>2?_P:SP,l=u=null,h}function h(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return h.invert=function(f){return a(i((u||(u=s(t,e.map(r),Mt)))(f)))},h.domain=function(f){return arguments.length?(e=Array.from(f,$P),c()):e.slice()},h.range=function(f){return arguments.length?(t=Array.from(f),c()):t.slice()},h.rangeRound=function(f){return t=Array.from(f),n=VT,c()},h.clamp=function(f){return arguments.length?(a=f?!0:Gr,c()):a!==Gr},h.interpolate=function(f){return arguments.length?(n=f,c()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,c()}}function AP(){return TP()(Gr,Gr)}function PP(e,t,n,r){var i=F_(e,t,n),o;switch(r=Ua(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=mP(i,a))&&(r.precision=o),Yg(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=yP(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=gP(i))&&(r.precision=o-(r.type==="%")*2);break}}return Wg(r)}function qg(e){var t=e.domain;return e.ticks=function(n){var r=t();return N_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return PP(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);c-- >0;){if(u=Yu(a,s,n),u===l)return r[i]=a,r[o]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function to(){var e=AP();return e.copy=function(){return wP(e,to())},qa.apply(e,arguments),qg(e)}function Zg(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[Xd(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Zg().domain([e,t]).range(i).unknown(o)},qa.apply(qg(a),arguments)}function no(e,t,n){this.k=e,this.x=t,this.y=n}no.prototype={constructor:no,scale:function(e){return e===1?this:new no(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new no(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},no.prototype;function lc(e){const t=[0,0];return e.length?e.reduce((n,r)=>[r<n[0]?r:n[0],r>n[1]?r:n[1]],[e[0],e[0]]):t}function CP(e){let t=Math.floor(Math.sqrt(e)),n=Math.ceil(e/t);for(;t*n<e;)n++;return{rowAmount:t,columnAmount:n}}function Kg(e,t,n){const{gap:r}=t,{rowAmount:i,columnAmount:o}=t.rowAmount*t.columnAmount>=n?t:CP(n);return new Array(n).fill(null).map((a,s)=>{const l=s%o,u=Math.floor(s/o),c=(e.width-r*(o-1))/o,h=(e.height-r*(i-1))/i,f=l*c+l*r,p=u*h+u*r,d=[f,p],g=[c/e.width,h/e.height];return{slotIndex:s,rowIndex:u,columnIndex:l,translate:d,scale:g}})}var uc=function(e,t){return uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},uc(e,t)};function jt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");uc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function DP(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(c){try{u(r.next(c))}catch(h){a(h)}}function l(c){try{u(r.throw(c))}catch(h){a(h)}}function u(c){c.done?o(c.value):i(c.value).then(s,l)}u((r=r.apply(e,[])).next())})}function Qg(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Wr(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yr(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Vr(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function jr(e){return this instanceof jr?(this.v=e,this):new jr(e)}function MP(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),i[Symbol.asyncIterator]=function(){return this},i;function a(p){return function(d){return Promise.resolve(d).then(p,h)}}function s(p,d){r[p]&&(i[p]=function(g){return new Promise(function(m,b){o.push([p,g,m,b])>1||l(p,g)})},d&&(i[p]=d(i[p])))}function l(p,d){try{u(r[p](d))}catch(g){f(o[0][3],g)}}function u(p){p.value instanceof jr?Promise.resolve(p.value.v).then(c,h):f(o[0][2],p)}function c(p){l("next",p)}function h(p){l("throw",p)}function f(p,d){p(d),o.shift(),o.length&&l(o[0][0],o[0][1])}}function LP(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Wr=="function"?Wr(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(a){return new Promise(function(s,l){a=e[o](a),i(s,l,a.done,a.value)})}}function i(o,a,s,l){Promise.resolve(l).then(function(u){o({value:u,done:s})},a)}}function Le(e){return typeof e=="function"}function cc(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var fc=cc(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
|
46
|
+
`+t.map(function(n,r){return r+1+") "+n.toString()}).join(`
|
47
|
+
`):"",this.name="UnsubscriptionError",this.errors=t}});function Za(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var ro=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Wr(a),l=s.next();!l.done;l=s.next()){var u=l.value;u.remove(this)}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}else a.remove(this);var c=this.initialTeardown;if(Le(c))try{c()}catch(g){o=g instanceof fc?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=Wr(h),p=f.next();!p.done;p=f.next()){var d=p.value;try{t0(d)}catch(g){o=o??[],g instanceof fc?o=Vr(Vr([],Yr(o)),Yr(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new fc(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)t0(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Za(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Za(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Jg=ro.EMPTY;function e0(e){return e instanceof ro||e&&"closed"in e&&Le(e.remove)&&Le(e.add)&&Le(e.unsubscribe)}function t0(e){Le(e)?e():e.unsubscribe()}var n0={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},kP={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Vr([e,t],Yr(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function r0(e){kP.setTimeout(function(){throw e})}function hc(){}function Ka(e){e()}var pc=function(e){jt(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,e0(n)&&n.add(r)):r.destination=BP,r}return t.create=function(n,r,i){return new io(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ro),RP=Function.prototype.bind;function dc(e,t){return RP.call(e,t)}var EP=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){Qa(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Qa(r)}else Qa(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Qa(n)}},e}(),io=function(e){jt(t,e);function t(n,r,i){var o=e.call(this)||this,a;if(Le(n)||!n)a={next:n??void 0,error:r??void 0,complete:i??void 0};else{var s;o&&n0.useDeprecatedNextContext?(s=Object.create(n),s.unsubscribe=function(){return o.unsubscribe()},a={next:n.next&&dc(n.next,s),error:n.error&&dc(n.error,s),complete:n.complete&&dc(n.complete,s)}):a=n}return o.destination=new EP(a),o}return t}(pc);function Qa(e){r0(e)}function IP(e){throw e}var BP={closed:!0,next:hc,error:IP,complete:hc},gc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ja(e){return e}function NP(e){return e.length===0?Ja:e.length===1?e[0]:function(t){return e.reduce(function(n,r){return r(n)},t)}}var gt=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=zP(t)?t:new io(t,n,r);return Ka(function(){var a=i,s=a.operator,l=a.source;o.add(s?s.call(o,l):l?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=i0(n),new n(function(i,o){var a=new io({next:function(s){try{t(s)}catch(l){o(l),a.unsubscribe()}},error:o,complete:i});r.subscribe(a)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[gc]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return NP(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=i0(t),new t(function(r,i){var o;n.subscribe(function(a){return o=a},function(a){return i(a)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function i0(e){var t;return(t=e??n0.Promise)!==null&&t!==void 0?t:Promise}function FP(e){return e&&Le(e.next)&&Le(e.error)&&Le(e.complete)}function zP(e){return e&&e instanceof pc||FP(e)&&e0(e)}function OP(e){return Le(e==null?void 0:e.lift)}function Hn(e){return function(t){if(OP(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function qn(e,t,n,r,i){return new GP(e,t,n,r,i)}var GP=function(e){jt(t,e);function t(n,r,i,o,a,s){var l=e.call(this,n)||this;return l.onFinalize=a,l.shouldUnsubscribe=s,l._next=r?function(u){try{r(u)}catch(c){n.error(c)}}:e.prototype._next,l._error=o?function(u){try{o(u)}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,l}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(pc),WP=cc(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Xr=function(e){jt(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new o0(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new WP},t.prototype.next=function(n){var r=this;Ka(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var a=Wr(r.currentObservers),s=a.next();!s.done;s=a.next()){var l=s.value;l.next(n)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;Ka(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;Ka(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Jg:(this.currentObservers=null,s.push(n),new ro(function(){r.currentObservers=null,Za(s,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,a=r.isStopped;i?n.error(o):a&&n.complete()},t.prototype.asObservable=function(){var n=new gt;return n.source=this,n},t.create=function(n,r){return new o0(n,r)},t}(gt),o0=function(e){jt(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Jg},t}(Xr),a0=function(e){jt(t,e);function t(n){var r=e.call(this)||this;return r._value=n,r}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(n){var r=e.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},t.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,o=n._value;if(r)throw i;return this._throwIfClosed(),o},t.prototype.next=function(n){e.prototype.next.call(this,this._value=n)},t}(Xr),mc={now:function(){return(mc.delegate||Date).now()},delegate:void 0},YP=function(e){jt(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=mc);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,a=r._infiniteTimeWindow,s=r._timestampProvider,l=r._windowTime;i||(o.push(n),!a&&o.push(s.now()+l)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),l=0;l<s.length&&!n.closed;l+=o?1:2)n.next(s[l]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,a=n._infiniteTimeWindow,s=(a?1:2)*r;if(r<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var l=i.now(),u=0,c=1;c<o.length&&o[c]<=l;c+=2)u=c;u&&o.splice(0,u+1)}},t}(Xr),VP=function(e){jt(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(ro),s0={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Vr([e,t],Yr(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},jP=function(e){jt(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),s0.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&s0.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Za(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(VP),l0=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=mc.now,e}(),XP=function(e){jt(t,e);function t(n,r){r===void 0&&(r=l0.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(l0);new XP(jP);function UP(e){return e&&Le(e.schedule)}function u0(e){return e[e.length-1]}function HP(e){return Le(u0(e))?e.pop():void 0}function qP(e){return UP(u0(e))?e.pop():void 0}var c0=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function f0(e){return Le(e==null?void 0:e.then)}function h0(e){return Le(e[gc])}function p0(e){return Symbol.asyncIterator&&Le(e==null?void 0:e[Symbol.asyncIterator])}function d0(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function ZP(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var g0=ZP();function m0(e){return Le(e==null?void 0:e[g0])}function y0(e){return MP(this,arguments,function(){var t,n,r,i;return Qg(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,jr(t.read())];case 3:return n=o.sent(),r=n.value,i=n.done,i?[4,jr(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,jr(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function b0(e){return Le(e==null?void 0:e.getReader)}function Zn(e){if(e instanceof gt)return e;if(e!=null){if(h0(e))return KP(e);if(c0(e))return QP(e);if(f0(e))return JP(e);if(p0(e))return x0(e);if(m0(e))return eC(e);if(b0(e))return tC(e)}throw d0(e)}function KP(e){return new gt(function(t){var n=e[gc]();if(Le(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function QP(e){return new gt(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function JP(e){return new gt(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,r0)})}function eC(e){return new gt(function(t){var n,r;try{for(var i=Wr(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function x0(e){return new gt(function(t){nC(e,t).catch(function(n){return t.error(n)})})}function tC(e){return x0(y0(e))}function nC(e,t){var n,r,i,o;return DP(this,void 0,void 0,function(){var a,s;return Qg(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=LP(e),l.label=1;case 1:return[4,n.next()];case 2:if(r=l.sent(),!!r.done)return[3,4];if(a=r.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Tn(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function $0(e,t){return t===void 0&&(t=0),Hn(function(n,r){n.subscribe(qn(r,function(i){return Tn(r,e,function(){return r.next(i)},t)},function(){return Tn(r,e,function(){return r.complete()},t)},function(i){return Tn(r,e,function(){return r.error(i)},t)}))})}function v0(e,t){return t===void 0&&(t=0),Hn(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function rC(e,t){return Zn(e).pipe(v0(t),$0(t))}function iC(e,t){return Zn(e).pipe(v0(t),$0(t))}function oC(e,t){return new gt(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function aC(e,t){return new gt(function(n){var r;return Tn(n,t,function(){r=e[g0](),Tn(n,t,function(){var i,o,a;try{i=r.next(),o=i.value,a=i.done}catch(s){n.error(s);return}a?n.complete():n.next(o)},0,!0)}),function(){return Le(r==null?void 0:r.return)&&r.return()}})}function S0(e,t){if(!e)throw new Error("Iterable cannot be null");return new gt(function(n){Tn(n,t,function(){var r=e[Symbol.asyncIterator]();Tn(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function sC(e,t){return S0(y0(e),t)}function lC(e,t){if(e!=null){if(h0(e))return rC(e,t);if(c0(e))return oC(e,t);if(f0(e))return iC(e,t);if(p0(e))return S0(e,t);if(m0(e))return aC(e,t);if(b0(e))return sC(e,t)}throw d0(e)}function _0(e,t){return t?lC(e,t):Zn(e)}cc(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Ur(e,t){return Hn(function(n,r){var i=0;n.subscribe(qn(r,function(o){r.next(e.call(t,o,i++))}))})}var uC=Array.isArray;function cC(e,t){return uC(t)?e.apply(void 0,Vr([],Yr(t))):e(t)}function fC(e){return Ur(function(t){return cC(e,t)})}var hC=Array.isArray,pC=Object.getPrototypeOf,dC=Object.prototype,gC=Object.keys;function mC(e){if(e.length===1){var t=e[0];if(hC(t))return{args:t,keys:null};if(yC(t)){var n=gC(t);return{args:n.map(function(r){return t[r]}),keys:n}}}return{args:e,keys:null}}function yC(e){return e&&typeof e=="object"&&pC(e)===dC}function bC(e,t){return e.reduce(function(n,r,i){return n[r]=t[i],n},{})}function w0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=qP(e),r=HP(e),i=mC(e),o=i.args,a=i.keys;if(o.length===0)return _0([],n);var s=new gt(xC(o,n,a?function(l){return bC(a,l)}:Ja));return r?s.pipe(fC(r)):s}function xC(e,t,n){return n===void 0&&(n=Ja),function(r){T0(t,function(){for(var i=e.length,o=new Array(i),a=i,s=i,l=function(c){T0(t,function(){var h=_0(e[c],t),f=!1;h.subscribe(qn(r,function(p){o[c]=p,f||(f=!0,s--),s||r.next(n(o.slice()))},function(){--a||r.complete()}))},r)},u=0;u<i;u++)l(u)},r)}}function T0(e,t,n){e?Tn(n,e,t):t()}function $C(e,t){return t===void 0&&(t=Ja),e=e??vC,Hn(function(n,r){var i,o=!0;n.subscribe(qn(r,function(a){var s=t(a);(o||!e(i,s))&&(o=!1,i=s,r.next(a))}))})}function vC(e,t){return e===t}function SC(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new Xr}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,a=o===void 0?!0:o,s=e.resetOnRefCountZero,l=s===void 0?!0:s;return function(u){var c,h,f,p=0,d=!1,g=!1,m=function(){h==null||h.unsubscribe(),h=void 0},b=function(){m(),c=f=void 0,d=g=!1},y=function(){var x=c;b(),x==null||x.unsubscribe()};return Hn(function(x,$){p++,!g&&!d&&m();var S=f=f??n();$.add(function(){p--,p===0&&!g&&!d&&(h=yc(y,l))}),S.subscribe($),!c&&p>0&&(c=new io({next:function(A){return S.next(A)},error:function(A){g=!0,m(),h=yc(b,i,A),S.error(A)},complete:function(){d=!0,m(),h=yc(b,a),S.complete()}}),Zn(x).subscribe(c))})(u)}}function yc(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new io({next:function(){i.unsubscribe(),e()}});return Zn(t.apply(void 0,Vr([],Yr(n)))).subscribe(i)}}function _C(e,t,n){var r,i=!1;return r=e,SC({connector:function(){return new YP(r,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function bc(e,t){return Hn(function(n,r){var i=null,o=0,a=!1,s=function(){return a&&!i&&r.complete()};n.subscribe(qn(r,function(l){i==null||i.unsubscribe();var u=0,c=o++;Zn(e(l,c)).subscribe(i=qn(r,function(h){return r.next(t?t(l,h,c,u++):h)},function(){i=null,s()}))},function(){a=!0,s()}))})}function A0(e){return Hn(function(t,n){Zn(e).subscribe(qn(n,function(){return n.complete()},hc)),!n.closed&&t.subscribe(n)})}const wC=e=>e.pipe(Ur(t=>t.styles.textSize),$C(),Ur(t=>{let n=NaN;if(typeof t=="string")if(t.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(t)*r}else t.includes("px")&&(n=parseFloat(t));else if(typeof t=="number")return t;return n||14})),xc=({maxValue:e=1,minValue:t=0,axisWidth:n,scaleDomain:r=dt.scaleDomain,scaleRange:i=dt.scaleRange,reverse:o=!1})=>{const a=r[0]??dt.scaleDomain[0],s=r[1]??dt.scaleDomain[1],l=i[0]??dt.scaleRange[0],u=i[1]??dt.scaleRange[1];let c=a==="auto"?t<0?t:0:a==="min"?t:a,h=s==="auto"?e>=0?e:0:s==="max"?e:s;const f=e-(e-c)/(1-l),p=h/u;return o?to().domain([f,p]).range([n,0]):to().domain([f,p]).range([0,n])},P0=({maxValue:e=1,minValue:t=0,axisWidth:n,scaleDomain:r=dt.scaleDomain,scaleRange:i=dt.scaleRange,reverse:o=!1})=>{t===e&&(e+=1,t-=1);const a=r[0]??dt.scaleDomain[0],s=r[1]??dt.scaleDomain[1],l=i[0]??dt.scaleRange[0],u=i[1]??dt.scaleRange[1];let c=a==="auto"?t<0?t:0:a==="min"?t:a,h=s==="auto"?e>=0?e:0:s==="max"?e:s;const f=e-(e-c)/(1-l),p=h/u;return o?to().domain([n,0]).range([f,p]):to().domain([0,n]).range([f,p])},TC=({axisLabels:e,axisWidth:t,padding:n=.5})=>{let r=[0,t];return bP().domain(e).range(r).padding(n)},C0=({axisLabels:e,axisWidth:t,padding:n=0,reverse:r=!1})=>{let i=e.map((l,u)=>u);r&&i.reverse();const o=i.length-1+n*2,a=t/o,s=a*n-a*.5;return Zg().domain([s,t-s]).range(i)},D0=({computedData$:e,fullDataFormatter$:t,layout$:n})=>w0({computedData:e,fullDataFormatter:t,layout:n}).pipe(bc(async r=>r),Ur(r=>{if(r.fullDataFormatter.separateSeries)return Kg(r.layout,r.fullDataFormatter.container,r.computedData.length);{const i=Kg(r.layout,r.fullDataFormatter.container,1);return r.computedData.map((o,a)=>i[0])}})),M0=({fullDataFormatter$:e,layout$:t})=>{const n=new Xr;function r({xAxis:i,yAxis:o,width:a,height:s}){if(!i||!o)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let l=0,u=0,c=0,h=0,f=0;return i.position==="bottom"?o.position==="left"?(h=180,u=s):o.position==="right"?(h=180,f=180,l=a,u=s):(h=180,u=s):i.position==="top"?o.position==="left"||(o.position==="right"?(f=180,l=a):(h=180,u=s)):i.position==="left"?o.position==="bottom"?(c=-90,u=s):o.position==="top"?(c=-90,f=180):(h=180,u=s):i.position==="right"?o.position==="bottom"?(c=-90,h=180,u=s,l=a):o.position==="top"?(c=-90,h=180,f=180,l=a):(h=180,u=s):(h=180,u=s),{translate:[l,u],scale:[1,1],rotate:c,rotateX:h,rotateY:f,value:`translate(${l}px, ${u}px) rotate(${c}deg) rotateX(${h}deg) rotateY(${f}deg)`}}return new gt(i=>(w0({fullDataFormatter:e,layout:t}).pipe(A0(n),bc(async o=>o)).subscribe(o=>{const a=r({xAxis:o.fullDataFormatter.groupAxis,yAxis:o.fullDataFormatter.valueAxis,width:o.layout.width,height:o.layout.height});i.next(a)}),function(){n.next(void 0)}))},L0=({gridAxesTransform$:e})=>e.pipe(Ur(t=>{const n=[0,0],r=[1/t.scale[0],1/t.scale[1]],i=t.rotate*-1,o=t.rotateX*-1,a=t.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:o,rotateY:a,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${o}deg) rotateY(${a}deg) rotate(${i}deg)`}}));function AC(e){return`[OrbCharts warn]: ${e.message}`}function PC({columnName:e,expectToBe:t,from:n}){return`Invalid value: '${e}' must be '${t}'
|
41
48
|
|
42
|
-
----> find in '${n}'`}function
|
49
|
+
----> find in '${n}'`}function CC({columnName:e,expectToBe:t,from:n}){return`Value is not correct: '${e}' suppose to be '${t}', it may cause unexpected errors.'
|
43
50
|
|
44
|
-
----> find in '${n}'`}function rD({chartType:t,config:e,initFn:n}){const r=new Xr,i=new WeakMap;let o=()=>{},a;const s=new Xg(e.defaultParams),l=new Xg({}),u=s.pipe(dc(c=>l.pipe(c0(r),Vr(f=>{try{const{status:h,columnName:p,expectToBe:d}=e.validator(f,{validateColumns:aS});if(h==="error")throw new Error(eD({columnName:p,expectToBe:d,from:`${e.name}.params$`}));h==="warning"&&console.warn(nD({columnName:p,expectToBe:d,from:`${e.name}.params$`}))}catch(h){console.error(tD(h))}return Fu(f,c)}))),QP(1));return{params$:l,name:e.name,chartType:t,defaultParams:e.defaultParams,layerIndex:e.layerIndex,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:c=>{s.next(Fu(c,e.defaultParams))},setContext:c=>{a=c,a.observer.fullParams$=u}}}const Ur=t=>function(e){return function(n){return class{constructor(){const r=rD({chartType:t,config:e,initFn:n});this.params$=r.params$,this.name=r.name,this.chartType=r.chartType,this.defaultParams=r.defaultParams,this.layerIndex=r.layerIndex,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},Sn=Ur("series"),se=Ur("grid"),de=Ur("multiGrid"),Hn=Ur("multiValue"),qa=Ur("relationship"),gc=Ur("tree");function wt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function m0(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Za(t){let e,n,r;t.length!==2?(e=wt,n=(s,l)=>wt(t(s),l),r=(s,l)=>t(s)-l):(e=t===wt||t===m0?t:iD,n=t,r=t);function i(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<0?u=f+1:c=f}while(u<c)}return u}function o(s,l,u=0,c=s.length){if(u<c){if(e(l,l)!==0)return c;do{const f=u+c>>>1;n(s[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function a(s,l,u=0,c=s.length){const f=i(s,l,u,c-1);return f>u&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:a,right:o}}function iD(){return 0}function Ka(t){return t===null?NaN:+t}function*oD(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const y0=Za(wt),b0=y0.right,aD=y0.left,sD=Za(Ka).center,jn=b0;function lD(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=mc(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const x0=v0(mc),uD=v0(cD);function v0(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return e;const s=n&&t(n),l=r&&t(r),u=i.slice();return s&&l?(Hr(s,u,i,o,a),Hr(s,i,u,o,a),Hr(s,u,i,o,a),jr(l,i,u,o,a),jr(l,u,i,o,a),jr(l,i,u,o,a)):s?(Hr(s,i,u,o,a),Hr(s,u,i,o,a),Hr(s,i,u,o,a)):l&&(jr(l,i,u,o,a),jr(l,u,i,o,a),jr(l,i,u,o,a)),e}}function Hr(t,e,n,r,i){for(let o=0,a=r*i;o<a;)t(e,n,o,o+=r,1)}function jr(t,e,n,r,i){for(let o=0,a=r*i;o<r;++o)t(e,n,o,o+a,r)}function cD(t){const e=mc(t);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,e(n,r,i+0,o+0,a),e(n,r,i+1,o+1,a),e(n,r,i+2,o+2,a),e(n,r,i+3,o+3,a)}}function mc(t){const e=Math.floor(t);if(e===t)return fD(t);const n=t-e,r=2*t+1;return(i,o,a,s,l)=>{if(!((s-=l)>=a))return;let u=e*o[a];const c=l*e,f=c+l;for(let h=a,p=a+c;h<p;h+=l)u+=o[Math.min(s,h)];for(let h=a,p=s;h<=p;h+=l)u+=o[Math.min(s,h+c)],i[h]=(u+n*(o[Math.max(a,h-f)]+o[Math.min(s,h+f)]))/r,u-=o[Math.max(a,h-c)]}}function fD(t){const e=2*t+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=t*r[i];const l=a*t;for(let u=i,c=i+l;u<c;u+=a)s+=r[Math.min(o,u)];for(let u=i,c=o;u<=c;u+=a)s+=r[Math.min(o,u+l)],n[u]=s/e,s-=r[Math.max(i,u-l)]}}function Qa(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function hD(t){return t.length|0}function pD(t){return!(t>0)}function dD(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function gD(t){return e=>t(...e)}function mD(...t){const e=typeof t[t.length-1]=="function"&&gD(t.pop());t=t.map(dD);const n=t.map(hD),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(pD))return o;for(;;){o.push(i.map((s,l)=>t[l][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return e?o.map(e):o;i[a--]=0}}}function yD(t,e){var n=0,r=0;return Float64Array.from(t,e===void 0?i=>n+=+i||0:i=>n+=+e(i,r++,t)||0)}function $0(t,e){let n=0,r,i=0,o=0;if(e===void 0)for(let a of t)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function _0(t,e){const n=$0(t,e);return n&&Math.sqrt(n)}function io(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class kt{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=e+o,s=Math.abs(e)<Math.abs(o)?e-(a-o):o-(a-e);s&&(n[r++]=s),e=a}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=e[--n];n>0&&(r=a,i=e[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&e[n-1]<0||o>0&&e[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function bD(t,e){const n=new kt;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function xD(t,e){const n=new kt;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}class oo extends Map{constructor(e,n=T0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(yc(this,e))}has(e){return super.has(yc(this,e))}set(e,n){return super.set(S0(this,e),n)}delete(e){return super.delete(w0(this,e))}}class qn extends Set{constructor(e,n=T0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(yc(this,e))}add(e){return super.add(S0(this,e))}delete(e){return super.delete(w0(this,e))}}function yc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function S0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function w0({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function T0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function qr(t){return t}function A0(t,...e){return Zr(t,qr,qr,e)}function P0(t,...e){return Zr(t,Array.from,qr,e)}function D0(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return t}function vD(t,...e){return D0(P0(t,...e),e)}function $D(t,e,...n){return D0(M0(t,e,...n),n)}function C0(t,e,...n){return Zr(t,qr,e,n)}function M0(t,e,...n){return Zr(t,Array.from,e,n)}function _D(t,...e){return Zr(t,qr,L0,e)}function SD(t,...e){return Zr(t,Array.from,L0,e)}function L0(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Zr(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new oo,l=r[a++];let u=-1;for(const c of o){const f=l(c,++u,o),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,a));return e(s)}(t,0)}function k0(t,e){return Array.from(e,n=>t[n])}function bc(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,o)=>o);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,o)=>{for(const a of e){const s=Kr(a[i],a[o]);if(s)return s}})):(n=t.map(n),r.sort((i,o)=>Kr(n[i],n[o]))),k0(t,r)}return t.sort(xc(n))}function xc(t=wt){if(t===wt)return Kr;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Kr(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function wD(t,e,n){return(e.length!==2?bc(C0(t,e,n),([r,i],[o,a])=>wt(i,a)||wt(r,o)):bc(A0(t,n),([r,i],[o,a])=>e(i,a)||wt(r,o))).map(([r])=>r)}var TD=Array.prototype,AD=TD.slice;function vc(t){return()=>t}const PD=Math.sqrt(50),DD=Math.sqrt(10),CD=Math.sqrt(2);function Ja(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=PD?10:o>=DD?5:o>=CD?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(t*u),l=Math.round(e*u),s/u<t&&++s,l/u>e&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(t/u),l=Math.round(e/u),s*u<t&&++s,l*u>e&&--l),l<s&&.5<=n&&n<2?Ja(t,e,n*2):[s,l,u]}function Zn(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?Ja(e,t,n):Ja(t,e,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function Kn(t,e,n){return e=+e,t=+t,n=+n,Ja(t,e,n)[2]}function ts(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Kn(e,t,n):Kn(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function $c(t,e,n){let r;for(;;){const i=Kn(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function _c(t){return Math.max(1,Math.ceil(Math.log(Qa(t))/Math.LN2)+1)}function R0(){var t=qr,e=io,n=_c;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,l,u=new Array(a);for(o=0;o<a;++o)u[o]=t(i[o],o,i);var c=e(u),f=c[0],h=c[1],p=n(u,f,h);if(!Array.isArray(p)){const v=h,x=+p;if(e===io&&([f,h]=$c(f,h,x)),p=Zn(f,h,x),p[0]<=f&&(l=Kn(f,h,x)),p[p.length-1]>=h)if(v>=h&&e===io){const _=Kn(f,h,x);isFinite(_)&&(_>0?h=(Math.floor(h/_)+1)*_:_<0&&(h=(Math.ceil(h*-_)+1)/-_))}else p.pop()}for(var d=p.length,m=0,g=d;p[m]<=f;)++m;for(;p[g-1]>h;)--g;(m||g<d)&&(p=p.slice(m,g),d=g-m);var y=new Array(d+1),b;for(o=0;o<=d;++o)b=y[o]=[],b.x0=o>0?p[o-1]:f,b.x1=o<d?p[o]:h;if(isFinite(l)){if(l>0)for(o=0;o<a;++o)(s=u[o])!=null&&f<=s&&s<=h&&y[Math.min(d,Math.floor((s-f)/l))].push(i[o]);else if(l<0){for(o=0;o<a;++o)if((s=u[o])!=null&&f<=s&&s<=h){const v=Math.floor((f-s)*l);y[Math.min(d,v+(p[v]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=u[o])!=null&&f<=s&&s<=h&&y[jn(p,s,0,d)].push(i[o]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:vc(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:vc([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:vc(Array.isArray(i)?AD.call(i):i),r):n},r}function ao(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Sc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function es(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function wc(t,e){let n,r=-1,i=-1;if(e===void 0)for(const o of t)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of t)(o=e(o,++i,t))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ns(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Kr:xc(i);r>n;){if(r-n>600){const l=r-n+1,u=e-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(e-u*f/l+h)),d=Math.min(r,Math.floor(e+(l-u)*f/l+h));ns(t,e,p,d,i)}const o=t[e];let a=n,s=r;for(so(t,n,e),i(t[r],o)>0&&so(t,n,r);a<s;){for(so(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?so(t,n,s):(++s,so(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function so(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function E0(t,e=wt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?wt(a,i)>0:wt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function lo(t,e,n){if(t=Float64Array.from(oD(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return es(t);if(e>=1)return ao(t);var r,i=(r-1)*e,o=Math.floor(i),a=ao(ns(t,o).subarray(0,o+1)),s=es(t.subarray(o+1));return a+(s-a)*(i-o)}}function I0(t,e,n=Ka){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),s=+n(t[o+1],o+1,t);return a+(s-a)*(i-o)}}function B0(t,e,n=Ka){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,l)=>Ka(n(t[l],l,t))),e<=0)return wc(r);if(e>=1)return Sc(r);var r,i=Uint32Array.from(t,(s,l)=>l),o=r.length-1,a=Math.floor(o*e);return ns(i,a,0,o,(s,l)=>Kr(r[s],r[l])),a=E0(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function MD(t,e,n){const r=Qa(t),i=lo(t,.75)-lo(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function LD(t,e,n){const r=Qa(t),i=_0(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function kD(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function RD(t,e){return lo(t,.5,e)}function ED(t,e){return B0(t,.5,e)}function*ID(t){for(const e of t)yield*e}function Tc(t){return Array.from(ID(t))}function BD(t,e){const n=new oo;if(e===void 0)for(let o of t)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of t)(a=e(a,++o,t))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function ND(t,e=FD){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function FD(t,e){return[t,e]}function wn(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function zD(t,e=wt){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(t);const r=new Float64Array(n.length);e.length!==2&&(n=n.map(e),e=wt);const i=(s,l)=>e(n[s],n[l]);let o,a;return t=Uint32Array.from(n,(s,l)=>l),t.sort(e===wt?(s,l)=>Kr(n[s],n[l]):xc(i)),t.forEach((s,l)=>{const u=i(s,o===void 0?s:o);u>=0?((o===void 0||u>0)&&(o=s,a=l),r[s]=a):r[s]=NaN}),r}function OD(t,e=wt){let n,r=!1;if(e.length===1){let i;for(const o of t){const a=e(o);(r?wt(a,i)<0:wt(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of t)(r?e(i,n)<0:e(i,i)===0)&&(n=i,r=!0);return n}function N0(t,e=wt){if(e.length===1)return wc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)<0)&&(n=o,r=i);return r}function GD(t,e=wt){if(e.length===1)return Sc(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?e(o,o)===0:e(o,n)>0)&&(n=o,r=i);return r}function WD(t,e){const n=N0(t,e);return n<0?void 0:n}const YD=F0(Math.random);function F0(t){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=t()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function Ac(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function z0(t){if(!(o=t.length))return[];for(var e=-1,n=es(t,XD),r=new Array(n);++e<n;)for(var i=-1,o,a=r[e]=new Array(o);++i<o;)a[i]=t[i][e];return r}function XD(t){return t.length}function VD(){return z0(arguments)}function UD(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(!e(r,++n,t))return!1;return!0}function HD(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let n=-1;for(const r of t)if(e(r,++n,t))return!0;return!1}function jD(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of t)e(i,++r,t)&&n.push(i);return n}function qD(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(n,r)=>e(n,r,t))}function ZD(t,e,n){if(typeof e!="function")throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=e(n,o,++a,t);return n}function KD(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function QD(t,...e){t=new qn(t);for(const n of e)for(const r of n)t.delete(r);return t}function JD(t,e){const n=e[Symbol.iterator](),r=new qn;for(const i of t){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function tC(t,...e){t=new qn(t),e=e.map(eC);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function eC(t){return t instanceof qn?t:new qn(t)}function O0(t,e){const n=t[Symbol.iterator](),r=new Set;for(const i of e){const o=G0(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const l=G0(a);if(r.add(l),Object.is(o,l))break}}return!0}function G0(t){return t!==null&&typeof t=="object"?t.valueOf():t}function nC(t,e){return O0(e,t)}function rC(...t){const e=new qn;for(const n of t)for(const r of n)e.add(r);return e}function iC(t){return t}var rs=1,is=2,Pc=3,uo=4,W0=1e-6;function oC(t){return"translate("+t+",0)"}function aC(t){return"translate(0,"+t+")"}function sC(t){return e=>+t(e)}function lC(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function uC(){return!this.__axis}function os(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===rs||t===uo?-1:1,c=t===uo||t===is?"x":"y",f=t===rs||t===Pc?oC:aC;function h(p){var d=r??(e.ticks?e.ticks.apply(e,n):e.domain()),m=i??(e.tickFormat?e.tickFormat.apply(e,n):iC),g=Math.max(o,0)+s,y=e.range(),b=+y[0]+l,v=+y[y.length-1]+l,x=(e.bandwidth?lC:sC)(e.copy(),l),_=p.selection?p.selection():p,A=_.selectAll(".domain").data([null]),S=_.selectAll(".tick").data(d,e).order(),P=S.exit(),C=S.enter().append("g").attr("class","tick"),B=S.select("line"),$=S.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(C),B=B.merge(C.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),$=$.merge(C.append("text").attr("fill","currentColor").attr(c,u*g).attr("dy",t===rs?"0em":t===Pc?"0.71em":"0.32em")),p!==_&&(A=A.transition(p),S=S.transition(p),B=B.transition(p),$=$.transition(p),P=P.transition(p).attr("opacity",W0).attr("transform",function(k){return isFinite(k=x(k))?f(k+l):this.getAttribute("transform")}),C.attr("opacity",W0).attr("transform",function(k){var M=this.parentNode.__axis;return f((M&&isFinite(M=M(k))?M:x(k))+l)})),P.remove(),A.attr("d",t===uo||t===is?a?"M"+u*a+","+b+"H"+l+"V"+v+"H"+u*a:"M"+l+","+b+"V"+v:a?"M"+b+","+u*a+"V"+l+"H"+v+"V"+u*a:"M"+b+","+l+"H"+v),S.attr("opacity",1).attr("transform",function(k){return f(x(k)+l)}),B.attr(c+"2",u*o),$.attr(c,u*g).text(m),_.filter(uC).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===is?"start":t===uo?"end":"middle"),_.each(function(){this.__axis=x})}return h.scale=function(p){return arguments.length?(e=p,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(o=a=+p,h):o},h.tickSizeInner=function(p){return arguments.length?(o=+p,h):o},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(s=+p,h):s},h.offset=function(p){return arguments.length?(l=+p,h):l},h}function cC(t){return os(rs,t)}function fC(t){return os(is,t)}function Dc(t){return os(Pc,t)}function Cc(t){return os(uo,t)}var hC={value:()=>{}};function Qn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new as(n)}function as(t){this._=t}function pC(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}as.prototype=Qn.prototype={constructor:as,on:function(t,e){var n=this._,r=pC(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=dC(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=Y0(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Y0(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new as(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function dC(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Y0(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=hC,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Mc="http://www.w3.org/1999/xhtml";const Lc={svg:"http://www.w3.org/2000/svg",xhtml:Mc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function co(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Lc.hasOwnProperty(e)?{space:Lc[e],local:t}:t}function gC(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Mc&&e.documentElement.namespaceURI===Mc?e.createElement(t):e.createElementNS(n,t)}}function mC(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ss(t){var e=co(t);return(e.local?mC:gC)(e)}function yC(){}function ls(t){return t==null?yC:function(){return this.querySelector(t)}}function bC(t){typeof t!="function"&&(t=ls(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=t.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Ht(r,this._parents)}function X0(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function xC(){return[]}function kc(t){return t==null?xC:function(){return this.querySelectorAll(t)}}function vC(t){return function(){return X0(t.apply(this,arguments))}}function $C(t){typeof t=="function"?t=vC(t):t=kc(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(t.call(l,l.__data__,u,a)),i.push(l));return new Ht(r,i)}function Rc(t){return function(){return this.matches(t)}}function V0(t){return function(e){return e.matches(t)}}var _C=Array.prototype.find;function SC(t){return function(){return _C.call(this.children,t)}}function wC(){return this.firstElementChild}function TC(t){return this.select(t==null?wC:SC(typeof t=="function"?t:V0(t)))}var AC=Array.prototype.filter;function PC(){return Array.from(this.children)}function DC(t){return function(){return AC.call(this.children,t)}}function CC(t){return this.selectAll(t==null?PC:DC(typeof t=="function"?t:V0(t)))}function MC(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new Ht(r,this._parents)}function U0(t){return new Array(t.length)}function LC(){return new Ht(this._enter||this._groups.map(U0),this._parents)}function us(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}us.prototype={constructor:us,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function kC(t){return function(){return t}}function RC(t,e,n,r,i,o){for(var a=0,s,l=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new us(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function EC(t,e,n,r,i,o,a){var s,l,u=new Map,c=e.length,f=o.length,h=new Array(c),p;for(s=0;s<c;++s)(l=e[s])&&(h[s]=p=a.call(l,l.__data__,s,e)+"",u.has(p)?i[s]=l:u.set(p,l));for(s=0;s<f;++s)p=a.call(t,o[s],s,o)+"",(l=u.get(p))?(r[s]=l,l.__data__=o[s],u.delete(p)):n[s]=new us(t,o[s]);for(s=0;s<c;++s)(l=e[s])&&u.get(h[s])===l&&(i[s]=l)}function IC(t){return t.__data__}function BC(t,e){if(!arguments.length)return Array.from(this,IC);var n=e?EC:RC,r=this._parents,i=this._groups;typeof t!="function"&&(t=kC(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],h=f.length,p=NC(t.call(c,c&&c.__data__,u,r)),d=p.length,m=s[u]=new Array(d),g=a[u]=new Array(d),y=l[u]=new Array(h);n(c,f,m,g,y,p,e);for(var b=0,v=0,x,_;b<d;++b)if(x=m[b]){for(b>=v&&(v=b+1);!(_=g[v])&&++v<d;);x._next=_||null}}return a=new Ht(a,r),a._enter=s,a._exit=l,a}function NC(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function FC(){return new Ht(this._exit||this._groups.map(U0),this._parents)}function zC(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function OC(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],f=u.length,h=s[l]=new Array(f),p,d=0;d<f;++d)(p=u[d]||c[d])&&(h[d]=p);for(;l<i;++l)s[l]=n[l];return new Ht(s,this._parents)}function GC(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function WC(t){t||(t=YC);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(e)}return new Ht(i,this._parents).order()}function YC(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function XC(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function VC(){return Array.from(this)}function UC(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function HC(){let t=0;for(const e of this)++t;return t}function jC(){return!this.node()}function qC(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function ZC(t){return function(){this.removeAttribute(t)}}function KC(t){return function(){this.removeAttributeNS(t.space,t.local)}}function QC(t,e){return function(){this.setAttribute(t,e)}}function JC(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function tM(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function eM(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function nM(t,e){var n=co(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?KC:ZC:typeof e=="function"?n.local?eM:tM:n.local?JC:QC)(n,e))}function Ec(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function rM(t){return function(){this.style.removeProperty(t)}}function iM(t,e,n){return function(){this.style.setProperty(t,e,n)}}function oM(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function aM(t,e,n){return arguments.length>1?this.each((e==null?rM:typeof e=="function"?oM:iM)(t,e,n??"")):Jn(this.node(),t)}function Jn(t,e){return t.style.getPropertyValue(e)||Ec(t).getComputedStyle(t,null).getPropertyValue(e)}function sM(t){return function(){delete this[t]}}function lM(t,e){return function(){this[t]=e}}function uM(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function cM(t,e){return arguments.length>1?this.each((e==null?sM:typeof e=="function"?uM:lM)(t,e)):this.node()[t]}function H0(t){return t.trim().split(/^|\s+/)}function Ic(t){return t.classList||new j0(t)}function j0(t){this._node=t,this._names=H0(t.getAttribute("class")||"")}j0.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function q0(t,e){for(var n=Ic(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Z0(t,e){for(var n=Ic(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function fM(t){return function(){q0(this,t)}}function hM(t){return function(){Z0(this,t)}}function pM(t,e){return function(){(e.apply(this,arguments)?q0:Z0)(this,t)}}function dM(t,e){var n=H0(t+"");if(arguments.length<2){for(var r=Ic(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?pM:e?fM:hM)(n,e))}function gM(){this.textContent=""}function mM(t){return function(){this.textContent=t}}function yM(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function bM(t){return arguments.length?this.each(t==null?gM:(typeof t=="function"?yM:mM)(t)):this.node().textContent}function xM(){this.innerHTML=""}function vM(t){return function(){this.innerHTML=t}}function $M(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function _M(t){return arguments.length?this.each(t==null?xM:(typeof t=="function"?$M:vM)(t)):this.node().innerHTML}function SM(){this.nextSibling&&this.parentNode.appendChild(this)}function wM(){return this.each(SM)}function TM(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function AM(){return this.each(TM)}function PM(t){var e=typeof t=="function"?t:ss(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function DM(){return null}function CM(t,e){var n=typeof t=="function"?t:ss(t),r=e==null?DM:typeof e=="function"?e:ls(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function MM(){var t=this.parentNode;t&&t.removeChild(this)}function LM(){return this.each(MM)}function kM(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function RM(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function EM(t){return this.select(t?RM:kM)}function IM(t){return arguments.length?this.property("__data__",t):this.node().__data__}function BM(t){return function(e){t.call(this,e,this.__data__)}}function NM(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function FM(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function zM(t,e,n){return function(){var r=this.__on,i,o=BM(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function OM(t,e,n){var r=NM(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=e?zM:FM,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function K0(t,e,n){var r=Ec(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function GM(t,e){return function(){return K0(this,t,e)}}function WM(t,e){return function(){return K0(this,t,e.apply(this,arguments))}}function YM(t,e){return this.each((typeof e=="function"?WM:GM)(t,e))}function*XM(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Bc=[null];function Ht(t,e){this._groups=t,this._parents=e}function tr(){return new Ht([[document.documentElement]],Bc)}function VM(){return this}Ht.prototype=tr.prototype={constructor:Ht,select:bC,selectAll:$C,selectChild:TC,selectChildren:CC,filter:MC,data:BC,enter:LC,exit:FC,join:zC,merge:OC,selection:VM,order:GC,sort:WC,call:XC,nodes:VC,node:UC,size:HC,empty:jC,each:qC,attr:nM,style:aM,property:cM,classed:dM,text:bM,html:_M,raise:wM,lower:AM,append:PM,insert:CM,remove:LM,clone:EM,datum:IM,on:OM,dispatch:YM,[Symbol.iterator]:XM};function V(t){return typeof t=="string"?new Ht([[document.querySelector(t)]],[document.documentElement]):new Ht([[t]],Bc)}function UM(t){return V(ss(t).call(document.documentElement))}var HM=0;function Q0(){return new Nc}function Nc(){this._="@"+(++HM).toString(36)}Nc.prototype=Q0.prototype={constructor:Nc,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function J0(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ge(t,e){if(t=J0(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function jM(t,e){return t.target&&(t=J0(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,n=>ge(n,e))}function qM(t){return typeof t=="string"?new Ht([document.querySelectorAll(t)],[document.documentElement]):new Ht([X0(t)],Bc)}const ZM={passive:!1},fo={capture:!0,passive:!1};function Fc(t){t.stopImmediatePropagation()}function Qr(t){t.preventDefault(),t.stopImmediatePropagation()}function cs(t){var e=t.document.documentElement,n=V(t).on("dragstart.drag",Qr,fo);"onselectstart"in e?n.on("selectstart.drag",Qr,fo):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function fs(t,e){var n=t.document.documentElement,r=V(t).on("dragstart.drag",null);e&&(r.on("click.drag",Qr,fo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const hs=t=>()=>t;function zc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}zc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function KM(t){return!t.ctrlKey&&!t.button}function QM(){return this.parentNode}function JM(t,e){return e??{x:t.x,y:t.y}}function tL(){return navigator.maxTouchPoints||"ontouchstart"in this}function ps(){var t=KM,e=QM,n=JM,r=tL,i={},o=Qn("start","drag","end"),a=0,s,l,u,c,f=0;function h(x){x.on("mousedown.drag",p).filter(r).on("touchstart.drag",g).on("touchmove.drag",y,ZM).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(x,_){if(!(c||!t.call(this,x,_))){var A=v(this,e.call(this,x,_),x,_,"mouse");A&&(V(x.view).on("mousemove.drag",d,fo).on("mouseup.drag",m,fo),cs(x.view),Fc(x),u=!1,s=x.clientX,l=x.clientY,A("start",x))}}function d(x){if(Qr(x),!u){var _=x.clientX-s,A=x.clientY-l;u=_*_+A*A>f}i.mouse("drag",x)}function m(x){V(x.view).on("mousemove.drag mouseup.drag",null),fs(x.view,u),Qr(x),i.mouse("end",x)}function g(x,_){if(t.call(this,x,_)){var A=x.changedTouches,S=e.call(this,x,_),P=A.length,C,B;for(C=0;C<P;++C)(B=v(this,S,x,_,A[C].identifier,A[C]))&&(Fc(x),B("start",x,A[C]))}}function y(x){var _=x.changedTouches,A=_.length,S,P;for(S=0;S<A;++S)(P=i[_[S].identifier])&&(Qr(x),P("drag",x,_[S]))}function b(x){var _=x.changedTouches,A=_.length,S,P;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),S=0;S<A;++S)(P=i[_[S].identifier])&&(Fc(x),P("end",x,_[S]))}function v(x,_,A,S,P,C){var B=o.copy(),$=ge(C||A,_),k,M,T;if((T=n.call(x,new zc("beforestart",{sourceEvent:A,target:h,identifier:P,active:a,x:$[0],y:$[1],dx:0,dy:0,dispatch:B}),S))!=null)return k=T.x-$[0]||0,M=T.y-$[1]||0,function w(D,F,z){var I=$,N;switch(D){case"start":i[P]=w,N=a++;break;case"end":delete i[P],--a;case"drag":$=ge(z||F,_),N=a;break}B.call(D,x,new zc(D,{sourceEvent:F,subject:T,target:h,identifier:P,active:N,x:$[0]+k,y:$[1]+M,dx:$[0]-I[0],dy:$[1]-I[1],dispatch:B}),S)}}return h.filter=function(x){return arguments.length?(t=typeof x=="function"?x:hs(!!x),h):t},h.container=function(x){return arguments.length?(e=typeof x=="function"?x:hs(x),h):e},h.subject=function(x){return arguments.length?(n=typeof x=="function"?x:hs(x),h):n},h.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:hs(!!x),h):r},h.on=function(){var x=o.on.apply(o,arguments);return x===o?h:x},h.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,h):Math.sqrt(f)},h}function Jr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ho(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Tn(){}var er=.7,ti=1/er,ei="\\s*([+-]?\\d+)\\s*",po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ye="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",eL=/^#([0-9a-f]{3,8})$/,nL=new RegExp(`^rgb\\(${ei},${ei},${ei}\\)$`),rL=new RegExp(`^rgb\\(${Ye},${Ye},${Ye}\\)$`),iL=new RegExp(`^rgba\\(${ei},${ei},${ei},${po}\\)$`),oL=new RegExp(`^rgba\\(${Ye},${Ye},${Ye},${po}\\)$`),aL=new RegExp(`^hsl\\(${po},${Ye},${Ye}\\)$`),sL=new RegExp(`^hsla\\(${po},${Ye},${Ye},${po}\\)$`),tm={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};Jr(Tn,An,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:em,formatHex:em,formatHex8:lL,formatHsl:uL,formatRgb:nm,toString:nm});function em(){return this.rgb().formatHex()}function lL(){return this.rgb().formatHex8()}function uL(){return sm(this).formatHsl()}function nm(){return this.rgb().formatRgb()}function An(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=eL.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?rm(e):n===3?new It(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ds(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ds(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=nL.exec(t))?new It(e[1],e[2],e[3],1):(e=rL.exec(t))?new It(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=iL.exec(t))?ds(e[1],e[2],e[3],e[4]):(e=oL.exec(t))?ds(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=aL.exec(t))?am(e[1],e[2]/100,e[3]/100,1):(e=sL.exec(t))?am(e[1],e[2]/100,e[3]/100,e[4]):tm.hasOwnProperty(t)?rm(tm[t]):t==="transparent"?new It(NaN,NaN,NaN,0):null}function rm(t){return new It(t>>16&255,t>>8&255,t&255,1)}function ds(t,e,n,r){return r<=0&&(t=e=n=NaN),new It(t,e,n,r)}function Oc(t){return t instanceof Tn||(t=An(t)),t?(t=t.rgb(),new It(t.r,t.g,t.b,t.opacity)):new It}function ni(t,e,n,r){return arguments.length===1?Oc(t):new It(t,e,n,r??1)}function It(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Jr(It,ni,ho(Tn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new It(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?er:Math.pow(er,t),new It(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new It(nr(this.r),nr(this.g),nr(this.b),gs(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:im,formatHex:im,formatHex8:cL,formatRgb:om,toString:om}));function im(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}`}function cL(){return`#${rr(this.r)}${rr(this.g)}${rr(this.b)}${rr((isNaN(this.opacity)?1:this.opacity)*255)}`}function om(){const t=gs(this.opacity);return`${t===1?"rgb(":"rgba("}${nr(this.r)}, ${nr(this.g)}, ${nr(this.b)}${t===1?")":`, ${t})`}`}function gs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function nr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function rr(t){return t=nr(t),(t<16?"0":"")+t.toString(16)}function am(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ke(t,e,n,r)}function sm(t){if(t instanceof ke)return new ke(t.h,t.s,t.l,t.opacity);if(t instanceof Tn||(t=An(t)),!t)return new ke;if(t instanceof ke)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ke(a,s,l,t.opacity)}function ms(t,e,n,r){return arguments.length===1?sm(t):new ke(t,e,n,r??1)}function ke(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Jr(ke,ms,ho(Tn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new ke(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?er:Math.pow(er,t),new ke(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new It(Gc(t>=240?t-240:t+120,i,r),Gc(t,i,r),Gc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new ke(lm(this.h),ys(this.s),ys(this.l),gs(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 t=gs(this.opacity);return`${t===1?"hsl(":"hsla("}${lm(this.h)}, ${ys(this.s)*100}%, ${ys(this.l)*100}%${t===1?")":`, ${t})`}`}}));function lm(t){return t=(t||0)%360,t<0?t+360:t}function ys(t){return Math.max(0,Math.min(1,t||0))}function Gc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const um=Math.PI/180,cm=180/Math.PI,bs=18,fm=.96422,hm=1,pm=.82521,dm=4/29,ri=6/29,gm=3*ri*ri,fL=ri*ri*ri;function mm(t){if(t instanceof Re)return new Re(t.l,t.a,t.b,t.opacity);if(t instanceof Xe)return bm(t);t instanceof It||(t=Oc(t));var e=Vc(t.r),n=Vc(t.g),r=Vc(t.b),i=Wc((.2225045*e+.7168786*n+.0606169*r)/hm),o,a;return e===n&&n===r?o=a=i:(o=Wc((.4360747*e+.3850649*n+.1430804*r)/fm),a=Wc((.0139322*e+.0971045*n+.7141733*r)/pm)),new Re(116*i-16,500*(o-i),200*(i-a),t.opacity)}function hL(t,e){return new Re(t,0,0,e??1)}function go(t,e,n,r){return arguments.length===1?mm(t):new Re(t,e,n,r??1)}function Re(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Jr(Re,go,ho(Tn,{brighter(t){return new Re(this.l+bs*(t??1),this.a,this.b,this.opacity)},darker(t){return new Re(this.l-bs*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=fm*Yc(e),t=hm*Yc(t),n=pm*Yc(n),new It(Xc(3.1338561*e-1.6168667*t-.4906146*n),Xc(-.9787684*e+1.9161415*t+.033454*n),Xc(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Wc(t){return t>fL?Math.pow(t,1/3):t/gm+dm}function Yc(t){return t>ri?t*t*t:gm*(t-dm)}function Xc(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Vc(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ym(t){if(t instanceof Xe)return new Xe(t.h,t.c,t.l,t.opacity);if(t instanceof Re||(t=mm(t)),t.a===0&&t.b===0)return new Xe(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*cm;return new Xe(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function pL(t,e,n,r){return arguments.length===1?ym(t):new Xe(n,e,t,r??1)}function xs(t,e,n,r){return arguments.length===1?ym(t):new Xe(t,e,n,r??1)}function Xe(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function bm(t){if(isNaN(t.h))return new Re(t.l,0,0,t.opacity);var e=t.h*um;return new Re(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Jr(Xe,xs,ho(Tn,{brighter(t){return new Xe(this.h,this.c,this.l+bs*(t??1),this.opacity)},darker(t){return new Xe(this.h,this.c,this.l-bs*(t??1),this.opacity)},rgb(){return bm(this).rgb()}}));var xm=-.14861,Uc=1.78277,Hc=-.29227,vs=-.90649,mo=1.97294,vm=mo*vs,$m=mo*Uc,_m=Uc*Hc-vs*xm;function dL(t){if(t instanceof ir)return new ir(t.h,t.s,t.l,t.opacity);t instanceof It||(t=Oc(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(_m*r+vm*e-$m*n)/(_m+vm-$m),o=r-i,a=(mo*(n-i)-Hc*o)/vs,s=Math.sqrt(a*a+o*o)/(mo*i*(1-i)),l=s?Math.atan2(a,o)*cm-120:NaN;return new ir(l<0?l+360:l,s,i,t.opacity)}function Ee(t,e,n,r){return arguments.length===1?dL(t):new ir(t,e,n,r??1)}function ir(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Jr(ir,Ee,ho(Tn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new ir(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?er:Math.pow(er,t),new ir(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*um,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new It(255*(e+n*(xm*r+Uc*i)),255*(e+n*(Hc*r+vs*i)),255*(e+n*(mo*r)),this.opacity)}}));function Sm(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function wm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Sm((n-r/e)*e,a,i,o,s)}}function Tm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Sm((n-r/e)*e,i,o,a,s)}}const $s=t=>()=>t;function Am(t,e){return function(n){return t+n*e}}function gL(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function _s(t,e){var n=e-t;return n?Am(t,n>180||n<-180?n-360*Math.round(n/360):n):$s(isNaN(t)?e:t)}function mL(t){return(t=+t)==1?Bt:function(e,n){return n-e?gL(e,n,t):$s(isNaN(e)?n:e)}}function Bt(t,e){var n=e-t;return n?Am(t,n):$s(isNaN(t)?e:t)}const yo=function t(e){var n=mL(e);function r(i,o){var a=n((i=ni(i)).r,(o=ni(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=Bt(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=t,r}(1);function Pm(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=ni(e[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=t(r),i=t(i),o=t(o),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=o(l),s+""}}}var Dm=Pm(wm),yL=Pm(Tm);function jc(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Cm(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function bL(t,e){return(Cm(e)?jc:Mm)(t,e)}function Mm(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=nn(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Lm(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ve(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function km(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=nn(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var qc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zc=new RegExp(qc.source,"g");function xL(t){return function(){return t}}function vL(t){return function(e){return t(e)+""}}function Kc(t,e){var n=qc.lastIndex=Zc.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(r=qc.exec(t))&&(i=Zc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:ve(r,i)})),n=Zc.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?vL(l[0].x):xL(e):(e=l.length,function(u){for(var c=0,f;c<e;++c)s[(f=l[c]).i]=f.x(u);return s.join("")})}function nn(t,e){var n=typeof e,r;return e==null||n==="boolean"?$s(e):(n==="number"?ve:n==="string"?(r=An(e))?(e=r,yo):Kc:e instanceof An?yo:e instanceof Date?Lm:Cm(e)?jc:Array.isArray(e)?Mm:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?km:ve)(t,e)}function $L(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function _L(t,e){var n=_s(+t,+e);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Ss(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Rm=180/Math.PI,Qc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Em(t,e,n,r,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Rm,skewX:Math.atan(l)*Rm,scaleX:a,scaleY:s}}var ws;function SL(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Qc:Em(e.a,e.b,e.c,e.d,e.e,e.f)}function wL(t){return t==null||(ws||(ws=document.createElementNS("http://www.w3.org/2000/svg","g")),ws.setAttribute("transform",t),!(t=ws.transform.baseVal.consolidate()))?Qc:(t=t.matrix,Em(t.a,t.b,t.c,t.d,t.e,t.f))}function Im(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:ve(u,f)},{i:m-2,x:ve(c,h)})}else(f||h)&&p.push("translate("+f+e+h+n)}function a(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:ve(u,c)})):c&&f.push(i(f)+"rotate("+c+r)}function s(u,c,f,h){u!==c?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:ve(u,c)}):c&&f.push(i(f)+"skewX("+c+r)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:ve(u,f)},{i:m-2,x:ve(c,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=t(u),c=t(c),o(u.translateX,u.translateY,c.translateX,c.translateY,f,h),a(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,m=h.length,g;++d<m;)f[(g=h[d]).i]=g.x(p);return f.join("")}}}var Bm=Im(SL,"px, ","px)","deg)"),Nm=Im(wL,", ",")",")"),TL=1e-12;function Fm(t){return((t=Math.exp(t))+1/t)/2}function AL(t){return((t=Math.exp(t))-1/t)/2}function PL(t){return((t=Math.exp(2*t))-1)/(t+1)}const zm=function t(e,n,r){function i(o,a){var s=o[0],l=o[1],u=o[2],c=a[0],f=a[1],h=a[2],p=c-s,d=f-l,m=p*p+d*d,g,y;if(m<TL)y=Math.log(h/u)/e,g=function(S){return[s+S*p,l+S*d,u*Math.exp(e*S*y)]};else{var b=Math.sqrt(m),v=(h*h-u*u+r*m)/(2*u*n*b),x=(h*h-u*u-r*m)/(2*h*n*b),_=Math.log(Math.sqrt(v*v+1)-v),A=Math.log(Math.sqrt(x*x+1)-x);y=(A-_)/e,g=function(S){var P=S*y,C=Fm(_),B=u/(n*b)*(C*PL(e*P+_)-AL(_));return[s+B*p,l+B*d,u*C/Fm(e*P+_)]}}return g.duration=y*1e3*e/Math.SQRT2,g}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,l=s*s;return t(a,s,l)},i}(Math.SQRT2,2,4);function Om(t){return function(e,n){var r=t((e=ms(e)).h,(n=ms(n)).h),i=Bt(e.s,n.s),o=Bt(e.l,n.l),a=Bt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.s=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const DL=Om(_s);var CL=Om(Bt);function ML(t,e){var n=Bt((t=go(t)).l,(e=go(e)).l),r=Bt(t.a,e.a),i=Bt(t.b,e.b),o=Bt(t.opacity,e.opacity);return function(a){return t.l=n(a),t.a=r(a),t.b=i(a),t.opacity=o(a),t+""}}function Gm(t){return function(e,n){var r=t((e=xs(e)).h,(n=xs(n)).h),i=Bt(e.c,n.c),o=Bt(e.l,n.l),a=Bt(e.opacity,n.opacity);return function(s){return e.h=r(s),e.c=i(s),e.l=o(s),e.opacity=a(s),e+""}}}const LL=Gm(_s);var kL=Gm(Bt);function Wm(t){return function e(n){n=+n;function r(i,o){var a=t((i=Ee(i)).h,(o=Ee(o)).h),s=Bt(i.s,o.s),l=Bt(i.l,o.l),u=Bt(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=e,r}(1)}const RL=Wm(_s);var Ts=Wm(Bt);function Ym(t,e){e===void 0&&(e=t,t=nn);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function EL(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var ii=0,bo=0,xo=0,Xm=1e3,As,vo,Ps=0,or=0,Ds=0,$o=typeof performance=="object"&&performance.now?performance:Date,Vm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _o(){return or||(Vm(IL),or=$o.now()+Ds)}function IL(){or=0}function So(){this._call=this._time=this._next=null}So.prototype=Cs.prototype={constructor:So,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?_o():+n)+(e==null?0:+e),!this._next&&vo!==this&&(vo?vo._next=this:As=this,vo=this),this._call=t,this._time=n,Jc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jc())}};function Cs(t,e,n){var r=new So;return r.restart(t,e,n),r}function Um(){_o(),++ii;for(var t=As,e;t;)(e=or-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ii}function Hm(){or=(Ps=$o.now())+Ds,ii=bo=0;try{Um()}finally{ii=0,NL(),or=0}}function BL(){var t=$o.now(),e=t-Ps;e>Xm&&(Ds-=e,Ps=t)}function NL(){for(var t,e=As,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:As=n);vo=t,Jc(r)}function Jc(t){if(!ii){bo&&(bo=clearTimeout(bo));var e=t-or;e>24?(t<1/0&&(bo=setTimeout(Hm,t-$o.now()-Ds)),xo&&(xo=clearInterval(xo))):(xo||(Ps=$o.now(),xo=setInterval(BL,Xm)),ii=1,Vm(Hm))}}function tf(t,e,n){var r=new So;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}function FL(t,e,n){var r=new So,i=e;return e==null?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?_o():+s,r._restart(function l(u){u+=i,r._restart(l,i+=a,s),o(u)},a,s)},r.restart(t,e,n),r)}var zL=Qn("start","end","cancel","interrupt"),OL=[],jm=0,ef=1,nf=2,Ms=3,qm=4,rf=5,Ls=6;function ks(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;GL(t,n,{name:e,index:r,group:i,on:zL,tween:OL,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jm})}function of(t,e){var n=Ie(t,e);if(n.state>jm)throw new Error("too late; already scheduled");return n}function Ve(t,e){var n=Ie(t,e);if(n.state>Ms)throw new Error("too late; already running");return n}function Ie(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function GL(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Cs(o,0,n.time);function o(u){n.state=ef,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,h,p;if(n.state!==ef)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Ms)return tf(a);p.state===qm?(p.state=Ls,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[c]):+c<e&&(p.state=Ls,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[c])}if(tf(function(){n.state===Ms&&(n.state=qm,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=nf,n.on.call("start",t,t.__data__,n.index,n.group),n.state===nf){for(n.state=Ms,i=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(p=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=rf,1),f=-1,h=i.length;++f<h;)i[f].call(t,c);n.state===rf&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Ls,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function ar(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>nf&&r.state<rf,r.state=Ls,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function WL(t){return this.each(function(){ar(this,t)})}function YL(t,e){var n,r;return function(){var i=Ve(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function XL(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ve(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function VL(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ie(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?YL:XL)(n,t,e))}function af(t,e,n){var r=t._id;return t.each(function(){var i=Ve(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Ie(i,r).value[e]}}function Zm(t,e){var n;return(typeof e=="number"?ve:e instanceof An?yo:(n=An(e))?(e=n,yo):Kc)(t,e)}function UL(t){return function(){this.removeAttribute(t)}}function HL(t){return function(){this.removeAttributeNS(t.space,t.local)}}function jL(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function qL(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function ZL(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function KL(t,e,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s)))}}function QL(t,e){var n=co(t),r=n==="transform"?Nm:Zm;return this.attrTween(t,typeof e=="function"?(n.local?KL:ZL)(n,r,af(this,"attr."+t,e)):e==null?(n.local?HL:UL)(n):(n.local?qL:jL)(n,r,e))}function JL(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function t5(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function e5(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&t5(t,o)),n}return i._value=e,i}function n5(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&JL(t,o)),n}return i._value=e,i}function r5(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=co(t);return this.tween(n,(r.local?e5:n5)(r,e))}function i5(t,e){return function(){of(this,t).delay=+e.apply(this,arguments)}}function o5(t,e){return e=+e,function(){of(this,t).delay=e}}function a5(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?i5:o5)(e,t)):Ie(this.node(),e).delay}function s5(t,e){return function(){Ve(this,t).duration=+e.apply(this,arguments)}}function l5(t,e){return e=+e,function(){Ve(this,t).duration=e}}function u5(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?s5:l5)(e,t)):Ie(this.node(),e).duration}function c5(t,e){if(typeof e!="function")throw new Error;return function(){Ve(this,t).ease=e}}function f5(t){var e=this._id;return arguments.length?this.each(c5(e,t)):Ie(this.node(),e).ease}function h5(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ve(this,t).ease=n}}function p5(t){if(typeof t!="function")throw new Error;return this.each(h5(this._id,t))}function d5(t){typeof t!="function"&&(t=Rc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new Ue(r,this._parents,this._name,this._id)}function g5(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=e[s],u=n[s],c=l.length,f=a[s]=new Array(c),h,p=0;p<c;++p)(h=l[p]||u[p])&&(f[p]=h);for(;s<r;++s)a[s]=e[s];return new Ue(a,this._parents,this._name,this._id)}function m5(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function y5(t,e,n){var r,i,o=m5(e)?of:Ve;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function b5(t,e){var n=this._id;return arguments.length<2?Ie(this.node(),n).on.on(t):this.each(y5(n,t,e))}function x5(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function v5(){return this.on("end.remove",x5(this._id))}function $5(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ls(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,f,h=0;h<l;++h)(c=s[h])&&(f=t.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,ks(u[h],e,n,h,u,Ie(c,n)));return new Ue(o,this._parents,e,n)}function _5(t){var e=this._name,n=this._id;typeof t!="function"&&(t=kc(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,f=0;f<u;++f)if(c=l[f]){for(var h=t.call(c,c.__data__,f,l),p,d=Ie(c,n),m=0,g=h.length;m<g;++m)(p=h[m])&&ks(p,e,n,m,h,d);o.push(h),a.push(c)}return new Ue(o,a,e,n)}var S5=tr.prototype.constructor;function w5(){return new S5(this._groups,this._parents)}function T5(t,e){var n,r,i;return function(){var o=Jn(this,t),a=(this.style.removeProperty(t),Jn(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Km(t){return function(){this.style.removeProperty(t)}}function A5(t,e,n){var r,i=n+"",o;return function(){var a=Jn(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function P5(t,e,n){var r,i,o;return function(){var a=Jn(this,t),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),Jn(this,t))),a===l?null:a===r&&l===i?o:(i=l,o=e(r=a,s))}}function D5(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var l=Ve(this,t),u=l.on,c=l.value[o]==null?s||(s=Km(e)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function C5(t,e,n){var r=(t+="")=="transform"?Bm:Zm;return e==null?this.styleTween(t,T5(t,r)).on("end.style."+t,Km(t)):typeof e=="function"?this.styleTween(t,P5(t,r,af(this,"style."+t,e))).each(D5(this._id,t)):this.styleTween(t,A5(t,r,e),n).on("end.style."+t,null)}function M5(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function L5(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&M5(t,a,n)),r}return o._value=e,o}function k5(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,L5(t,e,n??""))}function R5(t){return function(){this.textContent=t}}function E5(t){return function(){var e=t(this);this.textContent=e??""}}function I5(t){return this.tween("text",typeof t=="function"?E5(af(this,"text",t)):R5(t==null?"":t+""))}function B5(t){return function(e){this.textContent=t.call(this,e)}}function N5(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&B5(i)),e}return r._value=t,r}function F5(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,N5(t))}function z5(){for(var t=this._name,e=this._id,n=Jm(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Ie(l,e);ks(l,t,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ue(r,this._parents,t,n)}function O5(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=Ve(this,r),c=u.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),u.on=e}),i===0&&o()})}var G5=0;function Ue(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Qm(t){return tr().transition(t)}function Jm(){return++G5}var rn=tr.prototype;Ue.prototype=Qm.prototype={constructor:Ue,select:$5,selectAll:_5,selectChild:rn.selectChild,selectChildren:rn.selectChildren,filter:d5,merge:g5,selection:w5,transition:z5,call:rn.call,nodes:rn.nodes,node:rn.node,size:rn.size,empty:rn.empty,each:rn.each,on:b5,attr:QL,attrTween:r5,style:C5,styleTween:k5,text:I5,textTween:F5,remove:v5,tween:VL,delay:a5,duration:u5,ease:f5,easeVarying:p5,end:O5,[Symbol.iterator]:rn[Symbol.iterator]};const W5=t=>+t;function Y5(t){return t*t}function X5(t){return t*(2-t)}function ty(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function V5(t){return t*t*t}function U5(t){return--t*t*t+1}function wo(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var sf=3,H5=function t(e){e=+e;function n(r){return Math.pow(r,e)}return n.exponent=t,n}(sf),j5=function t(e){e=+e;function n(r){return 1-Math.pow(1-r,e)}return n.exponent=t,n}(sf),ey=function t(e){e=+e;function n(r){return((r*=2)<=1?Math.pow(r,e):2-Math.pow(2-r,e))/2}return n.exponent=t,n}(sf),ny=Math.PI,ry=ny/2;function q5(t){return+t==1?1:1-Math.cos(t*ry)}function Z5(t){return Math.sin(t*ry)}function iy(t){return(1-Math.cos(ny*t))/2}function Pn(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function K5(t){return Pn(1-+t)}function Q5(t){return 1-Pn(t)}function oy(t){return((t*=2)<=1?Pn(1-t):2-Pn(t-1))/2}function J5(t){return 1-Math.sqrt(1-t*t)}function t3(t){return Math.sqrt(1- --t*t)}function ay(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var lf=4/11,e3=6/11,n3=8/11,r3=3/4,i3=9/11,o3=10/11,a3=15/16,s3=21/22,l3=63/64,Rs=1/lf/lf;function u3(t){return 1-To(1-t)}function To(t){return(t=+t)<lf?Rs*t*t:t<n3?Rs*(t-=e3)*t+r3:t<o3?Rs*(t-=i3)*t+a3:Rs*(t-=s3)*t+l3}function c3(t){return((t*=2)<=1?1-To(1-t):To(t-1)+1)/2}var uf=1.70158,f3=function t(e){e=+e;function n(r){return(r=+r)*r*(e*(r-1)+r)}return n.overshoot=t,n}(uf),h3=function t(e){e=+e;function n(r){return--r*r*((r+1)*e+r)+1}return n.overshoot=t,n}(uf),sy=function t(e){e=+e;function n(r){return((r*=2)<1?r*r*((e+1)*r-e):(r-=2)*r*((e+1)*r+e)+2)/2}return n.overshoot=t,n}(uf),oi=2*Math.PI,cf=1,ff=.3,p3=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oi);function i(o){return e*Pn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return t(o,n*oi)},i.period=function(o){return t(e,o)},i}(cf,ff),sr=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oi);function i(o){return 1-e*Pn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return t(o,n*oi)},i.period=function(o){return t(e,o)},i}(cf,ff),d3=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=oi);function i(o){return((o=o*2-1)<0?e*Pn(-o)*Math.sin((r-o)/n):2-e*Pn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return t(o,n*oi)},i.period=function(o){return t(e,o)},i}(cf,ff),g3={time:null,delay:0,duration:250,ease:wo};function m3(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function y3(t){var e,n;t instanceof Ue?(e=t._id,t=t._name):(e=Jm(),(n=g3).time=_o(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&ks(l,t,e,u,a,n||m3(l,e));return new Ue(r,this._parents,t,e)}tr.prototype.interrupt=WL,tr.prototype.transition=y3;var b3=[null];function x3(t,e){var n=t.__transition,r,i;if(n){e=e==null?null:e+"";for(i in n)if((r=n[i]).state>ef&&r.name===e)return new Ue([[t]],b3,e,+i)}return null}const hf=t=>()=>t;function v3(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function $3(t){t.stopImmediatePropagation()}function pf(t){t.preventDefault(),t.stopImmediatePropagation()}var ly={name:"drag"},df={name:"space"},ai={name:"handle"},si={name:"center"};const{abs:uy,max:Gt,min:Wt}=Math;function cy(t){return[+t[0],+t[1]]}function gf(t){return[cy(t[0]),cy(t[1])]}var Es={name:"x",handles:["w","e"].map(Ao),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Is={name:"y",handles:["n","s"].map(Ao),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},_3={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ao),input:function(t){return t==null?null:gf(t)},output:function(t){return t}},on={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},hy={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},S3={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},w3={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ao(t){return{type:t}}function T3(t){return!t.ctrlKey&&!t.button}function A3(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function P3(){return navigator.maxTouchPoints||"ontouchstart"in this}function mf(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function D3(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function C3(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function M3(){return yf(Es)}function L3(){return yf(Is)}function k3(){return yf(_3)}function yf(t){var e=A3,n=T3,r=P3,i=!0,o=Qn("start","brush","end"),a=6,s;function l(g){var y=g.property("__brush",m).selectAll(".overlay").data([Ao("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",on.overlay).merge(y).each(function(){var v=mf(this).extent;V(this).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1])}),g.selectAll(".selection").data([Ao("selection")]).enter().append("rect").attr("class","selection").attr("cursor",on.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var b=g.selectAll(".handle").data(t.handles,function(v){return v.type});b.exit().remove(),b.enter().append("rect").attr("class",function(v){return"handle handle--"+v.type}).attr("cursor",function(v){return on[v.type]}),g.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(g,y,b){g.tween?g.on("start.brush",function(v){c(this,arguments).beforestart().start(v)}).on("interrupt.brush end.brush",function(v){c(this,arguments).end(v)}).tween("brush",function(){var v=this,x=v.__brush,_=c(v,arguments),A=x.selection,S=t.input(typeof y=="function"?y.apply(this,arguments):y,x.extent),P=nn(A,S);function C(B){x.selection=B===1&&S===null?null:P(B),u.call(v),_.brush()}return A!==null&&S!==null?C:C(1)}):g.each(function(){var v=this,x=arguments,_=v.__brush,A=t.input(typeof y=="function"?y.apply(v,x):y,_.extent),S=c(v,x).beforestart();ar(v),_.selection=A===null?null:A,u.call(v),S.start(b).brush(b).end(b)})},l.clear=function(g,y){l.move(g,null,y)};function u(){var g=V(this),y=mf(this).selection;y?(g.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),g.selectAll(".handle").style("display",null).attr("x",function(b){return b.type[b.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(b){return b.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(b){return b.type==="n"||b.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(b){return b.type==="e"||b.type==="w"?y[1][1]-y[0][1]+a:a})):g.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(g,y,b){var v=g.__brush.emitter;return v&&(!b||!v.clean)?v:new f(g,y,b)}function f(g,y,b){this.that=g,this.args=y,this.state=g.__brush,this.active=0,this.clean=b}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(g,y){return this.starting?(this.starting=!1,this.emit("start",g,y)):this.emit("brush",g),this},brush:function(g,y){return this.emit("brush",g,y),this},end:function(g,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",g,y)),this},emit:function(g,y,b){var v=V(this.that).datum();o.call(g,this.that,new v3(g,{sourceEvent:y,target:l,selection:t.output(this.state.selection),mode:b,dispatch:o}),v)}};function h(g){if(s&&!g.touches||!n.apply(this,arguments))return;var y=this,b=g.target.__data__.type,v=(i&&g.metaKey?b="overlay":b)==="selection"?ly:i&&g.altKey?si:ai,x=t===Is?null:S3[b],_=t===Es?null:w3[b],A=mf(y),S=A.extent,P=A.selection,C=S[0][0],B,$,k=S[0][1],M,T,w=S[1][0],D,F,z=S[1][1],I,N,E=0,O=0,j,it=x&&_&&i&&g.shiftKey,Y,Q,X=Array.from(g.touches||[g],lt=>{const Ct=lt.identifier;return lt=ge(lt,y),lt.point0=lt.slice(),lt.identifier=Ct,lt});ar(y);var K=c(y,arguments,!0).beforestart();if(b==="overlay"){P&&(j=!0);const lt=[X[0],X[1]||X[0]];A.selection=P=[[B=t===Is?C:Wt(lt[0][0],lt[1][0]),M=t===Es?k:Wt(lt[0][1],lt[1][1])],[D=t===Is?w:Gt(lt[0][0],lt[1][0]),I=t===Es?z:Gt(lt[0][1],lt[1][1])]],X.length>1&&mt(g)}else B=P[0][0],M=P[0][1],D=P[1][0],I=P[1][1];$=B,T=M,F=D,N=I;var q=V(y).attr("pointer-events","none"),nt=q.selectAll(".overlay").attr("cursor",on[b]);if(g.touches)K.moved=U,K.ended=ft;else{var st=V(g.view).on("mousemove.brush",U,!0).on("mouseup.brush",ft,!0);i&&st.on("keydown.brush",Et,!0).on("keyup.brush",ie,!0),cs(g.view)}u.call(y),K.start(g,v.name);function U(lt){for(const Ct of lt.changedTouches||[lt])for(const ga of X)ga.identifier===Ct.identifier&&(ga.cur=ge(Ct,y));if(it&&!Y&&!Q&&X.length===1){const Ct=X[0];uy(Ct.cur[0]-Ct[0])>uy(Ct.cur[1]-Ct[1])?Q=!0:Y=!0}for(const Ct of X)Ct.cur&&(Ct[0]=Ct.cur[0],Ct[1]=Ct.cur[1]);j=!0,pf(lt),mt(lt)}function mt(lt){const Ct=X[0],ga=Ct.point0;var Fn;switch(E=Ct[0]-ga[0],O=Ct[1]-ga[1],v){case df:case ly:{x&&(E=Gt(C-B,Wt(w-D,E)),$=B+E,F=D+E),_&&(O=Gt(k-M,Wt(z-I,O)),T=M+O,N=I+O);break}case ai:{X[1]?(x&&($=Gt(C,Wt(w,X[0][0])),F=Gt(C,Wt(w,X[1][0])),x=1),_&&(T=Gt(k,Wt(z,X[0][1])),N=Gt(k,Wt(z,X[1][1])),_=1)):(x<0?(E=Gt(C-B,Wt(w-B,E)),$=B+E,F=D):x>0&&(E=Gt(C-D,Wt(w-D,E)),$=B,F=D+E),_<0?(O=Gt(k-M,Wt(z-M,O)),T=M+O,N=I):_>0&&(O=Gt(k-I,Wt(z-I,O)),T=M,N=I+O));break}case si:{x&&($=Gt(C,Wt(w,B-E*x)),F=Gt(C,Wt(w,D+E*x))),_&&(T=Gt(k,Wt(z,M-O*_)),N=Gt(k,Wt(z,I+O*_)));break}}F<$&&(x*=-1,Fn=B,B=D,D=Fn,Fn=$,$=F,F=Fn,b in fy&&nt.attr("cursor",on[b=fy[b]])),N<T&&(_*=-1,Fn=M,M=I,I=Fn,Fn=T,T=N,N=Fn,b in hy&&nt.attr("cursor",on[b=hy[b]])),A.selection&&(P=A.selection),Y&&($=P[0][0],F=P[1][0]),Q&&(T=P[0][1],N=P[1][1]),(P[0][0]!==$||P[0][1]!==T||P[1][0]!==F||P[1][1]!==N)&&(A.selection=[[$,T],[F,N]],u.call(y),K.brush(lt,v.name))}function ft(lt){if($3(lt),lt.touches){if(lt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else fs(lt.view,j),st.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),nt.attr("cursor",on.overlay),A.selection&&(P=A.selection),D3(P)&&(A.selection=null,u.call(y)),K.end(lt,v.name)}function Et(lt){switch(lt.keyCode){case 16:{it=x&&_;break}case 18:{v===ai&&(x&&(D=F-E*x,B=$+E*x),_&&(I=N-O*_,M=T+O*_),v=si,mt(lt));break}case 32:{(v===ai||v===si)&&(x<0?D=F-E:x>0&&(B=$-E),_<0?I=N-O:_>0&&(M=T-O),v=df,nt.attr("cursor",on.selection),mt(lt));break}default:return}pf(lt)}function ie(lt){switch(lt.keyCode){case 16:{it&&(Y=Q=it=!1,mt(lt));break}case 18:{v===si&&(x<0?D=F:x>0&&(B=$),_<0?I=N:_>0&&(M=T),v=ai,mt(lt));break}case 32:{v===df&&(lt.altKey?(x&&(D=F-E*x,B=$+E*x),_&&(I=N-O*_,M=T+O*_),v=si):(x<0?D=F:x>0&&(B=$),_<0?I=N:_>0&&(M=T),v=ai),nt.attr("cursor",on[b]),mt(lt));break}default:return}pf(lt)}}function p(g){c(this,arguments).moved(g)}function d(g){c(this,arguments).ended(g)}function m(){var g=this.__brush||{selection:null};return g.extent=gf(e.apply(this,arguments)),g.dim=t,g}return l.extent=function(g){return arguments.length?(e=typeof g=="function"?g:hf(gf(g)),l):e},l.filter=function(g){return arguments.length?(n=typeof g=="function"?g:hf(!!g),l):n},l.touchable=function(g){return arguments.length?(r=typeof g=="function"?g:hf(!!g),l):r},l.handleSize=function(g){return arguments.length?(a=+g,l):a},l.keyModifiers=function(g){return arguments.length?(i=!!g,l):i},l.on=function(){var g=o.on.apply(o,arguments);return g===o?l:g},l}var py=Math.abs,li=Math.cos,ui=Math.sin,dy=Math.PI,Bs=dy/2,gy=dy*2,my=Math.max,bf=1e-12;function xf(t,e){return Array.from({length:e-t},(n,r)=>t+r)}function R3(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function E3(){return vf(!1,!1)}function I3(){return vf(!1,!0)}function B3(){return vf(!0,!1)}function vf(t,e){var n=0,r=null,i=null,o=null;function a(s){var l=s.length,u=new Array(l),c=xf(0,l),f=new Array(l*l),h=new Array(l),p=0,d;s=Float64Array.from({length:l*l},e?(m,g)=>s[g%l][g/l|0]:(m,g)=>s[g/l|0][g%l]);for(let m=0;m<l;++m){let g=0;for(let y=0;y<l;++y)g+=s[m*l+y]+t*s[y*l+m];p+=u[m]=g}p=my(0,gy-n*l)/p,d=p?n:gy/l;{let m=0;r&&c.sort((g,y)=>r(u[g],u[y]));for(const g of c){const y=m;if(t){const b=xf(~l+1,l).filter(v=>v<0?s[~v*l+g]:s[g*l+v]);i&&b.sort((v,x)=>i(v<0?-s[~v*l+g]:s[g*l+v],x<0?-s[~x*l+g]:s[g*l+x]));for(const v of b)if(v<0){const x=f[~v*l+g]||(f[~v*l+g]={source:null,target:null});x.target={index:g,startAngle:m,endAngle:m+=s[~v*l+g]*p,value:s[~v*l+g]}}else{const x=f[g*l+v]||(f[g*l+v]={source:null,target:null});x.source={index:g,startAngle:m,endAngle:m+=s[g*l+v]*p,value:s[g*l+v]}}h[g]={index:g,startAngle:y,endAngle:m,value:u[g]}}else{const b=xf(0,l).filter(v=>s[g*l+v]||s[v*l+g]);i&&b.sort((v,x)=>i(s[g*l+v],s[g*l+x]));for(const v of b){let x;if(g<v?(x=f[g*l+v]||(f[g*l+v]={source:null,target:null}),x.source={index:g,startAngle:m,endAngle:m+=s[g*l+v]*p,value:s[g*l+v]}):(x=f[v*l+g]||(f[v*l+g]={source:null,target:null}),x.target={index:g,startAngle:m,endAngle:m+=s[g*l+v]*p,value:s[g*l+v]},g===v&&(x.source=x.target)),x.source&&x.target&&x.source.value<x.target.value){const _=x.source;x.source=x.target,x.target=_}}h[g]={index:g,startAngle:y,endAngle:m,value:u[g]}}m+=d}}return f=Object.values(f),f.groups=h,o?f.sort(o):f}return a.padAngle=function(s){return arguments.length?(n=my(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=R3(s))._=s,a):o&&o._},a}const $f=Math.PI,_f=2*$f,lr=1e-6,N3=_f-lr;function yy(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function F3(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return yy;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Po=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?yy:F3(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-e,u=i-n,c=a-e,f=s-n,h=c*c+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>lr)if(!(Math.abs(f*l-u*c)>lr)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-s,m=l*l+u*u,g=p*p+d*d,y=Math.sqrt(m),b=Math.sqrt(h),v=o*Math.tan(($f-Math.acos((m+h-g)/(2*y*b)))/2),x=v/b,_=v/y;Math.abs(x-1)>lr&&this._append`L${e+x*c},${n+x*f}`,this._append`A${o},${o},0,0,${+(f*p>c*d)},${this._x1=e+_*l},${this._y1=n+_*u}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=e+s,c=n+l,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>lr||Math.abs(this._y1-c)>lr)&&this._append`L${u},${c}`,r&&(h<0&&(h=h%_f+_f),h>N3?this._append`A${r},${r},0,1,${f},${e-s},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=c}`:h>lr&&this._append`A${r},${r},0,${+(h>=$f)},${f},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Sf(){return new Po}Sf.prototype=Po.prototype;function z3(t=3){return new Po(+t)}var O3=Array.prototype.slice;function ur(t){return function(){return t}}function G3(t){return t.source}function W3(t){return t.target}function by(t){return t.radius}function Y3(t){return t.startAngle}function X3(t){return t.endAngle}function V3(){return 0}function U3(){return 10}function xy(t){var e=G3,n=W3,r=by,i=by,o=Y3,a=X3,s=V3,l=null;function u(){var c,f=e.apply(this,arguments),h=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=O3.call(arguments),m=+r.apply(this,(d[0]=f,d)),g=o.apply(this,d)-Bs,y=a.apply(this,d)-Bs,b=+i.apply(this,(d[0]=h,d)),v=o.apply(this,d)-Bs,x=a.apply(this,d)-Bs;if(l||(l=c=Sf()),p>bf&&(py(y-g)>p*2+bf?y>g?(g+=p,y-=p):(g-=p,y+=p):g=y=(g+y)/2,py(x-v)>p*2+bf?x>v?(v+=p,x-=p):(v-=p,x+=p):v=x=(v+x)/2),l.moveTo(m*li(g),m*ui(g)),l.arc(0,0,m,g,y),g!==v||y!==x)if(t){var _=+t.apply(this,arguments),A=b-_,S=(v+x)/2;l.quadraticCurveTo(0,0,A*li(v),A*ui(v)),l.lineTo(b*li(S),b*ui(S)),l.lineTo(A*li(x),A*ui(x))}else l.quadraticCurveTo(0,0,b*li(v),b*ui(v)),l.arc(0,0,b,v,x);if(l.quadraticCurveTo(0,0,m*li(g),m*ui(g)),l.closePath(),c)return l=null,c+""||null}return t&&(u.headRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ur(+c),u):t}),u.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:ur(+c),u):r},u.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:ur(+c),u):r},u.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:ur(+c),u):i},u.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ur(+c),u):o},u.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ur(+c),u):a},u.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:ur(+c),u):s},u.source=function(c){return arguments.length?(e=c,u):e},u.target=function(c){return arguments.length?(n=c,u):n},u.context=function(c){return arguments.length?(l=c??null,u):l},u}function H3(){return xy()}function j3(){return xy(U3)}var q3=Array.prototype,vy=q3.slice;function Z3(t,e){return t-e}function K3(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}const Dn=t=>()=>t;function Q3(t,e){for(var n=-1,r=e.length,i;++n<r;)if(i=J3(t,e[n]))return i;return 0}function J3(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var l=t[o],u=l[0],c=l[1],f=t[s],h=f[0],p=f[1];if(t6(l,f,e))return 0;c>r!=p>r&&n<(h-u)*(r-c)/(p-c)+u&&(i=-i)}return i}function t6(t,e,n){var r;return e6(t,e,n)&&n6(t[r=+(t[0]===e[0])],n[r],e[r])}function e6(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function n6(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function r6(){}var an=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function wf(){var t=1,e=1,n=_c,r=l;function i(u){var c=n(u);if(Array.isArray(c))c=c.slice().sort(Z3);else{const f=io(u,i6);for(c=Zn(...$c(f[0],f[1],c),c);c[c.length-1]>=f[1];)c.pop();for(;c[1]<f[0];)c.shift()}return c.map(f=>o(u,f))}function o(u,c){const f=c==null?NaN:+c;if(isNaN(f))throw new Error(`invalid value: ${c}`);var h=[],p=[];return a(u,f,function(d){r(d,u,f),K3(d)>0?h.push([d]):p.push(d)}),p.forEach(function(d){for(var m=0,g=h.length,y;m<g;++m)if(Q3((y=h[m])[0],d)!==-1){y.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:h}}function a(u,c,f){var h=new Array,p=new Array,d,m,g,y,b,v;for(d=m=-1,y=cr(u[0],c),an[y<<1].forEach(x);++d<t-1;)g=y,y=cr(u[d+1],c),an[g|y<<1].forEach(x);for(an[y<<0].forEach(x);++m<e-1;){for(d=-1,y=cr(u[m*t+t],c),b=cr(u[m*t],c),an[y<<1|b<<2].forEach(x);++d<t-1;)g=y,y=cr(u[m*t+t+d+1],c),v=b,b=cr(u[m*t+d+1],c),an[g|y<<1|b<<2|v<<3].forEach(x);an[y|b<<3].forEach(x)}for(d=-1,b=u[m*t]>=c,an[b<<2].forEach(x);++d<t-1;)v=b,b=cr(u[m*t+d+1],c),an[b<<2|v<<3].forEach(x);an[b<<3].forEach(x);function x(_){var A=[_[0][0]+d,_[0][1]+m],S=[_[1][0]+d,_[1][1]+m],P=s(A),C=s(S),B,$;(B=p[P])?($=h[C])?(delete p[B.end],delete h[$.start],B===$?(B.ring.push(S),f(B.ring)):h[B.start]=p[$.end]={start:B.start,end:$.end,ring:B.ring.concat($.ring)}):(delete p[B.end],B.ring.push(S),p[B.end=C]=B):(B=h[C])?($=p[P])?(delete h[B.start],delete p[$.end],B===$?(B.ring.push(S),f(B.ring)):h[$.start]=p[B.end]={start:$.start,end:B.end,ring:$.ring.concat(B.ring)}):(delete h[B.start],B.ring.unshift(A),h[B.start=P]=B):h[P]=p[C]={start:P,end:C,ring:[A,S]}}}function s(u){return u[0]*2+u[1]*(t+1)*4}function l(u,c,f){u.forEach(function(h){var p=h[0],d=h[1],m=p|0,g=d|0,y=Tf(c[g*t+m]);p>0&&p<t&&m===p&&(h[0]=$y(p,Tf(c[g*t+m-1]),y,f)),d>0&&d<e&&g===d&&(h[1]=$y(d,Tf(c[(g-1)*t+m]),y,f))})}return i.contour=o,i.size=function(u){if(!arguments.length)return[t,e];var c=Math.floor(u[0]),f=Math.floor(u[1]);if(!(c>=0&&f>=0))throw new Error("invalid size");return t=c,e=f,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?Dn(vy.call(u)):Dn(u),i):n},i.smooth=function(u){return arguments.length?(r=u?l:r6,i):r===l},i}function i6(t){return isFinite(t)?t:NaN}function cr(t,e){return t==null?!1:+t>=e}function Tf(t){return t==null||isNaN(t=+t)?-1/0:t}function $y(t,e,n,r){const i=r-e,o=n-e,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function o6(t){return t[0]}function a6(t){return t[1]}function s6(){return 1}function l6(){var t=o6,e=a6,n=s6,r=960,i=500,o=20,a=2,s=o*3,l=r+s*2>>a,u=i+s*2>>a,c=Dn(20);function f(b){var v=new Float32Array(l*u),x=Math.pow(2,-a),_=-1;for(const M of b){var A=(t(M,++_,b)+s)*x,S=(e(M,_,b)+s)*x,P=+n(M,_,b);if(P&&A>=0&&A<l&&S>=0&&S<u){var C=Math.floor(A),B=Math.floor(S),$=A-C-.5,k=S-B-.5;v[C+B*l]+=(1-$)*(1-k)*P,v[C+1+B*l]+=$*(1-k)*P,v[C+1+(B+1)*l]+=$*k*P,v[C+(B+1)*l]+=(1-$)*k*P}}return x0({data:v,width:l,height:u},o*x),v}function h(b){var v=f(b),x=c(v),_=Math.pow(2,2*a);return Array.isArray(x)||(x=Zn(Number.MIN_VALUE,ao(v)/_,x)),wf().size([l,u]).thresholds(x.map(A=>A*_))(v).map((A,S)=>(A.value=+x[S],p(A)))}h.contours=function(b){var v=f(b),x=wf().size([l,u]),_=Math.pow(2,2*a),A=S=>{S=+S;var P=p(x.contour(v,S*_));return P.value=S,P};return Object.defineProperty(A,"max",{get:()=>ao(v)/_}),A};function p(b){return b.coordinates.forEach(d),b}function d(b){b.forEach(m)}function m(b){b.forEach(g)}function g(b){b[0]=b[0]*Math.pow(2,a)-s,b[1]=b[1]*Math.pow(2,a)-s}function y(){return s=o*3,l=r+s*2>>a,u=i+s*2>>a,h}return h.x=function(b){return arguments.length?(t=typeof b=="function"?b:Dn(+b),h):t},h.y=function(b){return arguments.length?(e=typeof b=="function"?b:Dn(+b),h):e},h.weight=function(b){return arguments.length?(n=typeof b=="function"?b:Dn(+b),h):n},h.size=function(b){if(!arguments.length)return[r,i];var v=+b[0],x=+b[1];if(!(v>=0&&x>=0))throw new Error("invalid size");return r=v,i=x,y()},h.cellSize=function(b){if(!arguments.length)return 1<<a;if(!((b=+b)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(b)/Math.LN2),y()},h.thresholds=function(b){return arguments.length?(c=typeof b=="function"?b:Array.isArray(b)?Dn(vy.call(b)):Dn(b),h):c},h.bandwidth=function(b){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((b=+b)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*b*b+1)-1)/2,y()},h}const sn=11102230246251565e-32,Yt=134217729,u6=(3+8*sn)*sn;function Af(t,e,n,r,i){let o,a,s,l,u=e[0],c=r[0],f=0,h=0;c>u==c>-u?(o=u,u=e[++f]):(o=c,c=r[++h]);let p=0;if(f<t&&h<n)for(c>u==c>-u?(a=u+o,s=o-(a-u),u=e[++f]):(a=c+o,s=o-(a-c),c=r[++h]),o=a,s!==0&&(i[p++]=s);f<t&&h<n;)c>u==c>-u?(a=o+u,l=a-o,s=o-(a-l)+(u-l),u=e[++f]):(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=r[++h]),o=a,s!==0&&(i[p++]=s);for(;f<t;)a=o+u,l=a-o,s=o-(a-l)+(u-l),u=e[++f],o=a,s!==0&&(i[p++]=s);for(;h<n;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=r[++h],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function c6(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function Do(t){return new Float64Array(t)}const f6=(3+16*sn)*sn,h6=(2+12*sn)*sn,p6=(9+64*sn)*sn*sn,ci=Do(4),_y=Do(8),Sy=Do(12),wy=Do(16),jt=Do(4);function d6(t,e,n,r,i,o,a){let s,l,u,c,f,h,p,d,m,g,y,b,v,x,_,A,S,P;const C=t-i,B=n-i,$=e-o,k=r-o;x=C*k,h=Yt*C,p=h-(h-C),d=C-p,h=Yt*k,m=h-(h-k),g=k-m,_=d*g-(x-p*m-d*m-p*g),A=$*B,h=Yt*$,p=h-(h-$),d=$-p,h=Yt*B,m=h-(h-B),g=B-m,S=d*g-(A-p*m-d*m-p*g),y=_-S,f=_-y,ci[0]=_-(y+f)+(f-S),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,ci[1]=v-(y+f)+(f-A),P=b+y,f=P-b,ci[2]=b-(P-f)+(y-f),ci[3]=P;let M=c6(4,ci),T=h6*a;if(M>=T||-M>=T||(f=t-C,s=t-(C+f)+(f-i),f=n-B,u=n-(B+f)+(f-i),f=e-$,l=e-($+f)+(f-o),f=r-k,c=r-(k+f)+(f-o),s===0&&l===0&&u===0&&c===0)||(T=p6*a+u6*Math.abs(M),M+=C*c+k*s-($*u+B*l),M>=T||-M>=T))return M;x=s*k,h=Yt*s,p=h-(h-s),d=s-p,h=Yt*k,m=h-(h-k),g=k-m,_=d*g-(x-p*m-d*m-p*g),A=l*B,h=Yt*l,p=h-(h-l),d=l-p,h=Yt*B,m=h-(h-B),g=B-m,S=d*g-(A-p*m-d*m-p*g),y=_-S,f=_-y,jt[0]=_-(y+f)+(f-S),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,jt[1]=v-(y+f)+(f-A),P=b+y,f=P-b,jt[2]=b-(P-f)+(y-f),jt[3]=P;const w=Af(4,ci,4,jt,_y);x=C*c,h=Yt*C,p=h-(h-C),d=C-p,h=Yt*c,m=h-(h-c),g=c-m,_=d*g-(x-p*m-d*m-p*g),A=$*u,h=Yt*$,p=h-(h-$),d=$-p,h=Yt*u,m=h-(h-u),g=u-m,S=d*g-(A-p*m-d*m-p*g),y=_-S,f=_-y,jt[0]=_-(y+f)+(f-S),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,jt[1]=v-(y+f)+(f-A),P=b+y,f=P-b,jt[2]=b-(P-f)+(y-f),jt[3]=P;const D=Af(w,_y,4,jt,Sy);x=s*c,h=Yt*s,p=h-(h-s),d=s-p,h=Yt*c,m=h-(h-c),g=c-m,_=d*g-(x-p*m-d*m-p*g),A=l*u,h=Yt*l,p=h-(h-l),d=l-p,h=Yt*u,m=h-(h-u),g=u-m,S=d*g-(A-p*m-d*m-p*g),y=_-S,f=_-y,jt[0]=_-(y+f)+(f-S),b=x+y,f=b-x,v=x-(b-f)+(y-f),y=v-A,f=v-y,jt[1]=v-(y+f)+(f-A),P=b+y,f=P-b,jt[2]=b-(P-f)+(y-f),jt[3]=P;const F=Af(D,Sy,4,jt,wy);return wy[F-1]}function Ns(t,e,n,r,i,o){const a=(e-o)*(n-i),s=(t-i)*(r-o),l=a-s,u=Math.abs(a+s);return Math.abs(l)>=f6*u?l:-d6(t,e,n,r,i,o,u)}const Ty=Math.pow(2,-52),Fs=new Uint32Array(512);class zs{static from(e,n=x6,r=v6){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=e[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new zs(o)}constructor(e){const n=e.length>>1;if(n>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:e,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=e.length>>1;let s=1/0,l=1/0,u=-1/0,c=-1/0;for(let C=0;C<a;C++){const B=e[2*C],$=e[2*C+1];B<s&&(s=B),$<l&&(l=$),B>u&&(u=B),$>c&&(c=$),this._ids[C]=C}const f=(s+u)/2,h=(l+c)/2;let p,d,m;for(let C=0,B=1/0;C<a;C++){const $=Pf(f,h,e[2*C],e[2*C+1]);$<B&&(p=C,B=$)}const g=e[2*p],y=e[2*p+1];for(let C=0,B=1/0;C<a;C++){if(C===p)continue;const $=Pf(g,y,e[2*C],e[2*C+1]);$<B&&$>0&&(d=C,B=$)}let b=e[2*d],v=e[2*d+1],x=1/0;for(let C=0;C<a;C++){if(C===p||C===d)continue;const B=y6(g,y,b,v,e[2*C],e[2*C+1]);B<x&&(m=C,x=B)}let _=e[2*m],A=e[2*m+1];if(x===1/0){for(let $=0;$<a;$++)this._dists[$]=e[2*$]-e[0]||e[2*$+1]-e[1];fi(this._ids,this._dists,0,a-1);const C=new Uint32Array(a);let B=0;for(let $=0,k=-1/0;$<a;$++){const M=this._ids[$],T=this._dists[M];T>k&&(C[B++]=M,k=T)}this.hull=C.subarray(0,B),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Ns(g,y,b,v,_,A)<0){const C=d,B=b,$=v;d=m,b=_,v=A,m=C,_=B,A=$}const S=b6(g,y,b,v,_,A);this._cx=S.x,this._cy=S.y;for(let C=0;C<a;C++)this._dists[C]=Pf(e[2*C],e[2*C+1],S.x,S.y);fi(this._ids,this._dists,0,a-1),this._hullStart=p;let P=3;r[p]=n[m]=d,r[d]=n[p]=m,r[m]=n[d]=p,i[p]=0,i[d]=1,i[m]=2,o.fill(-1),o[this._hashKey(g,y)]=p,o[this._hashKey(b,v)]=d,o[this._hashKey(_,A)]=m,this.trianglesLen=0,this._addTriangle(p,d,m,-1,-1,-1);for(let C=0,B,$;C<this._ids.length;C++){const k=this._ids[C],M=e[2*k],T=e[2*k+1];if(C>0&&Math.abs(M-B)<=Ty&&Math.abs(T-$)<=Ty||(B=M,$=T,k===p||k===d||k===m))continue;let w=0;for(let N=0,E=this._hashKey(M,T);N<this._hashSize&&(w=o[(E+N)%this._hashSize],!(w!==-1&&w!==r[w]));N++);w=n[w];let D=w,F;for(;F=r[D],Ns(M,T,e[2*D],e[2*D+1],e[2*F],e[2*F+1])>=0;)if(D=F,D===w){D=-1;break}if(D===-1)continue;let z=this._addTriangle(D,k,r[D],-1,-1,i[D]);i[k]=this._legalize(z+2),i[D]=z,P++;let I=r[D];for(;F=r[I],Ns(M,T,e[2*I],e[2*I+1],e[2*F],e[2*F+1])<0;)z=this._addTriangle(I,k,F,i[k],-1,i[I]),i[k]=this._legalize(z+2),r[I]=I,P--,I=F;if(D===w)for(;F=n[D],Ns(M,T,e[2*F],e[2*F+1],e[2*D],e[2*D+1])<0;)z=this._addTriangle(F,k,D,-1,i[D],i[F]),this._legalize(z+2),i[F]=z,r[D]=D,P--,D=F;this._hullStart=n[k]=D,r[D]=n[I]=k,r[k]=I,o[this._hashKey(M,T)]=k,o[this._hashKey(e[2*D],e[2*D+1])]=D}this.hull=new Uint32Array(P);for(let C=0,B=this._hullStart;C<P;C++)this.hull[C]=B,B=r[B];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,n){return Math.floor(g6(e-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[e],l=e-e%3;if(a=l+(e+2)%3,s===-1){if(o===0)break;e=Fs[--o];continue}const u=s-s%3,c=l+(e+1)%3,f=u+(s+2)%3,h=n[a],p=n[e],d=n[c],m=n[f];if(m6(i[2*h],i[2*h+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*m],i[2*m+1])){n[e]=m,n[s]=h;const y=r[f];if(y===-1){let v=this._hullStart;do{if(this._hullTri[v]===f){this._hullTri[v]=e;break}v=this._hullPrev[v]}while(v!==this._hullStart)}this._link(e,y),this._link(s,r[a]),this._link(a,f);const b=u+(s+1)%3;o<Fs.length&&(Fs[o++]=b)}else{if(o===0)break;e=Fs[--o]}}return a}_link(e,n){this._halfedges[e]=n,n!==-1&&(this._halfedges[n]=e)}_addTriangle(e,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function g6(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Pf(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function m6(t,e,n,r,i,o,a,s){const l=t-a,u=e-s,c=n-a,f=r-s,h=i-a,p=o-s,d=l*l+u*u,m=c*c+f*f,g=h*h+p*p;return l*(f*g-m*p)-u*(c*g-m*h)+d*(c*p-f*h)<0}function y6(t,e,n,r,i,o){const a=n-t,s=r-e,l=i-t,u=o-e,c=a*a+s*s,f=l*l+u*u,h=.5/(a*u-s*l),p=(u*c-s*f)*h,d=(a*f-l*c)*h;return p*p+d*d}function b6(t,e,n,r,i,o){const a=n-t,s=r-e,l=i-t,u=o-e,c=a*a+s*s,f=l*l+u*u,h=.5/(a*u-s*l),p=t+(u*c-s*f)*h,d=e+(a*f-l*c)*h;return{x:p,y:d}}function fi(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=t[i],a=e[o];let s=i-1;for(;s>=n&&e[t[s]]>a;)t[s+1]=t[s--];t[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Co(t,i,o),e[t[n]]>e[t[r]]&&Co(t,n,r),e[t[o]]>e[t[r]]&&Co(t,o,r),e[t[n]]>e[t[o]]&&Co(t,n,o);const s=t[o],l=e[s];for(;;){do o++;while(e[t[o]]<l);do a--;while(e[t[a]]>l);if(a<o)break;Co(t,o,a)}t[n+1]=t[a],t[a]=s,r-o+1>=a-n?(fi(t,e,o,r),fi(t,e,n,a-1)):(fi(t,e,n,a-1),fi(t,e,o,r))}}function Co(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function x6(t){return t[0]}function v6(t){return t[1]}const Ay=1e-6;class fr{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,n){this._+=`L${this._x1=+e},${this._y1=+n}`}arc(e,n,r){e=+e,n=+n,r=+r;const i=e+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Ay||Math.abs(this._y1-o)>Ay)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${e-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(e,n,r,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Df{constructor(){this._=[]}moveTo(e,n){this._.push([e,n])}closePath(){this._.push(this._[0].slice())}lineTo(e,n){this._.push([e,n])}value(){return this._.length?this._:null}}class Py{constructor(e,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let m=0,g=0,y=r.length,b,v;m<y;m+=3,g+=2){const x=r[m]*2,_=r[m+1]*2,A=r[m+2]*2,S=e[x],P=e[x+1],C=e[_],B=e[_+1],$=e[A],k=e[A+1],M=C-S,T=B-P,w=$-S,D=k-P,F=(M*D-T*w)*2;if(Math.abs(F)<1e-9){if(o===void 0){o=a=0;for(const I of n)o+=e[I*2],a+=e[I*2+1];o/=n.length,a/=n.length}const z=1e9*Math.sign((o-S)*D-(a-P)*w);b=(S+$)/2-z*D,v=(P+k)/2+z*w}else{const z=1/F,I=M*M+T*T,N=w*w+D*D;b=S+(D*I-T*N)*z,v=P+(M*N-w*I)*z}s[g]=b,s[g+1]=v}let l=n[n.length-1],u,c=l*4,f,h=e[2*l],p,d=e[2*l+1];i.fill(0);for(let m=0;m<n.length;++m)l=n[m],u=c,f=h,p=d,c=l*4,h=e[2*l],d=e[2*l+1],i[u+2]=i[c]=p-d,i[u+3]=i[c+1]=h-f}render(e){const n=e==null?e=new fr:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,f=r.length;c<f;++c){const h=r[c];if(h<c)continue;const p=Math.floor(c/3)*2,d=Math.floor(h/3)*2,m=a[p],g=a[p+1],y=a[d],b=a[d+1];this._renderSegment(m,g,y,b,e)}let l,u=o[o.length-1];for(let c=0;c<o.length;++c){l=u,u=o[c];const f=Math.floor(i[u]/3)*2,h=a[f],p=a[f+1],d=l*4,m=this._project(h,p,s[d+2],s[d+3]);m&&this._renderSegment(h,p,m[0],m[1],e)}return n&&n.value()}renderBounds(e){const n=e==null?e=new fr:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(e,n){const r=n==null?n=new fr:void 0,i=this._clip(e);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let n=0,r=e.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(e){const n=new Df;return this.renderCell(e,n),n.value()}_renderSegment(e,n,r,i,o){let a;const s=this._regioncode(e,n),l=this._regioncode(r,i);s===0&&l===0?(o.moveTo(e,n),o.lineTo(r,i)):(a=this._clipSegment(e,n,r,i,s,l))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(e,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(e,n,r)===e}*neighbors(e){const n=this._clip(e);if(n)for(const r of this.delaunay.neighbors(e)){const i=this._clip(r);if(i){t:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,l=i.length;s<l;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+l-2)%l]&&n[(o+3)%a]===i[(s+l-1)%l]){yield r;break t}}}}_cell(e){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[e];if(a===-1)return null;const s=[];let l=a;do{const u=Math.floor(l/3);if(s.push(n[u*2],n[u*2+1]),l=l%3===2?l-2:l+1,o[l]!==e)break;l=i[l]}while(l!==a&&l!==-1);return s}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(e);if(n===null)return null;const{vectors:r}=this,i=e*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(e,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(e,n))}_clipFinite(e,n){const r=n.length;let i=null,o,a,s=n[r-2],l=n[r-1],u,c=this._regioncode(s,l),f,h=0;for(let p=0;p<r;p+=2)if(o=s,a=l,s=n[p],l=n[p+1],u=c,c=this._regioncode(s,l),u===0&&c===0)f=h,h=0,i?i.push(s,l):i=[s,l];else{let d,m,g,y,b;if(u===0){if((d=this._clipSegment(o,a,s,l,u,c))===null)continue;[m,g,y,b]=d}else{if((d=this._clipSegment(s,l,o,a,c,u))===null)continue;[y,b,m,g]=d,f=h,h=this._edgecode(m,g),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(m,g):i=[m,g]}f=h,h=this._edgecode(y,b),f&&h&&this._edge(e,f,h,i,i.length),i?i.push(y,b):i=[y,b]}if(i)f=h,h=this._edgecode(i[0],i[1]),f&&h&&this._edge(e,f,h,i,i.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(e,n,r,i,o,a){const s=o<a;for(s&&([e,n,r,i,o,a]=[r,i,e,n,a,o]);;){if(o===0&&a===0)return s?[r,i,e,n]:[e,n,r,i];if(o&a)return null;let l,u,c=o||a;c&8?(l=e+(r-e)*(this.ymax-n)/(i-n),u=this.ymax):c&4?(l=e+(r-e)*(this.ymin-n)/(i-n),u=this.ymin):c&2?(u=n+(i-n)*(this.xmax-e)/(r-e),l=this.xmax):(u=n+(i-n)*(this.xmin-e)/(r-e),l=this.xmin),o?(e=l,n=u,o=this._regioncode(e,n)):(r=l,i=u,a=this._regioncode(r,i))}}_clipInfinite(e,n,r,i,o,a){let s=Array.from(n),l;if((l=this._project(s[0],s[1],r,i))&&s.unshift(l[0],l[1]),(l=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(l[0],l[1]),s=this._clipFinite(e,s))for(let u=0,c=s.length,f,h=this._edgecode(s[c-2],s[c-1]);u<c;u+=2)f=h,h=this._edgecode(s[u],s[u+1]),f&&h&&(u=this._edge(e,f,h,s,u),c=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(e,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(e,n,r,i){let o=1/0,a,s,l;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(l=this.ymin,s=e+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(l=this.ymax,s=e+(o=a)*r)}if(r>0){if(e>=this.xmax)return null;(a=(this.xmax-e)/r)<o&&(s=this.xmax,l=n+(o=a)*i)}else if(r<0){if(e<=this.xmin)return null;(a=(this.xmin-e)/r)<o&&(s=this.xmin,l=n+(o=a)*i)}return[s,l]}_edgecode(e,n){return(e===this.xmin?1:e===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(e,n){return(e<this.xmin?1:e>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let n=0;n<e.length;n+=2){const r=(n+2)%e.length,i=(n+4)%e.length;(e[n]===e[r]&&e[r]===e[i]||e[n+1]===e[r+1]&&e[r+1]===e[i+1])&&(e.splice(r,2),n-=2)}e.length||(e=null)}return e}}const $6=2*Math.PI,hi=Math.pow;function _6(t){return t[0]}function S6(t){return t[1]}function w6(t){const{triangles:e,coords:n}=t;for(let r=0;r<e.length;r+=3){const i=2*e[r],o=2*e[r+1],a=2*e[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function T6(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class Cf{static from(e,n=_6,r=S6,i){return new Cf("length"in e?A6(e,n,r,i):Float64Array.from(P6(e,n,r,i)))}constructor(e){this._delaunator=new zs(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,n=this.points;if(e.hull&&e.hull.length>2&&w6(e)){this.collinear=Int32Array.from({length:n.length/2},(h,p)=>p).sort((h,p)=>n[2*h]-n[2*p]||n[2*h+1]-n[2*p+1]);const l=this.collinear[0],u=this.collinear[this.collinear.length-1],c=[n[2*l],n[2*l+1],n[2*u],n[2*u+1]],f=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let h=0,p=n.length/2;h<p;++h){const d=T6(n[2*h],n[2*h+1],f);n[2*h]=d[0],n[2*h+1]=d[1]}this._delaunator=new zs(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let l=0,u=r.length;l<u;++l){const c=o[l%3===2?l-2:l+1];(r[l]===-1||a[c]===-1)&&(a[c]=l)}for(let l=0,u=i.length;l<u;++l)s[i[l]]=l;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Py(this,e)}*neighbors(e){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const f=s.indexOf(e);f>0&&(yield s[f-1]),f<s.length-1&&(yield s[f+1]);return}const l=n[e];if(l===-1)return;let u=l,c=-1;do{if(yield c=a[u],u=u%3===2?u-2:u+1,a[u]!==e)return;if(u=o[u],u===-1){const f=r[(i[e]+1)%r.length];f!==c&&(yield f);return}}while(u!==l)}find(e,n,r=0){if(e=+e,e!==e||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,e,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(e,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:l,points:u}=this;if(i[e]===-1||!u.length)return(e+1)%(u.length>>1);let c=e,f=hi(n-u[e*2],2)+hi(r-u[e*2+1],2);const h=i[e];let p=h;do{let d=l[p];const m=hi(n-u[d*2],2)+hi(r-u[d*2+1],2);if(m<f&&(f=m,c=d),p=p%3===2?p-2:p+1,l[p]!==e)break;if(p=s[p],p===-1){if(p=o[(a[e]+1)%o.length],p!==d&&hi(n-u[p*2],2)+hi(r-u[p*2+1],2)<f)return p;break}}while(p!==h);return c}render(e){const n=e==null?e=new fr:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const l=i[a];if(l<a)continue;const u=o[a]*2,c=o[l]*2;e.moveTo(r[u],r[u+1]),e.lineTo(r[c],r[c+1])}return this.renderHull(e),n&&n.value()}renderPoints(e,n){n===void 0&&(!e||typeof e.moveTo!="function")&&(n=e,e=null),n=n==null?2:+n;const r=e==null?e=new fr:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],l=i[o+1];e.moveTo(s+n,l),e.arc(s,l,n,0,$6)}return r&&r.value()}renderHull(e){const n=e==null?e=new fr:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;e.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const l=2*r[s];e.lineTo(i[l],i[l+1])}return e.closePath(),n&&n.value()}hullPolygon(){const e=new Df;return this.renderHull(e),e.value()}renderTriangle(e,n){const r=n==null?n=new fr:void 0,{points:i,triangles:o}=this,a=o[e*=3]*2,s=o[e+1]*2,l=o[e+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[l],i[l+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:e}=this;for(let n=0,r=e.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(e){const n=new Df;return this.renderTriangle(e,n),n.value()}}function A6(t,e,n,r){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=t[a];o[a*2]=e.call(r,s,a,t),o[a*2+1]=n.call(r,s,a,t)}return o}function*P6(t,e,n,r){let i=0;for(const o of t)yield e.call(r,o,i,t),yield n.call(r,o,i,t),++i}var Dy={},Mf={},Lf=34,Mo=10,kf=13;function Cy(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function D6(t,e){var n=Cy(t);return function(r,i){return e(n(r),i,t)}}function My(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function le(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function C6(t){return t<0?"-"+le(-t,6):t>9999?"+"+le(t,6):le(t,4)}function M6(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":C6(t.getUTCFullYear())+"-"+le(t.getUTCMonth()+1,2)+"-"+le(t.getUTCDate(),2)+(i?"T"+le(e,2)+":"+le(n,2)+":"+le(r,2)+"."+le(i,3)+"Z":r?"T"+le(e,2)+":"+le(n,2)+":"+le(r,2)+"Z":n||e?"T"+le(e,2)+":"+le(n,2)+"Z":"")}function Os(t){var e=new RegExp('["'+t+`
|
45
|
-
\r]`),n=
|
46
|
-
`)}function s(f
|
47
|
-
`)}function l(
|
48
|
-
`)}function u(f){return f.map(c).join(t)}function c(f){return f==null?"":f instanceof Date?M6(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:u,formatValue:c}}var hr=Os(","),Ly=hr.parse,L6=hr.parseRows,k6=hr.format,R6=hr.formatBody,E6=hr.formatRows,I6=hr.formatRow,B6=hr.formatValue,pr=Os(" "),ky=pr.parse,N6=pr.parseRows,F6=pr.format,z6=pr.formatBody,O6=pr.formatRows,G6=pr.formatRow,W6=pr.formatValue;function Y6(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))X6&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const X6=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function V6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function U6(t,e){return fetch(t,e).then(V6)}function H6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function j6(t,e){return fetch(t,e).then(H6)}function q6(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Gs(t,e){return fetch(t,e).then(q6)}function Ry(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),Gs(e,n).then(function(i){return t(i,r)})}}function Z6(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Os(t);return Gs(e,n).then(function(o){return i.parse(o,r)})}var K6=Ry(Ly),Q6=Ry(ky);function J6(t,e){return new Promise(function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function t8(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function e8(t,e){return fetch(t,e).then(t8)}function Rf(t){return(e,n)=>Gs(e,n).then(r=>new DOMParser().parseFromString(r,t))}const n8=Rf("application/xml");var r8=Rf("text/html"),i8=Rf("image/svg+xml");function Ef(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,a=n.length,s,l=0,u=0;for(o=0;o<a;++o)s=n[o],l+=s.x,u+=s.y;for(l=(l/a-t)*r,u=(u/a-e)*r,o=0;o<a;++o)s=n[o],s.x-=l,s.y-=u}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function o8(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Ey(this.cover(e,n),e,n,t)}function Ey(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,a={data:r},s=t._x0,l=t._y0,u=t._x1,c=t._y1,f,h,p,d,m,g,y,b;if(!o)return t._root=a,t;for(;o.length;)if((m=e>=(f=(s+u)/2))?s=f:u=f,(g=n>=(h=(l+c)/2))?l=h:c=h,i=o,!(o=o[y=g<<1|m]))return i[y]=a,t;if(p=+t._x.call(null,o.data),d=+t._y.call(null,o.data),e===p&&n===d)return a.next=o,i?i[y]=a:t._root=a,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(m=e>=(f=(s+u)/2))?s=f:u=f,(g=n>=(h=(l+c)/2))?l=h:c=h;while((y=g<<1|m)===(b=(d>=h)<<1|p>=f));return i[b]=o,i[y]=a,t}function a8(t){var e,n,r=t.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=i,s[n]=o,i<l&&(l=i),i>c&&(c=i),o<u&&(u=o),o>f&&(f=o));if(l>c||u>f)return this;for(this.cover(l,u).cover(c,f),n=0;n<r;++n)Ey(this,a[n],s[n],t[n]);return this}function s8(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a=i-n||1,s=this._root,l,u;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function l8(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function u8(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qt(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function c8(t,e,n){var r,i=this._x0,o=this._y0,a,s,l,u,c=this._x1,f=this._y1,h=[],p=this._root,d,m;for(p&&h.push(new qt(p,i,o,c,f)),n==null?n=1/0:(i=t-n,o=e-n,c=t+n,f=e+n,n*=n);d=h.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>f||(l=d.x1)<i||(u=d.y1)<o))if(p.length){var g=(a+l)/2,y=(s+u)/2;h.push(new qt(p[3],g,y,l,u),new qt(p[2],a,y,g,u),new qt(p[1],g,s,l,y),new qt(p[0],a,s,g,y)),(m=(e>=y)<<1|t>=g)&&(d=h[h.length-1],h[h.length-1]=h[h.length-1-m],h[h.length-1-m]=d)}else{var b=t-+this._x.call(null,p.data),v=e-+this._y.call(null,p.data),x=b*b+v*v;if(x<n){var _=Math.sqrt(n=x);i=t-_,o=e-_,c=t+_,f=e+_,r=p.data}}return r}function f8(t){if(isNaN(c=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,c,f,h,p,d,m,g,y;if(!n)return this;if(n.length)for(;;){if((d=c>=(h=(a+l)/2))?a=h:l=h,(m=f>=(p=(s+u)/2))?s=p:u=p,e=n,!(n=n[g=m<<1|d]))return this;if(!n.length)break;(e[g+1&3]||e[g+2&3]||e[g+3&3])&&(r=e,y=g)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[g]=o:delete e[g],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=o,this)}function h8(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function p8(){return this._root}function d8(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function g8(t){var e=[],n,r=this._root,i,o,a,s,l;for(r&&e.push(new qt(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,c=(a+l)/2;(i=r[3])&&e.push(new qt(i,u,c,s,l)),(i=r[2])&&e.push(new qt(i,o,c,u,l)),(i=r[1])&&e.push(new qt(i,u,a,s,c)),(i=r[0])&&e.push(new qt(i,o,a,u,c))}return this}function m8(t){var e=[],n=[],r;for(this._root&&e.push(new qt(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,f=(s+u)/2;(o=i[0])&&e.push(new qt(o,a,s,c,f)),(o=i[1])&&e.push(new qt(o,c,s,l,f)),(o=i[2])&&e.push(new qt(o,a,f,c,u)),(o=i[3])&&e.push(new qt(o,c,f,l,u))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function y8(t){return t[0]}function b8(t){return arguments.length?(this._x=t,this):this._x}function x8(t){return t[1]}function v8(t){return arguments.length?(this._y=t,this):this._y}function Ws(t,e,n){var r=new If(e??y8,n??x8,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function If(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Iy(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Zt=Ws.prototype=If.prototype;Zt.copy=function(){var t=new If(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Iy(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=Iy(r));return t},Zt.add=o8,Zt.addAll=a8,Zt.cover=s8,Zt.data=l8,Zt.extent=u8,Zt.find=c8,Zt.remove=f8,Zt.removeAll=h8,Zt.root=p8,Zt.size=d8,Zt.visit=g8,Zt.visitAfter=m8,Zt.x=b8,Zt.y=v8;function Rt(t){return function(){return t}}function Cn(t){return(t()-.5)*1e-6}function $8(t){return t.x+t.vx}function _8(t){return t.y+t.vy}function Ys(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=Rt(t==null?1:+t));function a(){for(var u,c=e.length,f,h,p,d,m,g,y=0;y<o;++y)for(f=Ws(e,$8,_8).visitAfter(s),u=0;u<c;++u)h=e[u],m=n[h.index],g=m*m,p=h.x+h.vx,d=h.y+h.vy,f.visit(b);function b(v,x,_,A,S){var P=v.data,C=v.r,B=m+C;if(P){if(P.index>h.index){var $=p-P.x-P.vx,k=d-P.y-P.vy,M=$*$+k*k;M<B*B&&($===0&&($=Cn(r),M+=$*$),k===0&&(k=Cn(r),M+=k*k),M=(B-(M=Math.sqrt(M)))/M*i,h.vx+=($*=M)*(B=(C*=C)/(g+C)),h.vy+=(k*=M)*B,P.vx-=$*(B=1-B),P.vy-=k*B)}return}return x>p+B||A<p-B||_>d+B||S<d-B}}function s(u){if(u.data)return u.r=n[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function l(){if(e){var u,c=e.length,f;for(n=new Array(c),u=0;u<c;++u)f=e[u],n[f.index]=+t(f,u,e)}}return a.initialize=function(u,c){e=u,r=c,l()},a.iterations=function(u){return arguments.length?(o=+u,a):o},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Rt(+u),l(),a):t},a}function S8(t){return t.index}function By(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Bf(t){var e=S8,n=f,r,i=Rt(30),o,a,s,l,u,c=1;t==null&&(t=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var y=0,b=t.length;y<c;++y)for(var v=0,x,_,A,S,P,C,B;v<b;++v)x=t[v],_=x.source,A=x.target,S=A.x+A.vx-_.x-_.vx||Cn(u),P=A.y+A.vy-_.y-_.vy||Cn(u),C=Math.sqrt(S*S+P*P),C=(C-o[v])/C*g*r[v],S*=C,P*=C,A.vx-=S*(B=l[v]),A.vy-=P*B,_.vx+=S*(B=1-B),_.vy+=P*B}function p(){if(a){var g,y=a.length,b=t.length,v=new Map(a.map((_,A)=>[e(_,A,a),_])),x;for(g=0,s=new Array(y);g<b;++g)x=t[g],x.index=g,typeof x.source!="object"&&(x.source=By(v,x.source)),typeof x.target!="object"&&(x.target=By(v,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(g=0,l=new Array(b);g<b;++g)x=t[g],l[g]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(b),d(),o=new Array(b),m()}}function d(){if(a)for(var g=0,y=t.length;g<y;++g)r[g]=+n(t[g],g,t)}function m(){if(a)for(var g=0,y=t.length;g<y;++g)o[g]=+i(t[g],g,t)}return h.initialize=function(g,y){a=g,u=y,p()},h.links=function(g){return arguments.length?(t=g,p(),h):t},h.id=function(g){return arguments.length?(e=g,h):e},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Rt(+g),d(),h):n},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Rt(+g),m(),h):i},h}const w8=1664525,T8=1013904223,Ny=4294967296;function A8(){let t=1;return()=>(t=(w8*t+T8)%Ny)/Ny}function P8(t){return t.x}function D8(t){return t.y}var C8=10,M8=Math.PI*(3-Math.sqrt(5));function Xs(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,l=Cs(f),u=Qn("tick","end"),c=A8();t==null&&(t=[]);function f(){h(),u.call("tick",e),n<r&&(l.stop(),u.call("end",e))}function h(m){var g,y=t.length,b;m===void 0&&(m=1);for(var v=0;v<m;++v)for(n+=(o-n)*i,s.forEach(function(x){x(n)}),g=0;g<y;++g)b=t[g],b.fx==null?b.x+=b.vx*=a:(b.x=b.fx,b.vx=0),b.fy==null?b.y+=b.vy*=a:(b.y=b.fy,b.vy=0);return e}function p(){for(var m=0,g=t.length,y;m<g;++m){if(y=t[m],y.index=m,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var b=C8*Math.sqrt(.5+m),v=m*M8;y.x=b*Math.cos(v),y.y=b*Math.sin(v)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function d(m){return m.initialize&&m.initialize(t,c),m}return p(),e={tick:h,restart:function(){return l.restart(f),e},stop:function(){return l.stop(),e},nodes:function(m){return arguments.length?(t=m,p(),s.forEach(d),e):t},alpha:function(m){return arguments.length?(n=+m,e):n},alphaMin:function(m){return arguments.length?(r=+m,e):r},alphaDecay:function(m){return arguments.length?(i=+m,e):+i},alphaTarget:function(m){return arguments.length?(o=+m,e):o},velocityDecay:function(m){return arguments.length?(a=1-m,e):1-a},randomSource:function(m){return arguments.length?(c=m,s.forEach(d),e):c},force:function(m,g){return arguments.length>1?(g==null?s.delete(m):s.set(m,d(g)),e):s.get(m)},find:function(m,g,y){var b=0,v=t.length,x,_,A,S,P;for(y==null?y=1/0:y*=y,b=0;b<v;++b)S=t[b],x=m-S.x,_=g-S.y,A=x*x+_*_,A<y&&(P=S,y=A);return P},on:function(m,g){return arguments.length>1?(u.on(m,g),e):u.on(m)}}}function Vs(){var t,e,n,r,i=Rt(-30),o,a=1,s=1/0,l=.81;function u(p){var d,m=t.length,g=Ws(t,P8,D8).visitAfter(f);for(r=p,d=0;d<m;++d)e=t[d],g.visit(h)}function c(){if(t){var p,d=t.length,m;for(o=new Array(d),p=0;p<d;++p)m=t[p],o[m.index]=+i(m,p,t)}}function f(p){var d=0,m,g,y=0,b,v,x;if(p.length){for(b=v=x=0;x<4;++x)(m=p[x])&&(g=Math.abs(m.value))&&(d+=m.value,y+=g,b+=g*m.x,v+=g*m.y);p.x=b/y,p.y=v/y}else{m=p,m.x=m.data.x,m.y=m.data.y;do d+=o[m.data.index];while(m=m.next)}p.value=d}function h(p,d,m,g){if(!p.value)return!0;var y=p.x-e.x,b=p.y-e.y,v=g-d,x=y*y+b*b;if(v*v/l<x)return x<s&&(y===0&&(y=Cn(n),x+=y*y),b===0&&(b=Cn(n),x+=b*b),x<a&&(x=Math.sqrt(a*x)),e.vx+=y*p.value*r/x,e.vy+=b*p.value*r/x),!0;if(p.length||x>=s)return;(p.data!==e||p.next)&&(y===0&&(y=Cn(n),x+=y*y),b===0&&(b=Cn(n),x+=b*b),x<a&&(x=Math.sqrt(a*x)));do p.data!==e&&(v=o[p.data.index]*r/x,e.vx+=y*v,e.vy+=b*v);while(p=p.next)}return u.initialize=function(p,d){t=p,n=d,c()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Rt(+p),c(),u):i},u.distanceMin=function(p){return arguments.length?(a=p*p,u):Math.sqrt(a)},u.distanceMax=function(p){return arguments.length?(s=p*p,u):Math.sqrt(s)},u.theta=function(p){return arguments.length?(l=p*p,u):Math.sqrt(l)},u}function L8(t,e,n){var r,i=Rt(.1),o,a;typeof t!="function"&&(t=Rt(+t)),e==null&&(e=0),n==null&&(n=0);function s(u){for(var c=0,f=r.length;c<f;++c){var h=r[c],p=h.x-e||1e-6,d=h.y-n||1e-6,m=Math.sqrt(p*p+d*d),g=(a[c]-m)*o[c]*u/m;h.vx+=p*g,h.vy+=d*g}}function l(){if(r){var u,c=r.length;for(o=new Array(c),a=new Array(c),u=0;u<c;++u)a[u]=+t(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,l()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Rt(+u),l(),s):i},s.radius=function(u){return arguments.length?(t=typeof u=="function"?u:Rt(+u),l(),s):t},s.x=function(u){return arguments.length?(e=+u,s):e},s.y=function(u){return arguments.length?(n=+u,s):n},s}function Fy(t){var e=Rt(.1),n,r,i;typeof t!="function"&&(t=Rt(t==null?0:+t));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(i[l]-c.x)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Rt(+s),a(),o):e},o.x=function(s){return arguments.length?(t=typeof s=="function"?s:Rt(+s),a(),o):t},o}function zy(t){var e=Rt(.1),n,r,i;typeof t!="function"&&(t=Rt(t==null?0:+t));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(i[l]-c.y)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Rt(+s),a(),o):e},o.y=function(s){return arguments.length?(t=typeof s=="function"?s:Rt(+s),a(),o):t},o}function k8(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Us(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function pi(t){return t=Us(Math.abs(t)),t?t[1]:NaN}function R8(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function E8(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var I8=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function di(t){if(!(e=I8.exec(t)))throw new Error("invalid format: "+t);var e;return new Hs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}di.prototype=Hs.prototype;function Hs(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Hs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function B8(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Oy;function N8(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Oy=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+Us(t,Math.max(0,e+o-1))[0]}function Gy(t,e){var n=Us(t,e);if(!n)return t+"";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")}const Wy={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:k8,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Gy(t*100,e),r:Gy,s:N8,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Yy(t){return t}var Xy=Array.prototype.map,Vy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Uy(t){var e=t.grouping===void 0||t.thousands===void 0?Yy:R8(Xy.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Yy:E8(Xy.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=di(f);var h=f.fill,p=f.align,d=f.sign,m=f.symbol,g=f.zero,y=f.width,b=f.comma,v=f.precision,x=f.trim,_=f.type;_==="n"?(b=!0,_="g"):Wy[_]||(v===void 0&&(v=12),x=!0,_="g"),(g||h==="0"&&p==="=")&&(g=!0,h="0",p="=");var A=m==="$"?n:m==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",S=m==="$"?r:/[%p]/.test(_)?a:"",P=Wy[_],C=/[defgprs%]/.test(_);v=v===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function B($){var k=A,M=S,T,w,D;if(_==="c")M=P($)+M,$="";else{$=+$;var F=$<0||1/$<0;if($=isNaN($)?l:P(Math.abs($),v),x&&($=B8($)),F&&+$==0&&d!=="+"&&(F=!1),k=(F?d==="("?d:s:d==="-"||d==="("?"":d)+k,M=(_==="s"?Vy[8+Oy/3]:"")+M+(F&&d==="("?")":""),C){for(T=-1,w=$.length;++T<w;)if(D=$.charCodeAt(T),48>D||D>57){M=(D===46?i+$.slice(T+1):$.slice(T))+M,$=$.slice(0,T);break}}}b&&!g&&($=e($,1/0));var z=k.length+$.length+M.length,I=z<y?new Array(y-z+1).join(h):"";switch(b&&g&&($=e(I+$,I.length?y-M.length:1/0),I=""),p){case"<":$=k+$+M+I;break;case"=":$=k+I+$+M;break;case"^":$=I.slice(0,z=I.length>>1)+k+$+M+I.slice(z);break;default:$=I+k+$+M;break}return o($)}return B.toString=function(){return f+""},B}function c(f,h){var p=u((f=di(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(pi(h)/3)))*3,m=Math.pow(10,-d),g=Vy[8+d/3];return function(y){return p(m*y)+g}}return{format:u,formatPrefix:c}}var js,Lo,Nf;Hy({thousands:",",grouping:[3],currency:["$",""]});function Hy(t){return js=Uy(t),Lo=js.format,Nf=js.formatPrefix,js}function jy(t){return Math.max(0,-pi(Math.abs(t)))}function qy(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pi(e)/3)))*3-pi(Math.abs(t)))}function Zy(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,pi(e)-pi(t))+1}var ot=1e-6,ko=1e-12,ht=Math.PI,Pt=ht/2,qs=ht/4,Kt=ht*2,vt=180/ht,at=ht/180,gt=Math.abs,gi=Math.atan,Qt=Math.atan2,rt=Math.cos,Zs=Math.ceil,Ky=Math.exp,Ff=Math.hypot,Ks=Math.log,zf=Math.pow,et=Math.sin,$e=Math.sign||function(t){return t>0?1:t<0?-1:0},Nt=Math.sqrt,Of=Math.tan;function Qy(t){return t>1?0:t<-1?ht:Math.acos(t)}function Jt(t){return t>1?Pt:t<-1?-Pt:Math.asin(t)}function Jy(t){return(t=et(t/2))*t}function Tt(){}function Qs(t,e){t&&e1.hasOwnProperty(t.type)&&e1[t.type](t,e)}var t1={Feature:function(t,e){Qs(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Qs(n[r].geometry,e)}},e1={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Gf(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Gf(n[r],e,0)},Polygon:function(t,e){n1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)n1(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Qs(n[r],e)}};function Gf(t,e,n){var r=-1,i=t.length-n,o;for(e.lineStart();++r<i;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function n1(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Gf(t[n],e,1);e.polygonEnd()}function Be(t,e){t&&t1.hasOwnProperty(t.type)?t1[t.type](t,e):Qs(t,e)}var Js=new kt,tl=new kt,r1,i1,Wf,Yf,Xf,He={point:Tt,lineStart:Tt,lineEnd:Tt,polygonStart:function(){Js=new kt,He.lineStart=F8,He.lineEnd=z8},polygonEnd:function(){var t=+Js;tl.add(t<0?Kt+t:t),this.lineStart=this.lineEnd=this.point=Tt},sphere:function(){tl.add(Kt)}};function F8(){He.point=O8}function z8(){o1(r1,i1)}function O8(t,e){He.point=o1,r1=t,i1=e,t*=at,e*=at,Wf=t,Yf=rt(e=e/2+qs),Xf=et(e)}function o1(t,e){t*=at,e*=at,e=e/2+qs;var n=t-Wf,r=n>=0?1:-1,i=r*n,o=rt(e),a=et(e),s=Xf*a,l=Yf*o+s*rt(i),u=s*r*et(i);Js.add(Qt(u,l)),Wf=t,Yf=o,Xf=a}function G8(t){return tl=new kt,Be(t,He),tl*2}function el(t){return[Qt(t[1],t[0]),Jt(t[2])]}function dr(t){var e=t[0],n=t[1],r=rt(n);return[r*rt(e),r*et(e),et(n)]}function nl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function mi(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Vf(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rl(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function il(t){var e=Nt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var At,ue,Dt,me,gr,a1,s1,yi,Ro,Mn,ln,un={point:Uf,lineStart:u1,lineEnd:c1,polygonStart:function(){un.point=f1,un.lineStart=W8,un.lineEnd=Y8,Ro=new kt,He.polygonStart()},polygonEnd:function(){He.polygonEnd(),un.point=Uf,un.lineStart=u1,un.lineEnd=c1,Js<0?(At=-(Dt=180),ue=-(me=90)):Ro>ot?me=90:Ro<-ot&&(ue=-90),ln[0]=At,ln[1]=Dt},sphere:function(){At=-(Dt=180),ue=-(me=90)}};function Uf(t,e){Mn.push(ln=[At=t,Dt=t]),e<ue&&(ue=e),e>me&&(me=e)}function l1(t,e){var n=dr([t*at,e*at]);if(yi){var r=mi(yi,n),i=[r[1],-r[0],0],o=mi(i,r);il(o),o=el(o);var a=t-gr,s=a>0?1:-1,l=o[0]*vt*s,u,c=gt(a)>180;c^(s*gr<l&&l<s*t)?(u=o[1]*vt,u>me&&(me=u)):(l=(l+360)%360-180,c^(s*gr<l&&l<s*t)?(u=-o[1]*vt,u<ue&&(ue=u)):(e<ue&&(ue=e),e>me&&(me=e))),c?t<gr?ye(At,t)>ye(At,Dt)&&(Dt=t):ye(t,Dt)>ye(At,Dt)&&(At=t):Dt>=At?(t<At&&(At=t),t>Dt&&(Dt=t)):t>gr?ye(At,t)>ye(At,Dt)&&(Dt=t):ye(t,Dt)>ye(At,Dt)&&(At=t)}else Mn.push(ln=[At=t,Dt=t]);e<ue&&(ue=e),e>me&&(me=e),yi=n,gr=t}function u1(){un.point=l1}function c1(){ln[0]=At,ln[1]=Dt,un.point=Uf,yi=null}function f1(t,e){if(yi){var n=t-gr;Ro.add(gt(n)>180?n+(n>0?360:-360):n)}else a1=t,s1=e;He.point(t,e),l1(t,e)}function W8(){He.lineStart()}function Y8(){f1(a1,s1),He.lineEnd(),gt(Ro)>ot&&(At=-(Dt=180)),ln[0]=At,ln[1]=Dt,yi=null}function ye(t,e){return(e-=t)<0?e+360:e}function X8(t,e){return t[0]-e[0]}function h1(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function V8(t){var e,n,r,i,o,a,s;if(me=Dt=-(At=ue=1/0),Mn=[],Be(t,un),n=Mn.length){for(Mn.sort(X8),e=1,r=Mn[0],o=[r];e<n;++e)i=Mn[e],h1(r,i[0])||h1(r,i[1])?(ye(r[0],i[1])>ye(r[0],r[1])&&(r[1]=i[1]),ye(i[0],r[1])>ye(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,e=0,r=o[n];e<=n;r=i,++e)i=o[e],(s=ye(r[1],i[0]))>a&&(a=s,At=i[0],Dt=r[1])}return Mn=ln=null,At===1/0||ue===1/0?[[NaN,NaN],[NaN,NaN]]:[[At,ue],[Dt,me]]}var Eo,ol,al,sl,ll,ul,cl,fl,Hf,jf,qf,p1,d1,te,ee,ne,Ne={sphere:Tt,point:Zf,lineStart:g1,lineEnd:m1,polygonStart:function(){Ne.lineStart=j8,Ne.lineEnd=q8},polygonEnd:function(){Ne.lineStart=g1,Ne.lineEnd=m1}};function Zf(t,e){t*=at,e*=at;var n=rt(e);Io(n*rt(t),n*et(t),et(e))}function Io(t,e,n){++Eo,al+=(t-al)/Eo,sl+=(e-sl)/Eo,ll+=(n-ll)/Eo}function g1(){Ne.point=U8}function U8(t,e){t*=at,e*=at;var n=rt(e);te=n*rt(t),ee=n*et(t),ne=et(e),Ne.point=H8,Io(te,ee,ne)}function H8(t,e){t*=at,e*=at;var n=rt(e),r=n*rt(t),i=n*et(t),o=et(e),a=Qt(Nt((a=ee*o-ne*i)*a+(a=ne*r-te*o)*a+(a=te*i-ee*r)*a),te*r+ee*i+ne*o);ol+=a,ul+=a*(te+(te=r)),cl+=a*(ee+(ee=i)),fl+=a*(ne+(ne=o)),Io(te,ee,ne)}function m1(){Ne.point=Zf}function j8(){Ne.point=Z8}function q8(){y1(p1,d1),Ne.point=Zf}function Z8(t,e){p1=t,d1=e,t*=at,e*=at,Ne.point=y1;var n=rt(e);te=n*rt(t),ee=n*et(t),ne=et(e),Io(te,ee,ne)}function y1(t,e){t*=at,e*=at;var n=rt(e),r=n*rt(t),i=n*et(t),o=et(e),a=ee*o-ne*i,s=ne*r-te*o,l=te*i-ee*r,u=Ff(a,s,l),c=Jt(u),f=u&&-c/u;Hf.add(f*a),jf.add(f*s),qf.add(f*l),ol+=c,ul+=c*(te+(te=r)),cl+=c*(ee+(ee=i)),fl+=c*(ne+(ne=o)),Io(te,ee,ne)}function K8(t){Eo=ol=al=sl=ll=ul=cl=fl=0,Hf=new kt,jf=new kt,qf=new kt,Be(t,Ne);var e=+Hf,n=+jf,r=+qf,i=Ff(e,n,r);return i<ko&&(e=ul,n=cl,r=fl,ol<ot&&(e=al,n=sl,r=ll),i=Ff(e,n,r),i<ko)?[NaN,NaN]:[Qt(n,e)*vt,Jt(r/i)*vt]}function bi(t){return function(){return t}}function Kf(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Qf(t,e){return gt(t)>ht&&(t-=Math.round(t/Kt)*Kt),[t,e]}Qf.invert=Qf;function Jf(t,e,n){return(t%=Kt)?e||n?Kf(x1(t),v1(e,n)):x1(t):e||n?v1(e,n):Qf}function b1(t){return function(e,n){return e+=t,gt(e)>ht&&(e-=Math.round(e/Kt)*Kt),[e,n]}}function x1(t){var e=b1(t);return e.invert=b1(-t),e}function v1(t,e){var n=rt(t),r=et(t),i=rt(e),o=et(e);function a(s,l){var u=rt(l),c=rt(s)*u,f=et(s)*u,h=et(l),p=h*n+c*r;return[Qt(f*i-p*o,c*n-h*r),Jt(p*i+f*o)]}return a.invert=function(s,l){var u=rt(l),c=rt(s)*u,f=et(s)*u,h=et(l),p=h*i-f*o;return[Qt(f*i+h*o,c*n+p*r),Jt(p*n-c*r)]},a}function $1(t){t=Jf(t[0]*at,t[1]*at,t.length>2?t[2]*at:0);function e(n){return n=t(n[0]*at,n[1]*at),n[0]*=vt,n[1]*=vt,n}return e.invert=function(n){return n=t.invert(n[0]*at,n[1]*at),n[0]*=vt,n[1]*=vt,n},e}function _1(t,e,n,r,i,o){if(n){var a=rt(e),s=et(e),l=r*n;i==null?(i=e+r*Kt,o=e-l/2):(i=S1(a,i),o=S1(a,o),(r>0?i<o:i>o)&&(i+=r*Kt));for(var u,c=i;r>0?c>o:c<o;c-=l)u=el([a,-s*rt(c),-s*et(c)]),t.point(u[0],u[1])}}function S1(t,e){e=dr(e),e[0]-=t,il(e);var n=Qy(-e[1]);return((-e[2]<0?-n:n)+Kt-ot)%Kt}function Q8(){var t=bi([0,0]),e=bi(90),n=bi(2),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=vt,l[1]*=vt}function s(){var l=t.apply(this,arguments),u=e.apply(this,arguments)*at,c=n.apply(this,arguments)*at;return r=[],i=Jf(-l[0]*at,-l[1]*at,0).invert,_1(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(t=typeof l=="function"?l:bi([+l[0],+l[1]]),s):t},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:bi(+l),s):e},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:bi(+l),s):n},s}function w1(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:Tt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function hl(t,e){return gt(t[0]-e[0])<ot&>(t[1]-e[1])<ot}function pl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function T1(t,e,n,r,i){var o=[],a=[],s,l;if(t.forEach(function(d){if(!((m=d.length-1)<=0)){var m,g=d[0],y=d[m],b;if(hl(g,y)){if(!g[2]&&!y[2]){for(i.lineStart(),s=0;s<m;++s)i.point((g=d[s])[0],g[1]);i.lineEnd();return}y[0]+=2*ot}o.push(b=new pl(g,d,null,!0)),a.push(b.o=new pl(g,null,b,!1)),o.push(b=new pl(y,d,null,!1)),a.push(b.o=new pl(y,null,b,!0))}}),!!o.length){for(a.sort(e),A1(o),A1(a),s=0,l=a.length;s<l;++s)a[s].e=n=!n;for(var u=o[0],c,f;;){for(var h=u,p=!0;h.v;)if((h=h.n)===u)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(s=0,l=c.length;s<l;++s)i.point((f=c[s])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(c=h.p.z,s=c.length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,c=h.z,p=!p}while(!h.v);i.lineEnd()}}}function A1(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function th(t){return gt(t[0])<=ht?t[0]:$e(t[0])*((gt(t[0])+ht)%Kt-ht)}function P1(t,e){var n=th(e),r=e[1],i=et(r),o=[et(n),-rt(n),0],a=0,s=0,l=new kt;i===1?r=Pt+ot:i===-1&&(r=-Pt-ot);for(var u=0,c=t.length;u<c;++u)if(h=(f=t[u]).length)for(var f,h,p=f[h-1],d=th(p),m=p[1]/2+qs,g=et(m),y=rt(m),b=0;b<h;++b,d=x,g=A,y=S,p=v){var v=f[b],x=th(v),_=v[1]/2+qs,A=et(_),S=rt(_),P=x-d,C=P>=0?1:-1,B=C*P,$=B>ht,k=g*A;if(l.add(Qt(k*C*et(B),y*S+k*rt(B))),a+=$?P+C*Kt:P,$^d>=n^x>=n){var M=mi(dr(p),dr(v));il(M);var T=mi(o,M);il(T);var w=($^P>=0?-1:1)*Jt(T[2]);(r>w||r===w&&(M[0]||M[1]))&&(s+=$^P>=0?1:-1)}}return(a<-ot||a<ot&&l<-ko)^s&1}function D1(t,e,n,r){return function(i){var o=e(i),a=w1(),s=e(a),l=!1,u,c,f,h={point:p,lineStart:m,lineEnd:g,polygonStart:function(){h.point=y,h.lineStart=b,h.lineEnd=v,c=[],u=[]},polygonEnd:function(){h.point=p,h.lineStart=m,h.lineEnd=g,c=Tc(c);var x=P1(u,r);c.length?(l||(i.polygonStart(),l=!0),T1(c,t4,x,n,i)):x&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(x,_){t(x,_)&&i.point(x,_)}function d(x,_){o.point(x,_)}function m(){h.point=d,o.lineStart()}function g(){h.point=p,o.lineEnd()}function y(x,_){f.push([x,_]),s.point(x,_)}function b(){s.lineStart(),f=[]}function v(){y(f[0][0],f[0][1]),s.lineEnd();var x=s.clean(),_=a.result(),A,S=_.length,P,C,B;if(f.pop(),u.push(f),f=null,!!S){if(x&1){if(C=_[0],(P=C.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),A=0;A<P;++A)i.point((B=C[A])[0],B[1]);i.lineEnd()}return}S>1&&x&2&&_.push(_.pop().concat(_.shift())),c.push(_.filter(J8))}}return h}}function J8(t){return t.length>1}function t4(t,e){return((t=t.x)[0]<0?t[1]-Pt-ot:Pt-t[1])-((e=e.x)[0]<0?e[1]-Pt-ot:Pt-e[1])}const eh=D1(function(){return!0},e4,r4,[-ht,-Pt]);function e4(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(o,a){var s=o>0?ht:-ht,l=gt(o-e);gt(l-ht)<ot?(t.point(e,n=(n+a)/2>0?Pt:-Pt),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),i=0):r!==s&&l>=ht&&(gt(e-r)<ot&&(e-=r*ot),gt(o-s)<ot&&(o-=s*ot),n=n4(e,n,o,a),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=o,n=a),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function n4(t,e,n,r){var i,o,a=et(t-n);return gt(a)>ot?gi((et(e)*(o=rt(r))*et(n)-et(r)*(i=rt(e))*et(t))/(i*o*a)):(e+r)/2}function r4(t,e,n,r){var i;if(t==null)i=n*Pt,r.point(-ht,i),r.point(0,i),r.point(ht,i),r.point(ht,0),r.point(ht,-i),r.point(0,-i),r.point(-ht,-i),r.point(-ht,0),r.point(-ht,i);else if(gt(t[0]-e[0])>ot){var o=t[0]<e[0]?ht:-ht;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function C1(t){var e=rt(t),n=2*at,r=e>0,i=gt(e)>ot;function o(c,f,h,p){_1(p,t,n,h,c,f)}function a(c,f){return rt(c)*rt(f)>e}function s(c){var f,h,p,d,m;return{lineStart:function(){d=p=!1,m=1},point:function(g,y){var b=[g,y],v,x=a(g,y),_=r?x?0:u(g,y):x?u(g+(g<0?ht:-ht),y):0;if(!f&&(d=p=x)&&c.lineStart(),x!==p&&(v=l(f,b),(!v||hl(f,v)||hl(b,v))&&(b[2]=1)),x!==p)m=0,x?(c.lineStart(),v=l(b,f),c.point(v[0],v[1])):(v=l(f,b),c.point(v[0],v[1],2),c.lineEnd()),f=v;else if(i&&f&&r^x){var A;!(_&h)&&(A=l(b,f,!0))&&(m=0,r?(c.lineStart(),c.point(A[0][0],A[0][1]),c.point(A[1][0],A[1][1]),c.lineEnd()):(c.point(A[1][0],A[1][1]),c.lineEnd(),c.lineStart(),c.point(A[0][0],A[0][1],3)))}x&&(!f||!hl(f,b))&&c.point(b[0],b[1]),f=b,p=x,h=_},lineEnd:function(){p&&c.lineEnd(),f=null},clean:function(){return m|(d&&p)<<1}}}function l(c,f,h){var p=dr(c),d=dr(f),m=[1,0,0],g=mi(p,d),y=nl(g,g),b=g[0],v=y-b*b;if(!v)return!h&&c;var x=e*y/v,_=-e*b/v,A=mi(m,g),S=rl(m,x),P=rl(g,_);Vf(S,P);var C=A,B=nl(S,C),$=nl(C,C),k=B*B-$*(nl(S,S)-1);if(!(k<0)){var M=Nt(k),T=rl(C,(-B-M)/$);if(Vf(T,S),T=el(T),!h)return T;var w=c[0],D=f[0],F=c[1],z=f[1],I;D<w&&(I=w,w=D,D=I);var N=D-w,E=gt(N-ht)<ot,O=E||N<ot;if(!E&&z<F&&(I=F,F=z,z=I),O?E?F+z>0^T[1]<(gt(T[0]-w)<ot?F:z):F<=T[1]&&T[1]<=z:N>ht^(w<=T[0]&&T[0]<=D)){var j=rl(C,(-B+M)/$);return Vf(j,S),[T,el(j)]}}}function u(c,f){var h=r?t:ht-t,p=0;return c<-h?p|=1:c>h&&(p|=2),f<-h?p|=4:f>h&&(p|=8),p}return D1(a,s,o,r?[0,-t]:[-ht,t-ht])}function i4(t,e,n,r,i,o){var a=t[0],s=t[1],l=e[0],u=e[1],c=0,f=1,h=l-a,p=u-s,d;if(d=n-a,!(!h&&d>0)){if(d/=h,h<0){if(d<c)return;d<f&&(f=d)}else if(h>0){if(d>f)return;d>c&&(c=d)}if(d=i-a,!(!h&&d<0)){if(d/=h,h<0){if(d>f)return;d>c&&(c=d)}else if(h>0){if(d<c)return;d<f&&(f=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<f&&(f=d)}else if(p>0){if(d>f)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>f)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<f&&(f=d)}return c>0&&(t[0]=a+c*h,t[1]=s+c*p),f<1&&(e[0]=a+f*h,e[1]=s+f*p),!0}}}}}var Bo=1e9,dl=-Bo;function gl(t,e,n,r){function i(u,c){return t<=u&&u<=n&&e<=c&&c<=r}function o(u,c,f,h){var p=0,d=0;if(u==null||(p=a(u,f))!==(d=a(c,f))||l(u,c)<0^f>0)do h.point(p===0||p===3?t:n,p>1?r:e);while((p=(p+f+4)%4)!==d);else h.point(c[0],c[1])}function a(u,c){return gt(u[0]-t)<ot?c>0?0:3:gt(u[0]-n)<ot?c>0?2:1:gt(u[1]-e)<ot?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var f=a(u,1),h=a(c,1);return f!==h?f-h:f===0?c[1]-u[1]:f===1?u[0]-c[0]:f===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,f=w1(),h,p,d,m,g,y,b,v,x,_,A,S={point:P,lineStart:k,lineEnd:M,polygonStart:B,polygonEnd:$};function P(w,D){i(w,D)&&c.point(w,D)}function C(){for(var w=0,D=0,F=p.length;D<F;++D)for(var z=p[D],I=1,N=z.length,E=z[0],O,j,it=E[0],Y=E[1];I<N;++I)O=it,j=Y,E=z[I],it=E[0],Y=E[1],j<=r?Y>r&&(it-O)*(r-j)>(Y-j)*(t-O)&&++w:Y<=r&&(it-O)*(r-j)<(Y-j)*(t-O)&&--w;return w}function B(){c=f,h=[],p=[],A=!0}function $(){var w=C(),D=A&&w,F=(h=Tc(h)).length;(D||F)&&(u.polygonStart(),D&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),F&&T1(h,s,w,o,u),u.polygonEnd()),c=u,h=p=d=null}function k(){S.point=T,p&&p.push(d=[]),_=!0,x=!1,b=v=NaN}function M(){h&&(T(m,g),y&&x&&f.rejoin(),h.push(f.result())),S.point=P,x&&c.lineEnd()}function T(w,D){var F=i(w,D);if(p&&d.push([w,D]),_)m=w,g=D,y=F,_=!1,F&&(c.lineStart(),c.point(w,D));else if(F&&x)c.point(w,D);else{var z=[b=Math.max(dl,Math.min(Bo,b)),v=Math.max(dl,Math.min(Bo,v))],I=[w=Math.max(dl,Math.min(Bo,w)),D=Math.max(dl,Math.min(Bo,D))];i4(z,I,t,e,n,r)?(x||(c.lineStart(),c.point(z[0],z[1])),c.point(I[0],I[1]),F||c.lineEnd(),A=!1):F&&(c.lineStart(),c.point(w,D),A=!1)}b=w,v=D,x=F}return S}}function o4(){var t=0,e=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=gl(t,e,n,r)(o=s)},extent:function(s){return arguments.length?(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[t,e],[n,r]]}}}var nh,rh,ml,yl,xi={sphere:Tt,point:Tt,lineStart:a4,lineEnd:Tt,polygonStart:Tt,polygonEnd:Tt};function a4(){xi.point=l4,xi.lineEnd=s4}function s4(){xi.point=xi.lineEnd=Tt}function l4(t,e){t*=at,e*=at,rh=t,ml=et(e),yl=rt(e),xi.point=u4}function u4(t,e){t*=at,e*=at;var n=et(e),r=rt(e),i=gt(t-rh),o=rt(i),a=et(i),s=r*a,l=yl*n-ml*r*o,u=ml*n+yl*r*o;nh.add(Qt(Nt(s*s+l*l),u)),rh=t,ml=n,yl=r}function M1(t){return nh=new kt,Be(t,xi),+nh}var ih=[null,null],c4={type:"LineString",coordinates:ih};function bl(t,e){return ih[0]=t,ih[1]=e,M1(c4)}var L1={Feature:function(t,e){return xl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(xl(n[r].geometry,e))return!0;return!1}},k1={Sphere:function(){return!0},Point:function(t,e){return R1(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(R1(n[r],e))return!0;return!1},LineString:function(t,e){return E1(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(E1(n[r],e))return!0;return!1},Polygon:function(t,e){return I1(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(I1(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(xl(n[r],e))return!0;return!1}};function xl(t,e){return t&&k1.hasOwnProperty(t.type)?k1[t.type](t,e):!1}function R1(t,e){return bl(t,e)===0}function E1(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(r=bl(t[o],e),r===0||o>0&&(i=bl(t[o],t[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<ko*i))return!0;n=r}return!1}function I1(t,e){return!!P1(t.map(f4),B1(e))}function f4(t){return t=t.map(B1),t.pop(),t}function B1(t){return[t[0]*at,t[1]*at]}function h4(t,e){return(t&&L1.hasOwnProperty(t.type)?L1[t.type]:xl)(t,e)}function N1(t,e,n){var r=wn(t,e-ot,n).concat(e);return function(i){return r.map(function(o){return[i,o]})}}function F1(t,e,n){var r=wn(t,e-ot,n).concat(e);return function(i){return r.map(function(o){return[o,i]})}}function z1(){var t,e,n,r,i,o,a,s,l=10,u=l,c=90,f=360,h,p,d,m,g=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return wn(Zs(r/c)*c,n,c).map(d).concat(wn(Zs(s/f)*f,a,f).map(m)).concat(wn(Zs(e/l)*l,t,l).filter(function(v){return gt(v%c)>ot}).map(h)).concat(wn(Zs(o/u)*u,i,u).filter(function(v){return gt(v%f)>ot}).map(p))}return y.lines=function(){return b().map(function(v){return{type:"LineString",coordinates:v}})},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(m(a).slice(1),d(n).reverse().slice(1),m(s).reverse().slice(1))]}},y.extent=function(v){return arguments.length?y.extentMajor(v).extentMinor(v):y.extentMinor()},y.extentMajor=function(v){return arguments.length?(r=+v[0][0],n=+v[1][0],s=+v[0][1],a=+v[1][1],r>n&&(v=r,r=n,n=v),s>a&&(v=s,s=a,a=v),y.precision(g)):[[r,s],[n,a]]},y.extentMinor=function(v){return arguments.length?(e=+v[0][0],t=+v[1][0],o=+v[0][1],i=+v[1][1],e>t&&(v=e,e=t,t=v),o>i&&(v=o,o=i,i=v),y.precision(g)):[[e,o],[t,i]]},y.step=function(v){return arguments.length?y.stepMajor(v).stepMinor(v):y.stepMinor()},y.stepMajor=function(v){return arguments.length?(c=+v[0],f=+v[1],y):[c,f]},y.stepMinor=function(v){return arguments.length?(l=+v[0],u=+v[1],y):[l,u]},y.precision=function(v){return arguments.length?(g=+v,h=N1(o,i,90),p=F1(e,t,g),d=N1(s,a,90),m=F1(r,n,g),y):g},y.extentMajor([[-180,-90+ot],[180,90-ot]]).extentMinor([[-180,-80-ot],[180,80+ot]])}function p4(){return z1()()}function d4(t,e){var n=t[0]*at,r=t[1]*at,i=e[0]*at,o=e[1]*at,a=rt(r),s=et(r),l=rt(o),u=et(o),c=a*rt(n),f=a*et(n),h=l*rt(i),p=l*et(i),d=2*Jt(Nt(Jy(o-r)+a*l*Jy(i-n))),m=et(d),g=d?function(y){var b=et(y*=d)/m,v=et(d-y)/m,x=v*c+b*h,_=v*f+b*p,A=v*s+b*u;return[Qt(_,x)*vt,Qt(A,Nt(x*x+_*_))*vt]}:function(){return[n*vt,r*vt]};return g.distance=d,g}const No=t=>t;var oh=new kt,ah=new kt,O1,G1,sh,lh,cn={point:Tt,lineStart:Tt,lineEnd:Tt,polygonStart:function(){cn.lineStart=g4,cn.lineEnd=y4},polygonEnd:function(){cn.lineStart=cn.lineEnd=cn.point=Tt,oh.add(gt(ah)),ah=new kt},result:function(){var t=oh/2;return oh=new kt,t}};function g4(){cn.point=m4}function m4(t,e){cn.point=W1,O1=sh=t,G1=lh=e}function W1(t,e){ah.add(lh*t-sh*e),sh=t,lh=e}function y4(){W1(O1,G1)}var vi=1/0,vl=vi,Fo=-vi,$l=Fo,_l={point:b4,lineStart:Tt,lineEnd:Tt,polygonStart:Tt,polygonEnd:Tt,result:function(){var t=[[vi,vl],[Fo,$l]];return Fo=$l=-(vl=vi=1/0),t}};function b4(t,e){t<vi&&(vi=t),t>Fo&&(Fo=t),e<vl&&(vl=e),e>$l&&($l=e)}var uh=0,ch=0,zo=0,Sl=0,wl=0,$i=0,fh=0,hh=0,Oo=0,Y1,X1,je,qe,_e={point:mr,lineStart:V1,lineEnd:U1,polygonStart:function(){_e.lineStart=$4,_e.lineEnd=_4},polygonEnd:function(){_e.point=mr,_e.lineStart=V1,_e.lineEnd=U1},result:function(){var t=Oo?[fh/Oo,hh/Oo]:$i?[Sl/$i,wl/$i]:zo?[uh/zo,ch/zo]:[NaN,NaN];return uh=ch=zo=Sl=wl=$i=fh=hh=Oo=0,t}};function mr(t,e){uh+=t,ch+=e,++zo}function V1(){_e.point=x4}function x4(t,e){_e.point=v4,mr(je=t,qe=e)}function v4(t,e){var n=t-je,r=e-qe,i=Nt(n*n+r*r);Sl+=i*(je+t)/2,wl+=i*(qe+e)/2,$i+=i,mr(je=t,qe=e)}function U1(){_e.point=mr}function $4(){_e.point=S4}function _4(){H1(Y1,X1)}function S4(t,e){_e.point=H1,mr(Y1=je=t,X1=qe=e)}function H1(t,e){var n=t-je,r=e-qe,i=Nt(n*n+r*r);Sl+=i*(je+t)/2,wl+=i*(qe+e)/2,$i+=i,i=qe*t-je*e,fh+=i*(je+t),hh+=i*(qe+e),Oo+=i*3,mr(je=t,qe=e)}function j1(t){this._context=t}j1.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Kt);break}}},result:Tt};var ph=new kt,dh,q1,Z1,Go,Wo,Yo={point:Tt,lineStart:function(){Yo.point=w4},lineEnd:function(){dh&&K1(q1,Z1),Yo.point=Tt},polygonStart:function(){dh=!0},polygonEnd:function(){dh=null},result:function(){var t=+ph;return ph=new kt,t}};function w4(t,e){Yo.point=K1,q1=Go=t,Z1=Wo=e}function K1(t,e){Go-=t,Wo-=e,ph.add(Nt(Go*Go+Wo*Wo)),Go=t,Wo=e}let Q1,Tl,J1,tb;class eb{constructor(e){this._append=e==null?nb:T4(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==J1||this._append!==Tl){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,J1=r,Tl=this._append,tb=this._,this._=i}this._+=tb;break}}}result(){const e=this._;return this._="",e.length?e:null}}function nb(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function T4(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return nb;if(e!==Q1){const n=10**e;Q1=e,Tl=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Tl}function A4(t,e){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Be(s,i(o))),o.result()}return a.area=function(s){return Be(s,i(cn)),cn.result()},a.measure=function(s){return Be(s,i(Yo)),Yo.result()},a.bounds=function(s){return Be(s,i(_l)),_l.result()},a.centroid=function(s){return Be(s,i(_e)),_e.result()},a.projection=function(s){return arguments.length?(i=s==null?(t=null,No):(t=s).stream,a):t},a.context=function(s){return arguments.length?(o=s==null?(e=null,new eb(n)):new j1(e=s),typeof r!="function"&&o.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const l=Math.floor(s);if(!(l>=0))throw new RangeError(`invalid digits: ${s}`);n=l}return e===null&&(o=new eb(n)),a},a.projection(t).digits(n).context(e)}function P4(t){return{stream:Xo(t)}}function Xo(t){return function(e){var n=new gh;for(var r in t)n[r]=t[r];return n.stream=e,n}}function gh(){}gh.prototype={constructor:gh,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function mh(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Be(n,t.stream(_l)),e(_l.result()),r!=null&&t.clipExtent(r),t}function Al(t,e,n){return mh(t,function(r){var i=e[1][0]-e[0][0],o=e[1][1]-e[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+e[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+e[0][1]+(o-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([s,l])},n)}function yh(t,e,n){return Al(t,[[0,0],e],n)}function bh(t,e,n){return mh(t,function(r){var i=+e,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];t.scale(150*o).translate([a,s])},n)}function xh(t,e,n){return mh(t,function(r){var i=+e,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},n)}var rb=16,D4=rt(30*at);function ib(t,e){return+e?M4(t,e):C4(t)}function C4(t){return Xo({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function M4(t,e){function n(r,i,o,a,s,l,u,c,f,h,p,d,m,g){var y=u-r,b=c-i,v=y*y+b*b;if(v>4*e&&m--){var x=a+h,_=s+p,A=l+d,S=Nt(x*x+_*_+A*A),P=Jt(A/=S),C=gt(gt(A)-1)<ot||gt(o-f)<ot?(o+f)/2:Qt(_,x),B=t(C,P),$=B[0],k=B[1],M=$-r,T=k-i,w=b*M-y*T;(w*w/v>e||gt((y*M+b*T)/v-.5)>.3||a*h+s*p+l*d<D4)&&(n(r,i,o,a,s,l,$,k,C,x/=S,_/=S,A,m,g),g.point($,k),n($,k,C,x,_,A,u,c,f,h,p,d,m,g))}}return function(r){var i,o,a,s,l,u,c,f,h,p,d,m,g={point:y,lineStart:b,lineEnd:x,polygonStart:function(){r.polygonStart(),g.lineStart=_},polygonEnd:function(){r.polygonEnd(),g.lineStart=b}};function y(P,C){P=t(P,C),r.point(P[0],P[1])}function b(){f=NaN,g.point=v,r.lineStart()}function v(P,C){var B=dr([P,C]),$=t(P,C);n(f,h,c,p,d,m,f=$[0],h=$[1],c=P,p=B[0],d=B[1],m=B[2],rb,r),r.point(f,h)}function x(){g.point=y,r.lineEnd()}function _(){b(),g.point=A,g.lineEnd=S}function A(P,C){v(i=P,C),o=f,a=h,s=p,l=d,u=m,g.point=v}function S(){n(f,h,c,p,d,m,o,a,i,s,l,u,rb,r),g.lineEnd=x,x()}return g}}var L4=Xo({point:function(t,e){this.stream.point(t*at,e*at)}});function k4(t){return Xo({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function R4(t,e,n,r,i){function o(a,s){return a*=r,s*=i,[e+t*a,n-t*s]}return o.invert=function(a,s){return[(a-e)/t*r,(n-s)/t*i]},o}function ob(t,e,n,r,i,o){if(!o)return R4(t,e,n,r,i);var a=rt(o),s=et(o),l=a*t,u=s*t,c=a/t,f=s/t,h=(s*n-a*e)/t,p=(s*e+a*n)/t;function d(m,g){return m*=r,g*=i,[l*m-u*g+e,n-u*m-l*g]}return d.invert=function(m,g){return[r*(c*m-f*g+h),i*(p-f*m-c*g)]},d}function Ze(t){return vh(function(){return t})()}function vh(t){var e,n=150,r=480,i=250,o=0,a=0,s=0,l=0,u=0,c,f=0,h=1,p=1,d=null,m=eh,g=null,y,b,v,x=No,_=.5,A,S,P,C,B;function $(w){return P(w[0]*at,w[1]*at)}function k(w){return w=P.invert(w[0],w[1]),w&&[w[0]*vt,w[1]*vt]}$.stream=function(w){return C&&B===w?C:C=L4(k4(c)(m(A(x(B=w)))))},$.preclip=function(w){return arguments.length?(m=w,d=void 0,T()):m},$.postclip=function(w){return arguments.length?(x=w,g=y=b=v=null,T()):x},$.clipAngle=function(w){return arguments.length?(m=+w?C1(d=w*at):(d=null,eh),T()):d*vt},$.clipExtent=function(w){return arguments.length?(x=w==null?(g=y=b=v=null,No):gl(g=+w[0][0],y=+w[0][1],b=+w[1][0],v=+w[1][1]),T()):g==null?null:[[g,y],[b,v]]},$.scale=function(w){return arguments.length?(n=+w,M()):n},$.translate=function(w){return arguments.length?(r=+w[0],i=+w[1],M()):[r,i]},$.center=function(w){return arguments.length?(o=w[0]%360*at,a=w[1]%360*at,M()):[o*vt,a*vt]},$.rotate=function(w){return arguments.length?(s=w[0]%360*at,l=w[1]%360*at,u=w.length>2?w[2]%360*at:0,M()):[s*vt,l*vt,u*vt]},$.angle=function(w){return arguments.length?(f=w%360*at,M()):f*vt},$.reflectX=function(w){return arguments.length?(h=w?-1:1,M()):h<0},$.reflectY=function(w){return arguments.length?(p=w?-1:1,M()):p<0},$.precision=function(w){return arguments.length?(A=ib(S,_=w*w),T()):Nt(_)},$.fitExtent=function(w,D){return Al($,w,D)},$.fitSize=function(w,D){return yh($,w,D)},$.fitWidth=function(w,D){return bh($,w,D)},$.fitHeight=function(w,D){return xh($,w,D)};function M(){var w=ob(n,0,0,h,p,f).apply(null,e(o,a)),D=ob(n,r-w[0],i-w[1],h,p,f);return c=Jf(s,l,u),S=Kf(e,D),P=Kf(c,S),A=ib(S,_),T()}function T(){return C=B=null,$}return function(){return e=t.apply(this,arguments),$.invert=e.invert&&k,M()}}function $h(t){var e=0,n=ht/3,r=vh(t),i=r(e,n);return i.parallels=function(o){return arguments.length?r(e=o[0]*at,n=o[1]*at):[e*vt,n*vt]},i}function E4(t){var e=rt(t);function n(r,i){return[r*e,et(i)/e]}return n.invert=function(r,i){return[r/e,Jt(i*e)]},n}function ab(t,e){var n=et(t),r=(n+et(e))/2;if(gt(r)<ot)return E4(t);var i=1+n*(2*r-n),o=Nt(i)/r;function a(s,l){var u=Nt(i-2*r*et(l))/r;return[u*et(s*=r),o-u*rt(s)]}return a.invert=function(s,l){var u=o-l,c=Qt(s,gt(u))*$e(u);return u*r<0&&(c-=ht*$e(s)*$e(u)),[c/r,Jt((i-(s*s+u*u)*r*r)/(2*r))]},a}function Pl(){return $h(ab).scale(155.424).center([0,33.6442])}function sb(){return Pl().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function I4(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function B4(){var t,e,n=sb(),r,i=Pl().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Pl().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,u={point:function(h,p){l=[h,p]}};function c(h){var p=h[0],d=h[1];return l=null,r.point(p,d),l||(o.point(p,d),l)||(s.point(p,d),l)}c.invert=function(h){var p=n.scale(),d=n.translate(),m=(h[0]-d[0])/p,g=(h[1]-d[1])/p;return(g>=.12&&g<.234&&m>=-.425&&m<-.214?i:g>=.166&&g<.234&&m>=-.214&&m<-.115?a:n).invert(h)},c.stream=function(h){return t&&e===h?t:t=I4([n.stream(e=h),i.stream(h),a.stream(h)])},c.precision=function(h){return arguments.length?(n.precision(h),i.precision(h),a.precision(h),f()):n.precision()},c.scale=function(h){return arguments.length?(n.scale(h),i.scale(h*.35),a.scale(h),c.translate(n.translate())):n.scale()},c.translate=function(h){if(!arguments.length)return n.translate();var p=n.scale(),d=+h[0],m=+h[1];return r=n.translate(h).clipExtent([[d-.455*p,m-.238*p],[d+.455*p,m+.238*p]]).stream(u),o=i.translate([d-.307*p,m+.201*p]).clipExtent([[d-.425*p+ot,m+.12*p+ot],[d-.214*p-ot,m+.234*p-ot]]).stream(u),s=a.translate([d-.205*p,m+.212*p]).clipExtent([[d-.214*p+ot,m+.166*p+ot],[d-.115*p-ot,m+.234*p-ot]]).stream(u),f()},c.fitExtent=function(h,p){return Al(c,h,p)},c.fitSize=function(h,p){return yh(c,h,p)},c.fitWidth=function(h,p){return bh(c,h,p)},c.fitHeight=function(h,p){return xh(c,h,p)};function f(){return t=e=null,c}return c.scale(1070)}function lb(t){return function(e,n){var r=rt(e),i=rt(n),o=t(r*i);return o===1/0?[2,0]:[o*i*et(e),o*et(n)]}}function Vo(t){return function(e,n){var r=Nt(e*e+n*n),i=t(r),o=et(i),a=rt(i);return[Qt(e*o,r*a),Jt(r&&n*o/r)]}}var _h=lb(function(t){return Nt(2/(1+t))});_h.invert=Vo(function(t){return 2*Jt(t/2)});function N4(){return Ze(_h).scale(124.75).clipAngle(180-.001)}var Sh=lb(function(t){return(t=Qy(t))&&t/et(t)});Sh.invert=Vo(function(t){return t});function F4(){return Ze(Sh).scale(79.4188).clipAngle(180-.001)}function Uo(t,e){return[t,Ks(Of((Pt+e)/2))]}Uo.invert=function(t,e){return[t,2*gi(Ky(e))-Pt]};function z4(){return ub(Uo).scale(961/Kt)}function ub(t){var e=Ze(t),n=e.center,r=e.scale,i=e.translate,o=e.clipExtent,a=null,s,l,u;e.scale=function(f){return arguments.length?(r(f),c()):r()},e.translate=function(f){return arguments.length?(i(f),c()):i()},e.center=function(f){return arguments.length?(n(f),c()):n()},e.clipExtent=function(f){return arguments.length?(f==null?a=s=l=u=null:(a=+f[0][0],s=+f[0][1],l=+f[1][0],u=+f[1][1]),c()):a==null?null:[[a,s],[l,u]]};function c(){var f=ht*r(),h=e($1(e.rotate()).invert([0,0]));return o(a==null?[[h[0]-f,h[1]-f],[h[0]+f,h[1]+f]]:t===Uo?[[Math.max(h[0]-f,a),s],[Math.min(h[0]+f,l),u]]:[[a,Math.max(h[1]-f,s)],[l,Math.min(h[1]+f,u)]])}return c()}function Dl(t){return Of((Pt+t)/2)}function cb(t,e){var n=rt(t),r=t===e?et(t):Ks(n/rt(e))/Ks(Dl(e)/Dl(t)),i=n*zf(Dl(t),r)/r;if(!r)return Uo;function o(a,s){i>0?s<-Pt+ot&&(s=-Pt+ot):s>Pt-ot&&(s=Pt-ot);var l=i/zf(Dl(s),r);return[l*et(r*a),i-l*rt(r*a)]}return o.invert=function(a,s){var l=i-s,u=$e(r)*Nt(a*a+l*l),c=Qt(a,gt(l))*$e(l);return l*r<0&&(c-=ht*$e(a)*$e(l)),[c/r,2*gi(zf(i/u,1/r))-Pt]},o}function O4(){return $h(cb).scale(109.5).parallels([30,30])}function Ho(t,e){return[t,e]}Ho.invert=Ho;function G4(){return Ze(Ho).scale(152.63)}function fb(t,e){var n=rt(t),r=t===e?et(t):(n-rt(e))/(e-t),i=n/r+t;if(gt(r)<ot)return Ho;function o(a,s){var l=i-s,u=r*a;return[l*et(u),i-l*rt(u)]}return o.invert=function(a,s){var l=i-s,u=Qt(a,gt(l))*$e(l);return l*r<0&&(u-=ht*$e(a)*$e(l)),[u/r,i-$e(r)*Nt(a*a+l*l)]},o}function W4(){return $h(fb).scale(131.154).center([0,13.9389])}var jo=1.340264,qo=-.081106,Zo=893e-6,Ko=.003796,Cl=Nt(3)/2,Y4=12;function wh(t,e){var n=Jt(Cl*et(e)),r=n*n,i=r*r*r;return[t*rt(n)/(Cl*(jo+3*qo*r+i*(7*Zo+9*Ko*r))),n*(jo+qo*r+i*(Zo+Ko*r))]}wh.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o=0,a,s,l;o<Y4&&(s=n*(jo+qo*r+i*(Zo+Ko*r))-e,l=jo+3*qo*r+i*(7*Zo+9*Ko*r),n-=a=s/l,r=n*n,i=r*r*r,!(gt(a)<ko));++o);return[Cl*t*(jo+3*qo*r+i*(7*Zo+9*Ko*r))/rt(n),Jt(et(n)/Cl)]};function X4(){return Ze(wh).scale(177.158)}function Th(t,e){var n=rt(e),r=rt(t)*n;return[n*et(t)/r,et(e)/r]}Th.invert=Vo(gi);function V4(){return Ze(Th).scale(144.049).clipAngle(60)}function U4(){var t=1,e=0,n=0,r=1,i=1,o=0,a,s,l=null,u,c,f,h=1,p=1,d=Xo({point:function(x,_){var A=v([x,_]);this.stream.point(A[0],A[1])}}),m=No,g,y;function b(){return h=t*r,p=t*i,g=y=null,v}function v(x){var _=x[0]*h,A=x[1]*p;if(o){var S=A*a-_*s;_=_*a+A*s,A=S}return[_+e,A+n]}return v.invert=function(x){var _=x[0]-e,A=x[1]-n;if(o){var S=A*a+_*s;_=_*a-A*s,A=S}return[_/h,A/p]},v.stream=function(x){return g&&y===x?g:g=d(m(y=x))},v.postclip=function(x){return arguments.length?(m=x,l=u=c=f=null,b()):m},v.clipExtent=function(x){return arguments.length?(m=x==null?(l=u=c=f=null,No):gl(l=+x[0][0],u=+x[0][1],c=+x[1][0],f=+x[1][1]),b()):l==null?null:[[l,u],[c,f]]},v.scale=function(x){return arguments.length?(t=+x,b()):t},v.translate=function(x){return arguments.length?(e=+x[0],n=+x[1],b()):[e,n]},v.angle=function(x){return arguments.length?(o=x%360*at,s=et(o),a=rt(o),b()):o*vt},v.reflectX=function(x){return arguments.length?(r=x?-1:1,b()):r<0},v.reflectY=function(x){return arguments.length?(i=x?-1:1,b()):i<0},v.fitExtent=function(x,_){return Al(v,x,_)},v.fitSize=function(x,_){return yh(v,x,_)},v.fitWidth=function(x,_){return bh(v,x,_)},v.fitHeight=function(x,_){return xh(v,x,_)},v}function Ah(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Ah.invert=function(t,e){var n=e,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(gt(i)>ot&&--r>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function H4(){return Ze(Ah).scale(175.295)}function Ph(t,e){return[rt(e)*et(t),et(e)]}Ph.invert=Vo(Jt);function j4(){return Ze(Ph).scale(249.5).clipAngle(90+ot)}function Dh(t,e){var n=rt(e),r=1+rt(t)*n;return[n*et(t)/r,et(e)/r]}Dh.invert=Vo(function(t){return 2*gi(t)});function q4(){return Ze(Dh).scale(250).clipAngle(142)}function Ch(t,e){return[Ks(Of((Pt+e)/2)),-t]}Ch.invert=function(t,e){return[-e,2*gi(Ky(t))-Pt]};function Z4(){var t=ub(Ch),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function K4(t,e){return t.parent===e.parent?1:2}function Q4(t){return t.reduce(J4,0)/t.length}function J4(t,e){return t+e.x}function t7(t){return 1+t.reduce(e7,0)}function e7(t,e){return Math.max(t,e.y)}function n7(t){for(var e;e=t.children;)t=e[0];return t}function r7(t){for(var e;e=t.children;)t=e[e.length-1];return t}function i7(){var t=K4,e=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(h){var p=h.children;p?(h.x=Q4(p),h.y=t7(p)):(h.x=a?s+=t(h,a):0,h.y=0,a=h)});var l=n7(o),u=r7(o),c=l.x-t(l,u)/2,f=u.x+t(u,l)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*e,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-c)/(f-c)*e,h.y=(1-(o.y?h.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(t=o,i):t},i.size=function(o){return arguments.length?(r=!1,e=+o[0],n=+o[1],i):r?null:[e,n]},i.nodeSize=function(o){return arguments.length?(r=!0,e=+o[0],n=+o[1],i):r?[e,n]:null},i}function o7(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function a7(){return this.eachAfter(o7)}function s7(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function l7(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function u7(t,e){for(var n=this,r=[n],i=[],o,a,s,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++l,this);return this}function c7(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function f7(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function h7(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function p7(t){for(var e=this,n=d7(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function d7(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function g7(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function m7(){return Array.from(this)}function y7(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function b7(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*x7(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Ml(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=_7)):e===void 0&&(e=$7);for(var n=new yr(t),r,i=[n],o,a,s,l;r=i.pop();)if((a=e(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,s=l-1;s>=0;--s)i.push(o=a[s]=new yr(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(hb)}function v7(){return Ml(this).eachBefore(S7)}function $7(t){return t.children}function _7(t){return Array.isArray(t)?t[1]:null}function S7(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function hb(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function yr(t){this.data=t,this.depth=this.height=0,this.parent=null}yr.prototype=Ml.prototype={constructor:yr,count:a7,each:s7,eachAfter:u7,eachBefore:l7,find:c7,sum:f7,sort:h7,path:p7,ancestors:g7,descendants:m7,leaves:y7,links:b7,copy:v7,[Symbol.iterator]:x7};function Ll(t){return t==null?null:pb(t)}function pb(t){if(typeof t!="function")throw new Error;return t}function br(){return 0}function _i(t){return function(){return t}}const w7=1664525,T7=1013904223,db=4294967296;function Mh(){let t=1;return()=>(t=(w7*t+T7)%db)/db}function A7(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function P7(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function D7(t){return gb(t,Mh())}function gb(t,e){for(var n=0,r=(t=P7(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&mb(a,o)?++n:(a=M7(i=C7(i,o)),n=0);return a}function C7(t,e){var n,r;if(Lh(e,t))return[e];for(n=0;n<t.length;++n)if(kl(e,t[n])&&Lh(Qo(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(kl(Qo(t[n],t[r]),e)&&kl(Qo(t[n],e),t[r])&&kl(Qo(t[r],e),t[n])&&Lh(yb(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function kl(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function mb(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Lh(t,e){for(var n=0;n<e.length;++n)if(!mb(t,e[n]))return!1;return!0}function M7(t){switch(t.length){case 1:return L7(t[0]);case 2:return Qo(t[0],t[1]);case 3:return yb(t[0],t[1],t[2])}}function L7(t){return{x:t.x,y:t.y,r:t.r}}function Qo(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,l=o-n,u=a-r,c=s-i,f=Math.sqrt(l*l+u*u);return{x:(n+o+l/f*c)/2,y:(r+a+u/f*c)/2,r:(f+i+s)/2}}function yb(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,l=e.r,u=n.x,c=n.y,f=n.r,h=r-a,p=r-u,d=i-s,m=i-c,g=l-o,y=f-o,b=r*r+i*i-o*o,v=b-a*a-s*s+l*l,x=b-u*u-c*c+f*f,_=p*d-h*m,A=(d*x-m*v)/(_*2)-r,S=(m*g-d*y)/_,P=(p*v-h*x)/(_*2)-i,C=(h*y-p*g)/_,B=S*S+C*C-1,$=2*(o+A*S+P*C),k=A*A+P*P-o*o,M=-(Math.abs(B)>1e-6?($+Math.sqrt($*$-4*B*k))/(2*B):k/$);return{x:r+A+S*M,y:i+P+C*M,r:M}}function bb(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,l,u=r*r+a*a;u?(o=e.r+n.r,o*=o,l=t.r+n.r,l*=l,o>l?(i=(u+l-o)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function xb(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function vb(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Rl(t){this._=t,this.next=null,this.previous=null}function $b(t,e){if(!(o=(t=A7(t)).length))return 0;var n,r,i,o,a,s,l,u,c,f,h;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;bb(r,n,i=t[2]),n=new Rl(n),r=new Rl(r),i=new Rl(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<o;++l){bb(n._,r._,i=t[l]),i=new Rl(i),u=r.next,c=n.previous,f=r._.r,h=n._.r;do if(f<=h){if(xb(u._,i._)){r=u,n.next=r,r.previous=n,--l;continue t}f+=u._.r,u=u.next}else{if(xb(c._,i._)){n=c,n.next=r,r.previous=n,--l;continue t}h+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=vb(n);(i=i.next)!==r;)(s=vb(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=gb(n,e),l=0;l<o;++l)n=t[l],n.x-=i.x,n.y-=i.y;return i.r}function k7(t){return $b(t,Mh()),t}function R7(t){return Math.sqrt(t.value)}function E7(){var t=null,e=1,n=1,r=br;function i(o){const a=Mh();return o.x=e/2,o.y=n/2,t?o.eachBefore(_b(t)).eachAfter(kh(r,.5,a)).eachBefore(Sb(1)):o.eachBefore(_b(R7)).eachAfter(kh(br,1,a)).eachAfter(kh(r,o.r/Math.min(e,n),a)).eachBefore(Sb(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Ll(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:_i(+o),i):r},i}function _b(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function kh(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,l;if(s)for(o=0;o<a;++o)i[o].r+=s;if(l=$b(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=l+s}}}function Sb(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function wb(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Jo(t,e,n,r,i){for(var o=t.children,a,s=-1,l=o.length,u=t.value&&(r-e)/t.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function I7(){var t=1,e=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=t,a.y1=e/s,a.eachBefore(o(e,s)),r&&a.eachBefore(wb),a}function o(a,s){return function(l){l.children&&Jo(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var u=l.x0,c=l.y0,f=l.x1-n,h=l.y1-n;f<u&&(u=f=(u+f)/2),h<c&&(c=h=(c+h)/2),l.x0=u,l.y0=c,l.x1=f,l.y1=h}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(t=+a[0],e=+a[1],i):[t,e]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var B7={depth:-1},Tb={},Rh={};function N7(t){return t.id}function F7(t){return t.parentId}function z7(){var t=N7,e=F7,n;function r(i){var o=Array.from(i),a=t,s=e,l,u,c,f,h,p,d,m,g=new Map;if(n!=null){const y=o.map((x,_)=>O7(n(x,_,i))),b=y.map(Ab),v=new Set(y).add("");for(const x of b)v.has(x)||(v.add(x),y.push(x),b.push(Ab(x)),o.push(Rh));a=(x,_)=>y[_],s=(x,_)=>b[_]}for(c=0,l=o.length;c<l;++c)u=o[c],p=o[c]=new yr(u),(d=a(u,c,i))!=null&&(d+="")&&(m=p.id=d,g.set(m,g.has(m)?Tb:p)),(d=s(u,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<l;++c)if(p=o[c],d=p.parent){if(h=g.get(d),!h)throw new Error("missing: "+d);if(h===Tb)throw new Error("ambiguous: "+d);h.children?h.children.push(p):h.children=[p],p.parent=h}else{if(f)throw new Error("multiple roots");f=p}if(!f)throw new Error("no root");if(n!=null){for(;f.data===Rh&&f.children.length===1;)f=f.children[0],--l;for(let y=o.length-1;y>=0&&(p=o[y],p.data===Rh);--y)p.data=null}if(f.parent=B7,f.eachBefore(function(y){y.depth=y.parent.depth+1,--l}).eachBefore(hb),f.parent=null,l>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=Ll(i),r):t},r.parentId=function(i){return arguments.length?(e=Ll(i),r):e},r.path=function(i){return arguments.length?(n=Ll(i),r):n},r}function O7(t){t=`${t}`;let e=t.length;return Eh(t,e-1)&&!Eh(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Ab(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Eh(t,e););return t.slice(0,e)}function Eh(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function G7(t,e){return t.parent===e.parent?1:2}function Ih(t){var e=t.children;return e?e[0]:t.t}function Bh(t){var e=t.children;return e?e[e.length-1]:t.t}function W7(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Y7(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function X7(t,e,n){return t.a.parent===e.parent?t.a:n}function El(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}El.prototype=Object.create(yr.prototype);function V7(t){for(var e=new El(t,0),n,r=[e],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new El(o[a],a)),i.parent=n;return(e.parent=new El(null,0)).children=[e],e}function U7(){var t=G7,e=1,n=1,r=null;function i(u){var c=V7(u);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)u.eachBefore(l);else{var f=u,h=u,p=u;u.eachBefore(function(b){b.x<f.x&&(f=b),b.x>h.x&&(h=b),b.depth>p.depth&&(p=b)});var d=f===h?1:t(f,h)/2,m=d-f.x,g=e/(h.x+d+m),y=n/(p.depth||1);u.eachBefore(function(b){b.x=(b.x+m)*g,b.y=b.depth*y})}return u}function o(u){var c=u.children,f=u.parent.children,h=u.i?f[u.i-1]:null;if(c){Y7(u);var p=(c[0].z+c[c.length-1].z)/2;h?(u.z=h.z+t(u._,h._),u.m=u.z-p):u.z=p}else h&&(u.z=h.z+t(u._,h._));u.parent.A=s(u,h,u.parent.A||f[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,f){if(c){for(var h=u,p=u,d=c,m=h.parent.children[0],g=h.m,y=p.m,b=d.m,v=m.m,x;d=Bh(d),h=Ih(h),d&&h;)m=Ih(m),p=Bh(p),p.a=u,x=d.z+b-h.z-g+t(d._,h._),x>0&&(W7(X7(d,u,f),u,x),g+=x,y+=x),b+=d.m,g+=h.m,v+=m.m,y+=p.m;d&&!Bh(p)&&(p.t=d,p.m+=b-y),h&&!Ih(m)&&(m.t=h,m.m+=g-v,f=u)}return f}function l(u){u.x*=e,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(t=u,i):t},i.size=function(u){return arguments.length?(r=!1,e=+u[0],n=+u[1],i):r?null:[e,n]},i.nodeSize=function(u){return arguments.length?(r=!0,e=+u[0],n=+u[1],i):r?[e,n]:null},i}function Il(t,e,n,r,i){for(var o=t.children,a,s=-1,l=o.length,u=t.value&&(i-n)/t.value;++s<l;)a=o[s],a.x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var Pb=(1+Math.sqrt(5))/2;function Db(t,e,n,r,i,o){for(var a=[],s=e.children,l,u,c=0,f=0,h=s.length,p,d,m=e.value,g,y,b,v,x,_,A;c<h;){p=i-n,d=o-r;do g=s[f++].value;while(!g&&f<h);for(y=b=g,_=Math.max(d/p,p/d)/(m*t),A=g*g*_,x=Math.max(b/A,A/y);f<h;++f){if(g+=u=s[f].value,u<y&&(y=u),u>b&&(b=u),A=g*g*_,v=Math.max(b/A,A/y),v>x){g-=u;break}x=v}a.push(l={value:g,dice:p<d,children:s.slice(c,f)}),l.dice?Jo(l,n,r,i,m?r+=d*g/m:o):Il(l,n,r,m?n+=p*g/m:i,o),m-=g,c=f}return a}const Nh=function t(e){function n(r,i,o,a,s){Db(e,r,i,o,a,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Pb);function Cb(){var t=Nh,e=!1,n=1,r=1,i=[0],o=br,a=br,s=br,l=br,u=br;function c(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(f),i=[0],e&&h.eachBefore(wb),h}function f(h){var p=i[h.depth],d=h.x0+p,m=h.y0+p,g=h.x1-p,y=h.y1-p;g<d&&(d=g=(d+g)/2),y<m&&(m=y=(m+y)/2),h.x0=d,h.y0=m,h.x1=g,h.y1=y,h.children&&(p=i[h.depth+1]=o(h)/2,d+=u(h)-p,m+=a(h)-p,g-=s(h)-p,y-=l(h)-p,g<d&&(d=g=(d+g)/2),y<m&&(m=y=(m+y)/2),t(h,d,m,g,y))}return c.round=function(h){return arguments.length?(e=!!h,c):e},c.size=function(h){return arguments.length?(n=+h[0],r=+h[1],c):[n,r]},c.tile=function(h){return arguments.length?(t=pb(h),c):t},c.padding=function(h){return arguments.length?c.paddingInner(h).paddingOuter(h):c.paddingInner()},c.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:_i(+h),c):o},c.paddingOuter=function(h){return arguments.length?c.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):c.paddingTop()},c.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:_i(+h),c):a},c.paddingRight=function(h){return arguments.length?(s=typeof h=="function"?h:_i(+h),c):s},c.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:_i(+h),c):l},c.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:_i(+h),c):u},c}function H7(t,e,n,r,i){var o=t.children,a,s=o.length,l,u=new Array(s+1);for(u[0]=l=a=0;a<s;++a)u[a+1]=l+=o[a].value;c(0,s,t.value,e,n,r,i);function c(f,h,p,d,m,g,y){if(f>=h-1){var b=o[f];b.x0=d,b.y0=m,b.x1=g,b.y1=y;return}for(var v=u[f],x=p/2+v,_=f+1,A=h-1;_<A;){var S=_+A>>>1;u[S]<x?_=S+1:A=S}x-u[_-1]<u[_]-x&&f+1<_&&--_;var P=u[_]-v,C=p-P;if(g-d>y-m){var B=p?(d*C+g*P)/p:g;c(f,_,P,d,m,B,y),c(_,h,C,B,m,g,y)}else{var $=p?(m*C+y*P)/p:y;c(f,_,P,d,m,g,$),c(_,h,C,d,$,g,y)}}}function j7(t,e,n,r,i){(t.depth&1?Il:Jo)(t,e,n,r,i)}const q7=function t(e){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===e)for(var l,u,c,f,h=-1,p,d=l.length,m=r.value;++h<d;){for(u=l[h],c=u.children,f=u.value=0,p=c.length;f<p;++f)u.value+=c[f].value;u.dice?Jo(u,i,o,a,m?o+=(s-o)*u.value/m:s):Il(u,i,o,m?i+=(a-i)*u.value/m:a,s),m-=u.value}else r._squarify=l=Db(e,r,i,o,a,s),l.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Pb);function Z7(t){for(var e=-1,n=t.length,r,i=t[n-1],o=0;++e<n;)r=i,i=t[e],o+=r[1]*i[0]-r[0]*i[1];return o/2}function K7(t){for(var e=-1,n=t.length,r=0,i=0,o,a=t[n-1],s,l=0;++e<n;)o=a,a=t[e],l+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[r/l,i/l]}function Q7(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function J7(t,e){return t[0]-e[0]||t[1]-e[1]}function Mb(t){const e=t.length,n=[0,1];let r=2,i;for(i=2;i<e;++i){for(;r>1&&Q7(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function tk(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(J7),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var o=Mb(r),a=Mb(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(e=o.length-1;e>=0;--e)u.push(t[r[o[e]][2]]);for(e=+s;e<a.length-l;++e)u.push(t[r[a[e]][2]]);return u}function ek(t,e){for(var n=t.length,r=t[n-1],i=e[0],o=e[1],a=r[0],s=r[1],l,u,c=!1,f=0;f<n;++f)r=t[f],l=r[0],u=r[1],u>o!=s>o&&i<(a-l)*(o-u)/(s-u)+l&&(c=!c),a=l,s=u;return c}function nk(t){for(var e=-1,n=t.length,r=t[n-1],i,o,a=r[0],s=r[1],l=0;++e<n;)i=a,o=s,r=t[e],a=r[0],s=r[1],i-=a,o-=s,l+=Math.hypot(i,o);return l}const Ot=Math.random,rk=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return e()*i+r}}return n.source=t,n}(Ot),ik=function t(e){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(e()*i+r)}}return n.source=t,n}(Ot),Fh=function t(e){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=t,n}(Ot),ok=function t(e){var n=Fh.source(e);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=t,r}(Ot),Lb=function t(e){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=e();return i+o*e()}}return n.source=t,n}(Ot),ak=function t(e){var n=Lb.source(e);function r(i){if((i=+i)==0)return e;var o=n(i);return function(){return o()/i}}return r.source=t,r}(Ot),sk=function t(e){function n(r){return function(){return-Math.log1p(-e())/r}}return n.source=t,n}(Ot),lk=function t(e){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-e(),r)}}return n.source=t,n}(Ot),uk=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+r)}}return n.source=t,n}(Ot),kb=function t(e){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-e())/r)})}return n.source=t,n}(Ot),zh=function t(e){var n=Fh.source(e)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-e())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),l=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var u=n(),c=1+s*u;while(c<=0);c*=c*c;var f=1-e()}while(f>=1-.0331*u*u*u*u&&Math.log(f)>=.5*u*u+a*(1-c+Math.log(c)));return a*c*l()*o}}return r.source=t,r}(Ot),Rb=function t(e){var n=zh.source(e);function r(i,o){var a=n(i),s=n(o);return function(){var l=a();return l===0?0:l/(l+s())}}return r.source=t,r}(Ot),Eb=function t(e){var n=kb.source(e),r=Rb.source(e);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,l=o,u=a;l*u>16&&l*(1-u)>16;){var c=Math.floor((l+1)*u),f=r(c,l-c+1)();f<=u?(s+=c,l-=c,u=(u-f)/(1-f)):(l=c-1,u/=f)}for(var h=u<.5,p=h?u:1-u,d=n(p),m=d(),g=0;m<=l;++g)m+=d();return s+(h?g:l-g)}}return i.source=t,i}(Ot),ck=function t(e){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-e()))}}return n.source=t,n}(Ot),fk=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*e())}}return n.source=t,n}(Ot),hk=function t(e){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=e();return r+i*Math.log(o/(1-o))}}return n.source=t,n}(Ot),pk=function t(e){var n=zh.source(e),r=Eb.source(e);function i(o){return function(){for(var a=0,s=o;s>16;){var l=Math.floor(.875*s),u=n(l)();if(u>s)return a+r(l-1,s/u)();a+=l,s-=u}for(var c=-Math.log1p(-e()),f=0;c<=s;++f)c-=Math.log1p(-e());return a+f}}return i.source=t,i}(Ot),dk=1664525,gk=1013904223,Ib=1/4294967296;function mk(t=Math.random()){let e=(0<=t&&t<1?t/Ib:Math.abs(t))|0;return()=>(e=dk*e+gk|0,Ib*(e>>>0))}function Se(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function fn(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Oh=Symbol("implicit");function Gh(){var t=new oo,e=[],n=[],r=Oh;function i(o){let a=t.get(o);if(a===void 0){if(r!==Oh)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new oo;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Gh(e,n).unknown(r)},Se.apply(i,arguments),i}function Wh(){var t=Gh().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,l=0,u=0,c=.5;delete t.unknown;function f(){var h=e().length,p=i<r,d=p?i:r,m=p?r:i;o=(m-d)/Math.max(1,h-l+u*2),s&&(o=Math.floor(o)),d+=(m-d-o*(h-l))*c,a=o*(1-l),s&&(d=Math.round(d),a=Math.round(a));var g=wn(h).map(function(y){return d+o*y});return n(p?g.reverse():g)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,f()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,f()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,f()):s},t.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},t.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},t.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},t.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},t.copy=function(){return Wh(e(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},Se.apply(f(),arguments)}function Bb(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Bb(e())},t}function Yh(){return Bb(Wh.apply(null,arguments).paddingInner(1))}function yk(t){return function(){return t}}function Bl(t){return+t}var Nb=[0,1];function re(t){return t}function Xh(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:yk(isNaN(e)?NaN:.5)}function bk(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function xk(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Xh(i,r),o=n(a,o)):(r=Xh(r,i),o=n(o,a)),function(s){return o(r(s))}}function vk(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Xh(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var l=jn(t,s,1,r)-1;return o[l](i[l](s))}}function ta(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Nl(){var t=Nb,e=Nb,n=nn,r,i,o,a=re,s,l,u;function c(){var h=Math.min(t.length,e.length);return a!==re&&(a=bk(t[0],t[h-1])),s=h>2?vk:xk,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=s(t.map(r),e,n)))(r(a(h)))}return f.invert=function(h){return a(i((u||(u=s(e,t.map(r),ve)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,Bl),c()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),c()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Ss,c()},f.clamp=function(h){return arguments.length?(a=h?!0:re,c()):a!==re},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function Vh(){return Nl()(re,re)}function Fb(t,e,n,r){var i=ts(t,e,n),o;switch(r=di(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=qy(i,a))&&(r.precision=o),Nf(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Zy(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=jy(i))&&(r.precision=o-(r.type==="%")*2);break}}return Lo(r)}function Ln(t){var e=t.domain;return t.ticks=function(n){var r=e();return Zn(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return Fb(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);c-- >0;){if(u=Kn(a,s,n),u===l)return r[i]=a,r[o]=s,e(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return t},t}function xr(){var t=Vh();return t.copy=function(){return ta(t,xr())},Se.apply(t,arguments),Ln(t)}function zb(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Bl),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return zb(t).unknown(e)},t=arguments.length?Array.from(t,Bl):[0,1],Ln(n)}function Ob(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Gb(t){return Math.log(t)}function Wb(t){return Math.exp(t)}function $k(t){return-Math.log(-t)}function _k(t){return-Math.exp(-t)}function Sk(t){return isFinite(t)?+("1e"+t):t<0?0:t}function wk(t){return t===10?Sk:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Tk(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Yb(t){return(e,n)=>-t(-e,n)}function Uh(t){const e=t(Gb,Wb),n=e.domain;let r=10,i,o;function a(){return i=Tk(r),o=wk(r),n()[0]<0?(i=Yb(i),o=Yb(o),t($k,_k)):t(Gb,Wb),e}return e.base=function(s){return arguments.length?(r=+s,a()):r},e.domain=function(s){return arguments.length?(n(s),a()):n()},e.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let h=i(u),p=i(c),d,m;const g=s==null?10:+s;let y=[];if(!(r%1)&&p-h<g){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(d=1;d<r;++d)if(m=h<0?d/o(-h):d*o(h),!(m<u)){if(m>c)break;y.push(m)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(m=h>0?d/o(-h):d*o(h),!(m<u)){if(m>c)break;y.push(m)}y.length*2<g&&(y=Zn(u,c,g))}else y=Zn(h,p,Math.min(p-h,g)).map(o);return f?y.reverse():y},e.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=di(l)).precision==null&&(l.trim=!0),l=Lo(l)),s===1/0)return l;const u=Math.max(1,r*s/e.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},e.nice=()=>n(Ob(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),e}function Xb(){const t=Uh(Nl()).domain([1,10]);return t.copy=()=>ta(t,Xb()).base(t.base()),Se.apply(t,arguments),t}function Vb(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Ub(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Hh(t){var e=1,n=t(Vb(e),Ub(e));return n.constant=function(r){return arguments.length?t(Vb(e=+r),Ub(e)):e},Ln(n)}function Hb(){var t=Hh(Nl());return t.copy=function(){return ta(t,Hb()).constant(t.constant())},Se.apply(t,arguments)}function jb(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ak(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Pk(t){return t<0?-t*t:t*t}function jh(t){var e=t(re,re),n=1;function r(){return n===1?t(re,re):n===.5?t(Ak,Pk):t(jb(n),jb(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},Ln(e)}function kn(){var t=jh(Nl());return t.copy=function(){return ta(t,kn()).exponent(t.exponent())},Se.apply(t,arguments),t}function Dk(){return kn.apply(null,arguments).exponent(.5)}function qb(t){return Math.sign(t)*t*t}function Ck(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function Zb(){var t=Vh(),e=[0,1],n=!1,r;function i(o){var a=Ck(t(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return t.invert(qb(o))},i.domain=function(o){return arguments.length?(t.domain(o),i):t.domain()},i.range=function(o){return arguments.length?(t.range((e=Array.from(o,Bl)).map(qb)),i):e.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(t.clamp(o),i):t.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Zb(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},Se.apply(i,arguments),Ln(i)}function Kb(){var t=[],e=[],n=[],r;function i(){var a=0,s=Math.max(1,e.length);for(n=new Array(s-1);++a<s;)n[a-1]=I0(t,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:e[jn(n,a)]}return o.invertExtent=function(a){var s=e.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:t[0],s<n.length?n[s]:t[t.length-1]]},o.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let s of a)s!=null&&!isNaN(s=+s)&&t.push(s);return t.sort(wt),i()},o.range=function(a){return arguments.length?(e=Array.from(a),i()):e.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Kb().domain(t).range(e).unknown(r)},Se.apply(o,arguments)}function Qb(){var t=0,e=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[jn(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*e-(l-n)*t)/(n+1);return a}return a.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,s()):[t,e]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[t,r[0]]:u>=n?[r[n-1],e]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Qb().domain([t,e]).range(i).unknown(o)},Se.apply(Ln(a),arguments)}function Jb(){var t=[.5],e=[0,1],n,r=1;function i(o){return o!=null&&o<=o?e[jn(t,o,0,r)]:n}return i.domain=function(o){return arguments.length?(t=Array.from(o),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=Array.from(o),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Jb().domain(t).range(e).unknown(n)},Se.apply(i,arguments)}const qh=new Date,Zh=new Date;function Mt(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(e(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let u;do l.push(u=new Date(+o)),e(o,s),t(o);while(u<o&&o<a);return l},i.filter=o=>Mt(a=>{if(a>=a)for(;t(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;e(a,-1),!o(a););else for(;--s>=0;)for(;e(a,1),!o(a););}),n&&(i.count=(o,a)=>(qh.setTime(+o),Zh.setTime(+a),t(qh),t(Zh),Math.floor(n(qh,Zh))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Si=Mt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Si.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Mt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Si);const tx=Si.range,hn=1e3,we=hn*60,pn=we*60,dn=pn*24,Kh=dn*7,ex=dn*30,Qh=dn*365,gn=Mt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*hn)},(t,e)=>(e-t)/hn,t=>t.getUTCSeconds()),nx=gn.range,Fl=Mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hn)},(t,e)=>{t.setTime(+t+e*we)},(t,e)=>(e-t)/we,t=>t.getMinutes()),Mk=Fl.range,zl=Mt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*we)},(t,e)=>(e-t)/we,t=>t.getUTCMinutes()),Lk=zl.range,Ol=Mt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hn-t.getMinutes()*we)},(t,e)=>{t.setTime(+t+e*pn)},(t,e)=>(e-t)/pn,t=>t.getHours()),kk=Ol.range,Gl=Mt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*pn)},(t,e)=>(e-t)/pn,t=>t.getUTCHours()),Rk=Gl.range,wi=Mt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*we)/dn,t=>t.getDate()-1),Ek=wi.range,ea=Mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dn,t=>t.getUTCDate()-1),Ik=ea.range,Jh=Mt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/dn,t=>Math.floor(t/dn)),Bk=Jh.range;function vr(t){return Mt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*we)/Kh)}const Ti=vr(0),na=vr(1),rx=vr(2),ix=vr(3),$r=vr(4),ox=vr(5),ax=vr(6),sx=Ti.range,Nk=na.range,Fk=rx.range,zk=ix.range,Ok=$r.range,Gk=ox.range,Wk=ax.range;function _r(t){return Mt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Kh)}const Ai=_r(0),ra=_r(1),lx=_r(2),ux=_r(3),Sr=_r(4),cx=_r(5),fx=_r(6),hx=Ai.range,Yk=ra.range,Xk=lx.range,Vk=ux.range,Uk=Sr.range,Hk=cx.range,jk=fx.range,Wl=Mt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),qk=Wl.range,Yl=Mt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),Zk=Yl.range,Ke=Mt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Ke.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Mt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const Kk=Ke.range,Qe=Mt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Qe.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Mt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const Qk=Qe.range;function px(t,e,n,r,i,o){const a=[[gn,1,hn],[gn,5,5*hn],[gn,15,15*hn],[gn,30,30*hn],[o,1,we],[o,5,5*we],[o,15,15*we],[o,30,30*we],[i,1,pn],[i,3,3*pn],[i,6,6*pn],[i,12,12*pn],[r,1,dn],[r,2,2*dn],[n,1,Kh],[e,1,ex],[e,3,3*ex],[t,1,Qh]];function s(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),d=p?p.range(u,+c+1):[];return h?d.reverse():d}function l(u,c,f){const h=Math.abs(c-u)/f,p=Za(([,,g])=>g).right(a,h);if(p===a.length)return t.every(ts(u/Qh,c/Qh,f));if(p===0)return Si.every(Math.max(ts(u,c,f),1));const[d,m]=a[h/a[p-1][2]<a[p][2]/h?p-1:p];return d.every(m)}return[s,l]}const[dx,gx]=px(Qe,Yl,Ai,Jh,Gl,zl),[mx,yx]=px(Ke,Wl,Ti,wi,Ol,Fl);function tp(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ep(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ia(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function bx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,u=oa(i),c=aa(i),f=oa(o),h=aa(o),p=oa(a),d=aa(a),m=oa(s),g=aa(s),y=oa(l),b=aa(l),v={a:F,A:z,b:I,B:N,c:null,d:wx,e:wx,f:$9,g:L9,G:R9,H:b9,I:x9,j:v9,L:Tx,m:_9,M:S9,p:E,q:O,Q:Lx,s:kx,S:w9,u:T9,U:A9,V:P9,w:D9,W:C9,x:null,X:null,y:M9,Y:k9,Z:E9,"%":Mx},x={a:j,A:it,b:Y,B:Q,c:null,d:Px,e:Px,f:F9,g:j9,G:Z9,H:I9,I:B9,j:N9,L:Dx,m:z9,M:O9,p:X,q:K,Q:Lx,s:kx,S:G9,u:W9,U:Y9,V:X9,w:V9,W:U9,x:null,X:null,y:H9,Y:q9,Z:K9,"%":Mx},_={a:B,A:$,b:k,B:M,c:T,d:_x,e:_x,f:d9,g:$x,G:vx,H:Sx,I:Sx,j:c9,L:p9,m:u9,M:f9,p:C,q:l9,Q:m9,s:y9,S:h9,u:r9,U:i9,V:o9,w:n9,W:a9,x:w,X:D,y:$x,Y:vx,Z:s9,"%":g9};v.x=A(n,v),v.X=A(r,v),v.c=A(e,v),x.x=A(n,x),x.X=A(r,x),x.c=A(e,x);function A(q,nt){return function(st){var U=[],mt=-1,ft=0,Et=q.length,ie,lt,Ct;for(st instanceof Date||(st=new Date(+st));++mt<Et;)q.charCodeAt(mt)===37&&(U.push(q.slice(ft,mt)),(lt=xx[ie=q.charAt(++mt)])!=null?ie=q.charAt(++mt):lt=ie==="e"?" ":"0",(Ct=nt[ie])&&(ie=Ct(st,lt)),U.push(ie),ft=mt+1);return U.push(q.slice(ft,mt)),U.join("")}}function S(q,nt){return function(st){var U=ia(1900,void 0,1),mt=P(U,q,st+="",0),ft,Et;if(mt!=st.length)return null;if("Q"in U)return new Date(U.Q);if("s"in U)return new Date(U.s*1e3+("L"in U?U.L:0));if(nt&&!("Z"in U)&&(U.Z=0),"p"in U&&(U.H=U.H%12+U.p*12),U.m===void 0&&(U.m="q"in U?U.q:0),"V"in U){if(U.V<1||U.V>53)return null;"w"in U||(U.w=1),"Z"in U?(ft=ep(ia(U.y,0,1)),Et=ft.getUTCDay(),ft=Et>4||Et===0?ra.ceil(ft):ra(ft),ft=ea.offset(ft,(U.V-1)*7),U.y=ft.getUTCFullYear(),U.m=ft.getUTCMonth(),U.d=ft.getUTCDate()+(U.w+6)%7):(ft=tp(ia(U.y,0,1)),Et=ft.getDay(),ft=Et>4||Et===0?na.ceil(ft):na(ft),ft=wi.offset(ft,(U.V-1)*7),U.y=ft.getFullYear(),U.m=ft.getMonth(),U.d=ft.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),Et="Z"in U?ep(ia(U.y,0,1)).getUTCDay():tp(ia(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(Et+5)%7:U.w+U.U*7-(Et+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,ep(U)):tp(U)}}function P(q,nt,st,U){for(var mt=0,ft=nt.length,Et=st.length,ie,lt;mt<ft;){if(U>=Et)return-1;if(ie=nt.charCodeAt(mt++),ie===37){if(ie=nt.charAt(mt++),lt=_[ie in xx?nt.charAt(mt++):ie],!lt||(U=lt(q,st,U))<0)return-1}else if(ie!=st.charCodeAt(U++))return-1}return U}function C(q,nt,st){var U=u.exec(nt.slice(st));return U?(q.p=c.get(U[0].toLowerCase()),st+U[0].length):-1}function B(q,nt,st){var U=p.exec(nt.slice(st));return U?(q.w=d.get(U[0].toLowerCase()),st+U[0].length):-1}function $(q,nt,st){var U=f.exec(nt.slice(st));return U?(q.w=h.get(U[0].toLowerCase()),st+U[0].length):-1}function k(q,nt,st){var U=y.exec(nt.slice(st));return U?(q.m=b.get(U[0].toLowerCase()),st+U[0].length):-1}function M(q,nt,st){var U=m.exec(nt.slice(st));return U?(q.m=g.get(U[0].toLowerCase()),st+U[0].length):-1}function T(q,nt,st){return P(q,e,nt,st)}function w(q,nt,st){return P(q,n,nt,st)}function D(q,nt,st){return P(q,r,nt,st)}function F(q){return a[q.getDay()]}function z(q){return o[q.getDay()]}function I(q){return l[q.getMonth()]}function N(q){return s[q.getMonth()]}function E(q){return i[+(q.getHours()>=12)]}function O(q){return 1+~~(q.getMonth()/3)}function j(q){return a[q.getUTCDay()]}function it(q){return o[q.getUTCDay()]}function Y(q){return l[q.getUTCMonth()]}function Q(q){return s[q.getUTCMonth()]}function X(q){return i[+(q.getUTCHours()>=12)]}function K(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var nt=A(q+="",v);return nt.toString=function(){return q},nt},parse:function(q){var nt=S(q+="",!1);return nt.toString=function(){return q},nt},utcFormat:function(q){var nt=A(q+="",x);return nt.toString=function(){return q},nt},utcParse:function(q){var nt=S(q+="",!0);return nt.toString=function(){return q},nt}}}var xx={"-":"",_:" ",0:"0"},Ft=/^\s*\d+/,Jk=/^%/,t9=/[\\^$*+?|[\]().{}]/g;function yt(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function e9(t){return t.replace(t9,"\\$&")}function oa(t){return new RegExp("^(?:"+t.map(e9).join("|")+")","i")}function aa(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function n9(t,e,n){var r=Ft.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function r9(t,e,n){var r=Ft.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function i9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function o9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function a9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function vx(t,e,n){var r=Ft.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function $x(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function s9(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function l9(t,e,n){var r=Ft.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function u9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function _x(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function c9(t,e,n){var r=Ft.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Sx(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function f9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function h9(t,e,n){var r=Ft.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function p9(t,e,n){var r=Ft.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function d9(t,e,n){var r=Ft.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function g9(t,e,n){var r=Jk.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function m9(t,e,n){var r=Ft.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function y9(t,e,n){var r=Ft.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function wx(t,e){return yt(t.getDate(),e,2)}function b9(t,e){return yt(t.getHours(),e,2)}function x9(t,e){return yt(t.getHours()%12||12,e,2)}function v9(t,e){return yt(1+wi.count(Ke(t),t),e,3)}function Tx(t,e){return yt(t.getMilliseconds(),e,3)}function $9(t,e){return Tx(t,e)+"000"}function _9(t,e){return yt(t.getMonth()+1,e,2)}function S9(t,e){return yt(t.getMinutes(),e,2)}function w9(t,e){return yt(t.getSeconds(),e,2)}function T9(t){var e=t.getDay();return e===0?7:e}function A9(t,e){return yt(Ti.count(Ke(t)-1,t),e,2)}function Ax(t){var e=t.getDay();return e>=4||e===0?$r(t):$r.ceil(t)}function P9(t,e){return t=Ax(t),yt($r.count(Ke(t),t)+(Ke(t).getDay()===4),e,2)}function D9(t){return t.getDay()}function C9(t,e){return yt(na.count(Ke(t)-1,t),e,2)}function M9(t,e){return yt(t.getFullYear()%100,e,2)}function L9(t,e){return t=Ax(t),yt(t.getFullYear()%100,e,2)}function k9(t,e){return yt(t.getFullYear()%1e4,e,4)}function R9(t,e){var n=t.getDay();return t=n>=4||n===0?$r(t):$r.ceil(t),yt(t.getFullYear()%1e4,e,4)}function E9(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+yt(e/60|0,"0",2)+yt(e%60,"0",2)}function Px(t,e){return yt(t.getUTCDate(),e,2)}function I9(t,e){return yt(t.getUTCHours(),e,2)}function B9(t,e){return yt(t.getUTCHours()%12||12,e,2)}function N9(t,e){return yt(1+ea.count(Qe(t),t),e,3)}function Dx(t,e){return yt(t.getUTCMilliseconds(),e,3)}function F9(t,e){return Dx(t,e)+"000"}function z9(t,e){return yt(t.getUTCMonth()+1,e,2)}function O9(t,e){return yt(t.getUTCMinutes(),e,2)}function G9(t,e){return yt(t.getUTCSeconds(),e,2)}function W9(t){var e=t.getUTCDay();return e===0?7:e}function Y9(t,e){return yt(Ai.count(Qe(t)-1,t),e,2)}function Cx(t){var e=t.getUTCDay();return e>=4||e===0?Sr(t):Sr.ceil(t)}function X9(t,e){return t=Cx(t),yt(Sr.count(Qe(t),t)+(Qe(t).getUTCDay()===4),e,2)}function V9(t){return t.getUTCDay()}function U9(t,e){return yt(ra.count(Qe(t)-1,t),e,2)}function H9(t,e){return yt(t.getUTCFullYear()%100,e,2)}function j9(t,e){return t=Cx(t),yt(t.getUTCFullYear()%100,e,2)}function q9(t,e){return yt(t.getUTCFullYear()%1e4,e,4)}function Z9(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Sr(t):Sr.ceil(t),yt(t.getUTCFullYear()%1e4,e,4)}function K9(){return"+0000"}function Mx(){return"%"}function Lx(t){return+t}function kx(t){return Math.floor(+t/1e3)}var Pi,np,Rx,Xl,rp;Ex({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"]});function Ex(t){return Pi=bx(t),np=Pi.format,Rx=Pi.parse,Xl=Pi.utcFormat,rp=Pi.utcParse,Pi}var Ix="%Y-%m-%dT%H:%M:%S.%LZ";function Q9(t){return t.toISOString()}var J9=Date.prototype.toISOString?Q9:Xl(Ix);const tR=J9;function eR(t){var e=new Date(t);return isNaN(e)?null:e}var nR=+new Date("2000-01-01T00:00:00.000Z")?eR:rp(Ix);const rR=nR;function iR(t){return new Date(t)}function oR(t){return t instanceof Date?+t:+new Date(+t)}function ip(t,e,n,r,i,o,a,s,l,u){var c=Vh(),f=c.invert,h=c.domain,p=u(".%L"),d=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),b=u("%b %d"),v=u("%B"),x=u("%Y");function _(A){return(l(A)<A?p:s(A)<A?d:a(A)<A?m:o(A)<A?g:r(A)<A?i(A)<A?y:b:n(A)<A?v:x)(A)}return c.invert=function(A){return new Date(f(A))},c.domain=function(A){return arguments.length?h(Array.from(A,oR)):h().map(iR)},c.ticks=function(A){var S=h();return t(S[0],S[S.length-1],A??10)},c.tickFormat=function(A,S){return S==null?_:u(S)},c.nice=function(A){var S=h();return(!A||typeof A.range!="function")&&(A=e(S[0],S[S.length-1],A??10)),A?h(Ob(S,A)):c},c.copy=function(){return ta(c,ip(t,e,n,r,i,o,a,s,l,u))},c}function aR(){return Se.apply(ip(mx,yx,Ke,Wl,Ti,wi,Ol,Fl,gn,np).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function sR(){return Se.apply(ip(dx,gx,Qe,Yl,Ai,ea,Gl,zl,gn,Xl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Vl(){var t=0,e=1,n,r,i,o,a=re,s=!1,l;function u(f){return f==null||isNaN(f=+f)?l:a(i===0?.5:(f=(o(f)-n)*i,s?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([t,e]=f,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),u):[t,e]},u.clamp=function(f){return arguments.length?(s=!!f,u):s},u.interpolator=function(f){return arguments.length?(a=f,u):a};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,a=f(p,d),u):[a(0),a(1)]}}return u.range=c(nn),u.rangeRound=c(Ss),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return o=f,n=f(t),r=f(e),i=n===r?0:1/(r-n),u}}function Rn(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Bx(){var t=Ln(Vl()(re));return t.copy=function(){return Rn(t,Bx())},fn.apply(t,arguments)}function Nx(){var t=Uh(Vl()).domain([1,10]);return t.copy=function(){return Rn(t,Nx()).base(t.base())},fn.apply(t,arguments)}function Fx(){var t=Hh(Vl());return t.copy=function(){return Rn(t,Fx()).constant(t.constant())},fn.apply(t,arguments)}function op(){var t=jh(Vl());return t.copy=function(){return Rn(t,op()).exponent(t.exponent())},fn.apply(t,arguments)}function lR(){return op.apply(null,arguments).exponent(.5)}function zx(){var t=[],e=re;function n(r){if(r!=null&&!isNaN(r=+r))return e((jn(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(wt),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>lo(t,o/r))},n.copy=function(){return zx(e).domain(t)},fn.apply(n,arguments)}function Ul(){var t=0,e=.5,n=1,r=1,i,o,a,s,l,u=re,c,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-o)*(r*m<r*o?s:l),u(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([t,e,n]=m,i=c(t=+t),o=c(e=+e),a=c(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[t,e,n]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(u=m,p):u};function d(m){return function(g){var y,b,v;return arguments.length?([y,b,v]=g,u=Ym(m,[y,b,v]),p):[u(0),u(.5),u(1)]}}return p.range=d(nn),p.rangeRound=d(Ss),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return c=m,i=m(t),o=m(e),a=m(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function Ox(){var t=Ln(Ul()(re));return t.copy=function(){return Rn(t,Ox())},fn.apply(t,arguments)}function Gx(){var t=Uh(Ul()).domain([.1,1,10]);return t.copy=function(){return Rn(t,Gx()).base(t.base())},fn.apply(t,arguments)}function Wx(){var t=Hh(Ul());return t.copy=function(){return Rn(t,Wx()).constant(t.constant())},fn.apply(t,arguments)}function ap(){var t=jh(Ul());return t.copy=function(){return Rn(t,ap()).exponent(t.exponent())},fn.apply(t,arguments)}function uR(){return ap.apply(null,arguments).exponent(.5)}function ct(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const cR=ct("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),fR=ct("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),hR=ct("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),pR=ct("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),dR=ct("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),gR=ct("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),mR=ct("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),yR=ct("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),bR=ct("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),xR=ct("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),vR=ct("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$t=t=>Dm(t[t.length-1]);var Yx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ct);const $R=$t(Yx);var Xx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ct);const _R=$t(Xx);var Vx=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ct);const SR=$t(Vx);var Ux=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ct);const wR=$t(Ux);var Hx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ct);const TR=$t(Hx);var jx=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ct);const AR=$t(jx);var qx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ct);const PR=$t(qx);var Zx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ct);const DR=$t(Zx);var Kx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ct);const CR=$t(Kx);var Qx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ct);const MR=$t(Qx);var Jx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ct);const LR=$t(Jx);var tv=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ct);const kR=$t(tv);var ev=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ct);const RR=$t(ev);var nv=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ct);const ER=$t(nv);var rv=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ct);const IR=$t(rv);var iv=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ct);const BR=$t(iv);var ov=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ct);const NR=$t(ov);var av=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ct);const FR=$t(av);var sv=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ct);const zR=$t(sv);var lv=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ct);const OR=$t(lv);var uv=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ct);const GR=$t(uv);var cv=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ct);const WR=$t(cv);var fv=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ct);const YR=$t(fv);var hv=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ct);const XR=$t(hv);var pv=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ct);const VR=$t(pv);var dv=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ct);const UR=$t(dv);var gv=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ct);const HR=$t(gv);function jR(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const qR=Ts(Ee(300,.5,0),Ee(-240,.5,1));var ZR=Ts(Ee(-100,.75,.35),Ee(80,1.5,.8)),KR=Ts(Ee(260,.75,.35),Ee(80,1.5,.8)),Hl=Ee();function QR(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Hl.h=360*t-100,Hl.s=1.5-1.5*e,Hl.l=.8-.9*e,Hl+""}var jl=ni(),JR=Math.PI/3,tE=Math.PI*2/3;function eE(t){var e;return t=(.5-t)*Math.PI,jl.r=255*(e=Math.sin(t))*e,jl.g=255*(e=Math.sin(t+JR))*e,jl.b=255*(e=Math.sin(t+tE))*e,jl+""}function nE(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function ql(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const rE=ql(ct("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var iE=ql(ct("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),oE=ql(ct("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),aE=ql(ct("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ut(t){return function(){return t}}const mv=Math.abs,Xt=Math.atan2,mn=Math.cos,sE=Math.max,Di=Math.min,ce=Math.sin,_t=Math.sqrt,Vt=1e-12,En=Math.PI,Zl=En/2,In=2*En;function lE(t){return t>1?0:t<-1?En:Math.acos(t)}function yv(t){return t>=1?Zl:t<=-1?-Zl:Math.asin(t)}function sa(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Po(e)}function uE(t){return t.innerRadius}function cE(t){return t.outerRadius}function fE(t){return t.startAngle}function hE(t){return t.endAngle}function pE(t){return t&&t.padAngle}function dE(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,c=a-i,f=s-o,h=f*l-c*u;if(!(h*h<Vt))return h=(c*(e-o)-f*(t-i))/h,[t+h*l,e+h*u]}function Kl(t,e,n,r,i,o,a){var s=t-n,l=e-r,u=(a?o:-o)/_t(s*s+l*l),c=u*l,f=-u*s,h=t+c,p=e+f,d=n+c,m=r+f,g=(h+d)/2,y=(p+m)/2,b=d-h,v=m-p,x=b*b+v*v,_=i-o,A=h*m-d*p,S=(v<0?-1:1)*_t(sE(0,_*_*x-A*A)),P=(A*v-b*S)/x,C=(-A*b-v*S)/x,B=(A*v+b*S)/x,$=(-A*b+v*S)/x,k=P-g,M=C-y,T=B-g,w=$-y;return k*k+M*M>T*T+w*w&&(P=B,C=$),{cx:P,cy:C,x01:-c,y01:-f,x11:P*(i/_-1),y11:C*(i/_-1)}}function Ql(){var t=uE,e=cE,n=ut(0),r=null,i=fE,o=hE,a=pE,s=null,l=sa(u);function u(){var c,f,h=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-Zl,m=o.apply(this,arguments)-Zl,g=mv(m-d),y=m>d;if(s||(s=c=l()),p<h&&(f=p,p=h,h=f),!(p>Vt))s.moveTo(0,0);else if(g>In-Vt)s.moveTo(p*mn(d),p*ce(d)),s.arc(0,0,p,d,m,!y),h>Vt&&(s.moveTo(h*mn(m),h*ce(m)),s.arc(0,0,h,m,d,y));else{var b=d,v=m,x=d,_=m,A=g,S=g,P=a.apply(this,arguments)/2,C=P>Vt&&(r?+r.apply(this,arguments):_t(h*h+p*p)),B=Di(mv(p-h)/2,+n.apply(this,arguments)),$=B,k=B,M,T;if(C>Vt){var w=yv(C/h*ce(P)),D=yv(C/p*ce(P));(A-=w*2)>Vt?(w*=y?1:-1,x+=w,_-=w):(A=0,x=_=(d+m)/2),(S-=D*2)>Vt?(D*=y?1:-1,b+=D,v-=D):(S=0,b=v=(d+m)/2)}var F=p*mn(b),z=p*ce(b),I=h*mn(_),N=h*ce(_);if(B>Vt){var E=p*mn(v),O=p*ce(v),j=h*mn(x),it=h*ce(x),Y;if(g<En)if(Y=dE(F,z,j,it,E,O,I,N)){var Q=F-Y[0],X=z-Y[1],K=E-Y[0],q=O-Y[1],nt=1/ce(lE((Q*K+X*q)/(_t(Q*Q+X*X)*_t(K*K+q*q)))/2),st=_t(Y[0]*Y[0]+Y[1]*Y[1]);$=Di(B,(h-st)/(nt-1)),k=Di(B,(p-st)/(nt+1))}else $=k=0}S>Vt?k>Vt?(M=Kl(j,it,F,z,p,k,y),T=Kl(E,O,I,N,p,k,y),s.moveTo(M.cx+M.x01,M.cy+M.y01),k<B?s.arc(M.cx,M.cy,k,Xt(M.y01,M.x01),Xt(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,k,Xt(M.y01,M.x01),Xt(M.y11,M.x11),!y),s.arc(0,0,p,Xt(M.cy+M.y11,M.cx+M.x11),Xt(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,k,Xt(T.y11,T.x11),Xt(T.y01,T.x01),!y))):(s.moveTo(F,z),s.arc(0,0,p,b,v,!y)):s.moveTo(F,z),!(h>Vt)||!(A>Vt)?s.lineTo(I,N):$>Vt?(M=Kl(I,N,E,O,h,-$,y),T=Kl(F,z,j,it,h,-$,y),s.lineTo(M.cx+M.x01,M.cy+M.y01),$<B?s.arc(M.cx,M.cy,$,Xt(M.y01,M.x01),Xt(T.y01,T.x01),!y):(s.arc(M.cx,M.cy,$,Xt(M.y01,M.x01),Xt(M.y11,M.x11),!y),s.arc(0,0,h,Xt(M.cy+M.y11,M.cx+M.x11),Xt(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,$,Xt(T.y11,T.x11),Xt(T.y01,T.x01),!y))):s.arc(0,0,h,_,x,y)}if(s.closePath(),c)return s=null,c+""||null}return u.centroid=function(){var c=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-En/2;return[mn(f)*c,ce(f)*c]},u.innerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ut(+c),u):t},u.outerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:ut(+c),u):e},u.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:ut(+c),u):n},u.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ut(+c),u):r},u.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:ut(+c),u):i},u.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ut(+c),u):o},u.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ut(+c),u):a},u.context=function(c){return arguments.length?(s=c??null,u):s},u}var gE=Array.prototype.slice;function Jl(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bv(t){this._context=t}bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function tu(t){return new bv(t)}function sp(t){return t[0]}function lp(t){return t[1]}function eu(t,e){var n=ut(!0),r=null,i=tu,o=null,a=sa(s);t=typeof t=="function"?t:t===void 0?sp:ut(t),e=typeof e=="function"?e:e===void 0?lp:ut(e);function s(l){var u,c=(l=Jl(l)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),u=0;u<=c;++u)!(u<c&&n(f=l[u],u,l))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(f,u,l),+e(f,u,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:ut(+l),s):t},s.y=function(l){return arguments.length?(e=typeof l=="function"?l:ut(+l),s):e},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ut(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function up(t,e,n){var r=null,i=ut(!0),o=null,a=tu,s=null,l=sa(u);t=typeof t=="function"?t:t===void 0?sp:ut(+t),e=typeof e=="function"?e:ut(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?lp:ut(+n);function u(f){var h,p,d,m=(f=Jl(f)).length,g,y=!1,b,v=new Array(m),x=new Array(m);for(o==null&&(s=a(b=l())),h=0;h<=m;++h){if(!(h<m&&i(g=f[h],h,f))===y)if(y=!y)p=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=h-1;d>=p;--d)s.point(v[d],x[d]);s.lineEnd(),s.areaEnd()}y&&(v[h]=+t(g,h,f),x[h]=+e(g,h,f),s.point(r?+r(g,h,f):v[h],n?+n(g,h,f):x[h]))}if(b)return s=null,b+""||null}function c(){return eu().defined(i).curve(a).context(o)}return u.x=function(f){return arguments.length?(t=typeof f=="function"?f:ut(+f),r=null,u):t},u.x0=function(f){return arguments.length?(t=typeof f=="function"?f:ut(+f),u):t},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ut(+f),u):r},u.y=function(f){return arguments.length?(e=typeof f=="function"?f:ut(+f),n=null,u):e},u.y0=function(f){return arguments.length?(e=typeof f=="function"?f:ut(+f),u):e},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ut(+f),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(f){return arguments.length?(i=typeof f=="function"?f:ut(!!f),u):i},u.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),u):a},u.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),u):o},u}function mE(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function yE(t){return t}function xv(){var t=yE,e=mE,n=null,r=ut(0),i=ut(In),o=ut(0);function a(s){var l,u=(s=Jl(s)).length,c,f,h=0,p=new Array(u),d=new Array(u),m=+r.apply(this,arguments),g=Math.min(In,Math.max(-In,i.apply(this,arguments)-m)),y,b=Math.min(Math.abs(g)/u,o.apply(this,arguments)),v=b*(g<0?-1:1),x;for(l=0;l<u;++l)(x=d[p[l]=l]=+t(s[l],l,s))>0&&(h+=x);for(e!=null?p.sort(function(_,A){return e(d[_],d[A])}):n!=null&&p.sort(function(_,A){return n(s[_],s[A])}),l=0,f=h?(g-u*v)/h:0;l<u;++l,m=y)c=p[l],x=d[c],y=m+(x>0?x*f:0)+v,d[c]={data:s[c],index:l,value:x,startAngle:m,endAngle:y,padAngle:b};return d}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:ut(+s),a):t},a.sortValues=function(s){return arguments.length?(e=s,n=null,a):e},a.sort=function(s){return arguments.length?(n=s,e=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ut(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ut(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ut(+s),a):o},a}var vv=cp(tu);function $v(t){this._curve=t}$v.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function cp(t){function e(n){return new $v(t(n))}return e._curve=t,e}function la(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(cp(n)):e()._curve},t}function _v(){return la(eu().curve(vv))}function Sv(){var t=up().curve(vv),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return la(n())},delete t.lineX0,t.lineEndAngle=function(){return la(r())},delete t.lineX1,t.lineInnerRadius=function(){return la(i())},delete t.lineY0,t.lineOuterRadius=function(){return la(o())},delete t.lineY1,t.curve=function(a){return arguments.length?e(cp(a)):e()._curve},t}function ua(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class wv{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}class bE{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,n){if(e=+e,n=+n,this._point===0)this._point=1;else{const r=ua(this._x0,this._y0),i=ua(this._x0,this._y0=(this._y0+n)/2),o=ua(e,this._y0),a=ua(e,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=e,this._y0=n}}function Tv(t){return new wv(t,!0)}function Av(t){return new wv(t,!1)}function xE(t){return new bE(t)}function vE(t){return t.source}function $E(t){return t.target}function nu(t){let e=vE,n=$E,r=sp,i=lp,o=null,a=null,s=sa(l);function l(){let u;const c=gE.call(arguments),f=e.apply(this,c),h=n.apply(this,c);if(o==null&&(a=t(u=s())),a.lineStart(),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),u)return a=null,u+""||null}return l.source=function(u){return arguments.length?(e=u,l):e},l.target=function(u){return arguments.length?(n=u,l):n},l.x=function(u){return arguments.length?(r=typeof u=="function"?u:ut(+u),l):r},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:ut(+u),l):i},l.context=function(u){return arguments.length?(u==null?o=a=null:a=t(o=u),l):o},l}function _E(){return nu(Tv)}function SE(){return nu(Av)}function wE(){const t=nu(xE);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const TE=_t(3),Pv={draw(t,e){const n=_t(e+Di(e/28,.75))*.59436,r=n/2,i=r*TE;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},ru={draw(t,e){const n=_t(e/En);t.moveTo(n,0),t.arc(0,0,n,0,In)}},Dv={draw(t,e){const n=_t(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Cv=_t(1/3),AE=Cv*2,Mv={draw(t,e){const n=_t(e/AE),r=n*Cv;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Lv={draw(t,e){const n=_t(e)*.62625;t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},kv={draw(t,e){const n=_t(e-Di(e/7,2))*.87559;t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},Rv={draw(t,e){const n=_t(e),r=-n/2;t.rect(r,r,n,n)}},Ev={draw(t,e){const n=_t(e)*.4431;t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},PE=.8908130915292852,Iv=ce(En/10)/ce(7*En/10),DE=ce(In/10)*Iv,CE=-mn(In/10)*Iv,Bv={draw(t,e){const n=_t(e*PE),r=DE*n,i=CE*n;t.moveTo(0,-n),t.lineTo(r,i);for(let o=1;o<5;++o){const a=In*o/5,s=mn(a),l=ce(a);t.lineTo(l*n,-s*n),t.lineTo(s*r-l*i,l*r+s*i)}t.closePath()}},fp=_t(3),Nv={draw(t,e){const n=-_t(e/(fp*3));t.moveTo(0,n*2),t.lineTo(-fp*n,-n),t.lineTo(fp*n,-n),t.closePath()}},ME=_t(3),Fv={draw(t,e){const n=_t(e)*.6824,r=n/2,i=n*ME/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},Te=-.5,Ae=_t(3)/2,hp=1/_t(12),LE=(hp/2+1)*3,zv={draw(t,e){const n=_t(e/LE),r=n/2,i=n*hp,o=r,a=n*hp+n,s=-o,l=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(s,l),t.lineTo(Te*r-Ae*i,Ae*r+Te*i),t.lineTo(Te*o-Ae*a,Ae*o+Te*a),t.lineTo(Te*s-Ae*l,Ae*s+Te*l),t.lineTo(Te*r+Ae*i,Te*i-Ae*r),t.lineTo(Te*o+Ae*a,Te*a-Ae*o),t.lineTo(Te*s+Ae*l,Te*l-Ae*s),t.closePath()}},pp={draw(t,e){const n=_t(e-Di(e/6,1.7))*.6189;t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},Ov=[ru,Dv,Mv,Rv,Bv,Nv,zv],kE=[ru,kv,pp,Fv,Pv,Ev,Lv];function RE(t,e){let n=null,r=sa(i);t=typeof t=="function"?t:ut(t||ru),e=typeof e=="function"?e:ut(e===void 0?64:+e);function i(){let o;if(n||(n=o=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(t=typeof o=="function"?o:ut(o),i):t},i.size=function(o){return arguments.length?(e=typeof o=="function"?o:ut(+o),i):e},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Bn(){}function iu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ou(t){this._context=t}ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:iu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:iu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function EE(t){return new ou(t)}function Gv(t){this._context=t}Gv.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:iu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function IE(t){return new Gv(t)}function Wv(t){this._context=t}Wv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:iu(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function BE(t){return new Wv(t)}function Yv(t,e){this._basis=new ou(t),this._beta=e}Yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,a=e[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+l*o),this._beta*e[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const NE=function t(e){function n(r){return e===1?new ou(r):new Yv(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function au(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function dp(t,e){this._context=t,this._k=(1-e)/6}dp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:au(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:au(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const FE=function t(e){function n(r){return new dp(r,e)}return n.tension=function(r){return t(+r)},n}(0);function gp(t,e){this._context=t,this._k=(1-e)/6}gp.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:au(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zE=function t(e){function n(r){return new gp(r,e)}return n.tension=function(r){return t(+r)},n}(0);function mp(t,e){this._context=t,this._k=(1-e)/6}mp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:au(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const OE=function t(e){function n(r){return new mp(r,e)}return n.tension=function(r){return t(+r)},n}(0);function yp(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Vt){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Xv(t,e){this._context=t,this._alpha=e}Xv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:yp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const GE=function t(e){function n(r){return e?new Xv(r,e):new dp(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Vv(t,e){this._context=t,this._alpha=e}Vv.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:yp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const WE=function t(e){function n(r){return e?new Vv(r,e):new gp(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Uv(t,e){this._context=t,this._alpha=e}Uv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const YE=function t(e){function n(r){return e?new Uv(r,e):new mp(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Hv(t){this._context=t}Hv.prototype={areaStart:Bn,areaEnd:Bn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function XE(t){return new Hv(t)}function jv(t){return t<0?-1:1}function qv(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(jv(o)+jv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Zv(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function bp(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function su(t){this._context=t}su.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:bp(this,this._t0,Zv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,bp(this,Zv(this,n=qv(this,t,e)),n);break;default:bp(this,this._t0,n=qv(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Kv(t){this._context=new Qv(t)}(Kv.prototype=Object.create(su.prototype)).point=function(t,e){su.prototype.point.call(this,e,t)};function Qv(t){this._context=t}Qv.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function VE(t){return new su(t)}function UE(t){return new Kv(t)}function Jv(t){this._context=t}Jv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=t$(t),i=t$(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function t$(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(i[n-1]=a[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function HE(t){return new Jv(t)}function lu(t,e){this._context=t,this._t=e}lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function jE(t){return new lu(t,.5)}function qE(t){return new lu(t,0)}function ZE(t){return new lu(t,1)}function Ci(t,e){if((a=t.length)>1)for(var n=1,r,i,o=t[e[0]],a,s=o.length;n<a;++n)for(i=o,o=t[e[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Mi(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function KE(t,e){return t[e]}function QE(t){const e=[];return e.key=t,e}function JE(){var t=ut([]),e=Mi,n=Ci,r=KE;function i(o){var a=Array.from(t.apply(this,arguments),QE),s,l=a.length,u=-1,c;for(const f of o)for(s=0,++u;s<l;++s)(a[s][u]=[0,+r(f,a[s].key,u,o)]).data=f;for(s=0,c=Jl(e(a));s<l;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(t=typeof o=="function"?o:ut(Array.from(o)),i):t},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ut(+o),i):r},i.order=function(o){return arguments.length?(e=o==null?Mi:typeof o=="function"?o:ut(Array.from(o)),i):e},i.offset=function(o){return arguments.length?(n=o??Ci,i):n},i}function tI(t,e){if((r=t.length)>0){for(var n,r,i=0,o=t[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=t[n][i][1]||0;if(a)for(n=0;n<r;++n)t[n][i][1]/=a}Ci(t,e)}}function eI(t,e){if((l=t.length)>0)for(var n,r=0,i,o,a,s,l,u=t[e[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=t[e[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function nI(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=t[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ci(t,e)}}function rI(t,e){if(!(!((a=t.length)>0)||!((o=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=t[e[s]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<s;++d){var m=t[e[d]],g=m[r][1]||0,y=m[r-1][1]||0;p+=g-y}l+=f,u+=p*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,Ci(t,e)}}function e$(t){var e=t.map(iI);return Mi(t).sort(function(n,r){return e[n]-e[r]})}function iI(t){for(var e=-1,n=0,r=t.length,i,o=-1/0;++e<r;)(i=+t[e][1])>o&&(o=i,n=e);return n}function n$(t){var e=t.map(r$);return Mi(t).sort(function(n,r){return e[n]-e[r]})}function r$(t){for(var e=0,n=-1,r=t.length,i;++n<r;)(i=+t[n][1])&&(e+=i);return e}function oI(t){return n$(t).reverse()}function aI(t){var e=t.length,n,r,i=t.map(r$),o=e$(t),a=0,s=0,l=[],u=[];for(n=0;n<e;++n)r=o[n],a<s?(a+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)}function sI(t){return Mi(t).reverse()}const uu=t=>()=>t;function lI(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Je(t,e,n){this.k=t,this.x=e,this.y=n}Je.prototype={constructor:Je,scale:function(t){return t===1?this:new Je(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Je(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Li=new Je(1,0,0);i$.prototype=Je.prototype;function i$(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Li;return t.__zoom}function xp(t){t.stopImmediatePropagation()}function ca(t){t.preventDefault(),t.stopImmediatePropagation()}function uI(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function cI(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function o$(){return this.__zoom||Li}function fI(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function hI(){return navigator.maxTouchPoints||"ontouchstart"in this}function pI(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function yn(){var t=uI,e=cI,n=pI,r=fI,i=hI,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=zm,u=Qn("start","zoom","end"),c,f,h,p=500,d=150,m=0,g=10;function y(T){T.property("__zoom",o$).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",B).filter(i).on("touchstart.zoom",$).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(T,w,D,F){var z=T.selection?T.selection():T;z.property("__zoom",o$),T!==z?_(T,w,D,F):z.interrupt().each(function(){A(this,arguments).event(F).start().zoom(null,typeof w=="function"?w.apply(this,arguments):w).end()})},y.scaleBy=function(T,w,D,F){y.scaleTo(T,function(){var z=this.__zoom.k,I=typeof w=="function"?w.apply(this,arguments):w;return z*I},D,F)},y.scaleTo=function(T,w,D,F){y.transform(T,function(){var z=e.apply(this,arguments),I=this.__zoom,N=D==null?x(z):typeof D=="function"?D.apply(this,arguments):D,E=I.invert(N),O=typeof w=="function"?w.apply(this,arguments):w;return n(v(b(I,O),N,E),z,a)},D,F)},y.translateBy=function(T,w,D,F){y.transform(T,function(){return n(this.__zoom.translate(typeof w=="function"?w.apply(this,arguments):w,typeof D=="function"?D.apply(this,arguments):D),e.apply(this,arguments),a)},null,F)},y.translateTo=function(T,w,D,F,z){y.transform(T,function(){var I=e.apply(this,arguments),N=this.__zoom,E=F==null?x(I):typeof F=="function"?F.apply(this,arguments):F;return n(Li.translate(E[0],E[1]).scale(N.k).translate(typeof w=="function"?-w.apply(this,arguments):-w,typeof D=="function"?-D.apply(this,arguments):-D),I,a)},F,z)};function b(T,w){return w=Math.max(o[0],Math.min(o[1],w)),w===T.k?T:new Je(w,T.x,T.y)}function v(T,w,D){var F=w[0]-D[0]*T.k,z=w[1]-D[1]*T.k;return F===T.x&&z===T.y?T:new Je(T.k,F,z)}function x(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function _(T,w,D,F){T.on("start.zoom",function(){A(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(F).end()}).tween("zoom",function(){var z=this,I=arguments,N=A(z,I).event(F),E=e.apply(z,I),O=D==null?x(E):typeof D=="function"?D.apply(z,I):D,j=Math.max(E[1][0]-E[0][0],E[1][1]-E[0][1]),it=z.__zoom,Y=typeof w=="function"?w.apply(z,I):w,Q=l(it.invert(O).concat(j/it.k),Y.invert(O).concat(j/Y.k));return function(X){if(X===1)X=Y;else{var K=Q(X),q=j/K[2];X=new Je(q,O[0]-K[0]*q,O[1]-K[1]*q)}N.zoom(null,X)}})}function A(T,w,D){return!D&&T.__zooming||new S(T,w)}function S(T,w){this.that=T,this.args=w,this.active=0,this.sourceEvent=null,this.extent=e.apply(T,w),this.taps=0}S.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,w){return this.mouse&&T!=="mouse"&&(this.mouse[1]=w.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=w.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=w.invert(this.touch1[0])),this.that.__zoom=w,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var w=V(this.that).datum();u.call(T,this.that,new lI(T,{sourceEvent:this.sourceEvent,target:y,type:T,transform:this.that.__zoom,dispatch:u}),w)}};function P(T,...w){if(!t.apply(this,arguments))return;var D=A(this,w).event(T),F=this.__zoom,z=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),I=ge(T);if(D.wheel)(D.mouse[0][0]!==I[0]||D.mouse[0][1]!==I[1])&&(D.mouse[1]=F.invert(D.mouse[0]=I)),clearTimeout(D.wheel);else{if(F.k===z)return;D.mouse=[I,F.invert(I)],ar(this),D.start()}ca(T),D.wheel=setTimeout(N,d),D.zoom("mouse",n(v(b(F,z),D.mouse[0],D.mouse[1]),D.extent,a));function N(){D.wheel=null,D.end()}}function C(T,...w){if(h||!t.apply(this,arguments))return;var D=T.currentTarget,F=A(this,w,!0).event(T),z=V(T.view).on("mousemove.zoom",O,!0).on("mouseup.zoom",j,!0),I=ge(T,D),N=T.clientX,E=T.clientY;cs(T.view),xp(T),F.mouse=[I,this.__zoom.invert(I)],ar(this),F.start();function O(it){if(ca(it),!F.moved){var Y=it.clientX-N,Q=it.clientY-E;F.moved=Y*Y+Q*Q>m}F.event(it).zoom("mouse",n(v(F.that.__zoom,F.mouse[0]=ge(it,D),F.mouse[1]),F.extent,a))}function j(it){z.on("mousemove.zoom mouseup.zoom",null),fs(it.view,F.moved),ca(it),F.event(it).end()}}function B(T,...w){if(t.apply(this,arguments)){var D=this.__zoom,F=ge(T.changedTouches?T.changedTouches[0]:T,this),z=D.invert(F),I=D.k*(T.shiftKey?.5:2),N=n(v(b(D,I),F,z),e.apply(this,w),a);ca(T),s>0?V(this).transition().duration(s).call(_,N,F,T):V(this).call(y.transform,N,F,T)}}function $(T,...w){if(t.apply(this,arguments)){var D=T.touches,F=D.length,z=A(this,w,T.changedTouches.length===F).event(T),I,N,E,O;for(xp(T),N=0;N<F;++N)E=D[N],O=ge(E,this),O=[O,this.__zoom.invert(O),E.identifier],z.touch0?!z.touch1&&z.touch0[2]!==O[2]&&(z.touch1=O,z.taps=0):(z.touch0=O,I=!0,z.taps=1+!!c);c&&(c=clearTimeout(c)),I&&(z.taps<2&&(f=O[0],c=setTimeout(function(){c=null},p)),ar(this),z.start())}}function k(T,...w){if(this.__zooming){var D=A(this,w).event(T),F=T.changedTouches,z=F.length,I,N,E,O;for(ca(T),I=0;I<z;++I)N=F[I],E=ge(N,this),D.touch0&&D.touch0[2]===N.identifier?D.touch0[0]=E:D.touch1&&D.touch1[2]===N.identifier&&(D.touch1[0]=E);if(N=D.that.__zoom,D.touch1){var j=D.touch0[0],it=D.touch0[1],Y=D.touch1[0],Q=D.touch1[1],X=(X=Y[0]-j[0])*X+(X=Y[1]-j[1])*X,K=(K=Q[0]-it[0])*K+(K=Q[1]-it[1])*K;N=b(N,Math.sqrt(X/K)),E=[(j[0]+Y[0])/2,(j[1]+Y[1])/2],O=[(it[0]+Q[0])/2,(it[1]+Q[1])/2]}else if(D.touch0)E=D.touch0[0],O=D.touch0[1];else return;D.zoom("touch",n(v(N,E,O),D.extent,a))}}function M(T,...w){if(this.__zooming){var D=A(this,w).event(T),F=T.changedTouches,z=F.length,I,N;for(xp(T),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),I=0;I<z;++I)N=F[I],D.touch0&&D.touch0[2]===N.identifier?delete D.touch0:D.touch1&&D.touch1[2]===N.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(N=ge(N,this),Math.hypot(f[0]-N[0],f[1]-N[1])<g)){var E=V(this).on("dblclick.zoom");E&&E.apply(this,arguments)}}}return y.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:uu(+T),y):r},y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:uu(!!T),y):t},y.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:uu(!!T),y):i},y.extent=function(T){return arguments.length?(e=typeof T=="function"?T:uu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),y):e},y.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],y):[o[0],o[1]]},y.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(T){return arguments.length?(n=T,y):n},y.duration=function(T){return arguments.length?(s=+T,y):s},y.interpolate=function(T){return arguments.length?(l=T,y):l},y.on=function(){var T=u.on.apply(u,arguments);return T===u?y:T},y.clickDistance=function(T){return arguments.length?(m=(T=+T)*T,y):Math.sqrt(m)},y.tapDistance=function(T){return arguments.length?(g=+T,y):g},y}const vp=Object.freeze(Object.defineProperty({__proto__:null,Adder:kt,Delaunay:Cf,FormatSpecifier:Hs,InternMap:oo,InternSet:qn,Node:yr,Path:Po,Voronoi:Py,ZoomTransform:Je,active:x3,arc:Ql,area:up,areaRadial:Sv,ascending:wt,autoType:Y6,axisBottom:Dc,axisLeft:Cc,axisRight:fC,axisTop:cC,bin:R0,bisect:jn,bisectCenter:sD,bisectLeft:aD,bisectRight:b0,bisector:Za,blob:U6,blur:lD,blur2:x0,blurImage:uD,brush:k3,brushSelection:C3,brushX:M3,brushY:L3,buffer:j6,chord:E3,chordDirected:B3,chordTranspose:I3,cluster:i7,color:An,contourDensity:l6,contours:wf,count:Qa,create:UM,creator:ss,cross:mD,csv:K6,csvFormat:k6,csvFormatBody:R6,csvFormatRow:I6,csvFormatRows:E6,csvFormatValue:B6,csvParse:Ly,csvParseRows:L6,cubehelix:Ee,cumsum:yD,curveBasis:EE,curveBasisClosed:IE,curveBasisOpen:BE,curveBumpX:Tv,curveBumpY:Av,curveBundle:NE,curveCardinal:FE,curveCardinalClosed:zE,curveCardinalOpen:OE,curveCatmullRom:GE,curveCatmullRomClosed:WE,curveCatmullRomOpen:YE,curveLinear:tu,curveLinearClosed:XE,curveMonotoneX:VE,curveMonotoneY:UE,curveNatural:HE,curveStep:jE,curveStepAfter:ZE,curveStepBefore:qE,descending:m0,deviation:_0,difference:QD,disjoint:JD,dispatch:Qn,drag:ps,dragDisable:cs,dragEnable:fs,dsv:Z6,dsvFormat:Os,easeBack:sy,easeBackIn:f3,easeBackInOut:sy,easeBackOut:h3,easeBounce:To,easeBounceIn:u3,easeBounceInOut:c3,easeBounceOut:To,easeCircle:ay,easeCircleIn:J5,easeCircleInOut:ay,easeCircleOut:t3,easeCubic:wo,easeCubicIn:V5,easeCubicInOut:wo,easeCubicOut:U5,easeElastic:sr,easeElasticIn:p3,easeElasticInOut:d3,easeElasticOut:sr,easeExp:oy,easeExpIn:K5,easeExpInOut:oy,easeExpOut:Q5,easeLinear:W5,easePoly:ey,easePolyIn:H5,easePolyInOut:ey,easePolyOut:j5,easeQuad:ty,easeQuadIn:Y5,easeQuadInOut:ty,easeQuadOut:X5,easeSin:iy,easeSinIn:q5,easeSinInOut:iy,easeSinOut:Z5,every:UD,extent:io,fcumsum:xD,filter:jD,flatGroup:vD,flatRollup:$D,forceCenter:Ef,forceCollide:Ys,forceLink:Bf,forceManyBody:Vs,forceRadial:L8,forceSimulation:Xs,forceX:Fy,forceY:zy,get format(){return Lo},formatDefaultLocale:Hy,formatLocale:Uy,get formatPrefix(){return Nf},formatSpecifier:di,fsum:bD,geoAlbers:sb,geoAlbersUsa:B4,geoArea:G8,geoAzimuthalEqualArea:N4,geoAzimuthalEqualAreaRaw:_h,geoAzimuthalEquidistant:F4,geoAzimuthalEquidistantRaw:Sh,geoBounds:V8,geoCentroid:K8,geoCircle:Q8,geoClipAntimeridian:eh,geoClipCircle:C1,geoClipExtent:o4,geoClipRectangle:gl,geoConicConformal:O4,geoConicConformalRaw:cb,geoConicEqualArea:Pl,geoConicEqualAreaRaw:ab,geoConicEquidistant:W4,geoConicEquidistantRaw:fb,geoContains:h4,geoDistance:bl,geoEqualEarth:X4,geoEqualEarthRaw:wh,geoEquirectangular:G4,geoEquirectangularRaw:Ho,geoGnomonic:V4,geoGnomonicRaw:Th,geoGraticule:z1,geoGraticule10:p4,geoIdentity:U4,geoInterpolate:d4,geoLength:M1,geoMercator:z4,geoMercatorRaw:Uo,geoNaturalEarth1:H4,geoNaturalEarth1Raw:Ah,geoOrthographic:j4,geoOrthographicRaw:Ph,geoPath:A4,geoProjection:Ze,geoProjectionMutator:vh,geoRotation:$1,geoStereographic:q4,geoStereographicRaw:Dh,geoStream:Be,geoTransform:P4,geoTransverseMercator:Z4,geoTransverseMercatorRaw:Ch,gray:hL,greatest:E0,greatestIndex:GD,group:A0,groupSort:wD,groups:P0,hcl:xs,hierarchy:Ml,histogram:R0,hsl:ms,html:r8,image:J6,index:_D,indexes:SD,interpolate:nn,interpolateArray:bL,interpolateBasis:wm,interpolateBasisClosed:Tm,interpolateBlues:WR,interpolateBrBG:$R,interpolateBuGn:MR,interpolateBuPu:LR,interpolateCividis:jR,interpolateCool:KR,interpolateCubehelix:RL,interpolateCubehelixDefault:qR,interpolateCubehelixLong:Ts,interpolateDate:Lm,interpolateDiscrete:$L,interpolateGnBu:kR,interpolateGreens:YR,interpolateGreys:XR,interpolateHcl:LL,interpolateHclLong:kL,interpolateHsl:DL,interpolateHslLong:CL,interpolateHue:_L,interpolateInferno:oE,interpolateLab:ML,interpolateMagma:iE,interpolateNumber:ve,interpolateNumberArray:jc,interpolateObject:km,interpolateOrRd:RR,interpolateOranges:HR,interpolatePRGn:_R,interpolatePiYG:SR,interpolatePlasma:aE,interpolatePuBu:IR,interpolatePuBuGn:ER,interpolatePuOr:wR,interpolatePuRd:BR,interpolatePurples:VR,interpolateRainbow:QR,interpolateRdBu:TR,interpolateRdGy:AR,interpolateRdPu:NR,interpolateRdYlBu:PR,interpolateRdYlGn:DR,interpolateReds:UR,interpolateRgb:yo,interpolateRgbBasis:Dm,interpolateRgbBasisClosed:yL,interpolateRound:Ss,interpolateSinebow:eE,interpolateSpectral:CR,interpolateString:Kc,interpolateTransformCss:Bm,interpolateTransformSvg:Nm,interpolateTurbo:nE,interpolateViridis:rE,interpolateWarm:ZR,interpolateYlGn:zR,interpolateYlGnBu:FR,interpolateYlOrBr:OR,interpolateYlOrRd:GR,interpolateZoom:zm,interrupt:ar,intersection:tC,interval:FL,isoFormat:tR,isoParse:rR,json:e8,lab:go,lch:pL,least:OD,leastIndex:N0,line:eu,lineRadial:_v,link:nu,linkHorizontal:_E,linkRadial:wE,linkVertical:SE,local:Q0,map:qD,matcher:Rc,max:ao,maxIndex:Sc,mean:kD,median:RD,medianIndex:ED,merge:Tc,min:es,minIndex:wc,mode:BD,namespace:co,namespaces:Lc,nice:$c,now:_o,pack:E7,packEnclose:D7,packSiblings:k7,pairs:ND,partition:I7,path:Sf,pathRound:z3,permute:k0,pie:xv,piecewise:Ym,pointRadial:ua,pointer:ge,pointers:jM,polygonArea:Z7,polygonCentroid:K7,polygonContains:ek,polygonHull:tk,polygonLength:nk,precisionFixed:jy,precisionPrefix:qy,precisionRound:Zy,quadtree:Ws,quantile:lo,quantileIndex:B0,quantileSorted:I0,quantize:EL,quickselect:ns,radialArea:Sv,radialLine:_v,randomBates:ak,randomBernoulli:uk,randomBeta:Rb,randomBinomial:Eb,randomCauchy:fk,randomExponential:sk,randomGamma:zh,randomGeometric:kb,randomInt:ik,randomIrwinHall:Lb,randomLcg:mk,randomLogNormal:ok,randomLogistic:hk,randomNormal:Fh,randomPareto:lk,randomPoisson:pk,randomUniform:rk,randomWeibull:ck,range:wn,rank:zD,reduce:ZD,reverse:KD,rgb:ni,ribbon:H3,ribbonArrow:j3,rollup:C0,rollups:M0,scaleBand:Wh,scaleDiverging:Ox,scaleDivergingLog:Gx,scaleDivergingPow:ap,scaleDivergingSqrt:uR,scaleDivergingSymlog:Wx,scaleIdentity:zb,scaleImplicit:Oh,scaleLinear:xr,scaleLog:Xb,scaleOrdinal:Gh,scalePoint:Yh,scalePow:kn,scaleQuantile:Kb,scaleQuantize:Qb,scaleRadial:Zb,scaleSequential:Bx,scaleSequentialLog:Nx,scaleSequentialPow:op,scaleSequentialQuantile:zx,scaleSequentialSqrt:lR,scaleSequentialSymlog:Fx,scaleSqrt:Dk,scaleSymlog:Hb,scaleThreshold:Jb,scaleTime:aR,scaleUtc:sR,scan:WD,schemeAccent:fR,schemeBlues:cv,schemeBrBG:Yx,schemeBuGn:Qx,schemeBuPu:Jx,schemeCategory10:cR,schemeDark2:hR,schemeGnBu:tv,schemeGreens:fv,schemeGreys:hv,schemeObservable10:pR,schemeOrRd:ev,schemeOranges:gv,schemePRGn:Xx,schemePaired:dR,schemePastel1:gR,schemePastel2:mR,schemePiYG:Vx,schemePuBu:rv,schemePuBuGn:nv,schemePuOr:Ux,schemePuRd:iv,schemePurples:pv,schemeRdBu:Hx,schemeRdGy:jx,schemeRdPu:ov,schemeRdYlBu:qx,schemeRdYlGn:Zx,schemeReds:dv,schemeSet1:yR,schemeSet2:bR,schemeSet3:xR,schemeSpectral:Kx,schemeTableau10:vR,schemeYlGn:sv,schemeYlGnBu:av,schemeYlOrBr:lv,schemeYlOrRd:uv,select:V,selectAll:qM,selection:tr,selector:ls,selectorAll:kc,shuffle:YD,shuffler:F0,some:HD,sort:bc,stack:JE,stackOffsetDiverging:eI,stackOffsetExpand:tI,stackOffsetNone:Ci,stackOffsetSilhouette:nI,stackOffsetWiggle:rI,stackOrderAppearance:e$,stackOrderAscending:n$,stackOrderDescending:oI,stackOrderInsideOut:aI,stackOrderNone:Mi,stackOrderReverse:sI,stratify:z7,style:Jn,subset:nC,sum:Ac,superset:O0,svg:i8,symbol:RE,symbolAsterisk:Pv,symbolCircle:ru,symbolCross:Dv,symbolDiamond:Mv,symbolDiamond2:Lv,symbolPlus:kv,symbolSquare:Rv,symbolSquare2:Ev,symbolStar:Bv,symbolTimes:pp,symbolTriangle:Nv,symbolTriangle2:Fv,symbolWye:zv,symbolX:pp,symbols:Ov,symbolsFill:Ov,symbolsStroke:kE,text:Gs,thresholdFreedmanDiaconis:MD,thresholdScott:LD,thresholdSturges:_c,tickFormat:Fb,tickIncrement:Kn,tickStep:ts,ticks:Zn,timeDay:wi,timeDays:Ek,get timeFormat(){return np},timeFormatDefaultLocale:Ex,timeFormatLocale:bx,timeFriday:ox,timeFridays:Gk,timeHour:Ol,timeHours:kk,timeInterval:Mt,timeMillisecond:Si,timeMilliseconds:tx,timeMinute:Fl,timeMinutes:Mk,timeMonday:na,timeMondays:Nk,timeMonth:Wl,timeMonths:qk,get timeParse(){return Rx},timeSaturday:ax,timeSaturdays:Wk,timeSecond:gn,timeSeconds:nx,timeSunday:Ti,timeSundays:sx,timeThursday:$r,timeThursdays:Ok,timeTickInterval:yx,timeTicks:mx,timeTuesday:rx,timeTuesdays:Fk,timeWednesday:ix,timeWednesdays:zk,timeWeek:Ti,timeWeeks:sx,timeYear:Ke,timeYears:Kk,timeout:tf,timer:Cs,timerFlush:Um,transition:Qm,transpose:z0,tree:U7,treemap:Cb,treemapBinary:H7,treemapDice:Jo,treemapResquarify:q7,treemapSlice:Il,treemapSliceDice:j7,treemapSquarify:Nh,tsv:Q6,tsvFormat:F6,tsvFormatBody:z6,tsvFormatRow:G6,tsvFormatRows:O6,tsvFormatValue:W6,tsvParse:ky,tsvParseRows:N6,union:rC,unixDay:Jh,unixDays:Bk,utcDay:ea,utcDays:Ik,get utcFormat(){return Xl},utcFriday:cx,utcFridays:Hk,utcHour:Gl,utcHours:Rk,utcMillisecond:Si,utcMilliseconds:tx,utcMinute:zl,utcMinutes:Lk,utcMonday:ra,utcMondays:Yk,utcMonth:Yl,utcMonths:Zk,get utcParse(){return rp},utcSaturday:fx,utcSaturdays:jk,utcSecond:gn,utcSeconds:nx,utcSunday:Ai,utcSundays:hx,utcThursday:Sr,utcThursdays:Uk,utcTickInterval:gx,utcTicks:dx,utcTuesday:lx,utcTuesdays:Xk,utcWednesday:ux,utcWednesdays:Vk,utcWeek:Ai,utcWeeks:hx,utcYear:Qe,utcYears:Qk,variance:$0,window:Ec,xml:n8,zip:VD,zoom:yn,zoomIdentity:Li,zoomTransform:i$},Symbol.toStringTag,{value:"Module"}));function a$(t){try{return t.node().getBBox()}catch(e){throw new Error(e)}}function dI(t,e){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=t.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);t.node().appendChild(n(e))}function fa(t){return t.substring(0,4)!=="ease"?wo:vp[t]??wo}function cu({axisWidth:t,innerRadius:e,outerRadius:n,padAngle:r,cornerRadius:i}){const o=xr().domain([0,1]).range([0,t/2]),a=o(n);return Ql().innerRadius(o(e)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const wr=(t,e)=>{if(e instanceof Function){const n=e(t);return String(n??"")}return Lo(e)(t)};function $p(t){return!(go(t).l<=60)}function ha(t,e=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(t))==null?void 0:i.width)??0)*e/10}function bt(t,e){const n=e.colors[e.colorScheme];return t==="label"?n.label[0]:t==="labelContrast"?$p(n.label[0])?n.labelContrast[1]:n.labelContrast[0]:t=="none"?"none":n[t]!=null?n[t]:n.primary}function St({datum:t,colorType:e,fullChartParams:n}){const r=n.colors[n.colorScheme];if(e==="label"){const i=t.color;return i||r.label[0]}else if(e==="labelContrast"){const i=t.color;return i?$p(i)?r.labelContrast[1]:r.labelContrast[0]:$p(r.label[0])?r.labelContrast[1]:r.labelContrast[0]}return e=="none"?"none":r[e]!=null?r[e]:r.primary}function Z(t,e,n){const r=n?`--${n}`:"";return`orbcharts-${t}__${e}${r}`}function Pe(t,e){const r=Math.random().toString(36).substr(2,5);return Z(t,e,r)}function pa(t,e){let n=new dt(()=>{});return t.each(function(){const r=Iu(this,e);n=Bu(n,r)}),n}const Tr=({selection:t,pluginName:e,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=Z(e,"series"),l=Z(e,"axes"),u=Z(e,"graphic"),c=r.pipe(R((d,m)=>t.selectAll(`g.${s}`).data(d,g=>g).join(g=>g.append("g").classed(s,!0).each((y,b,v)=>{V(v[b]).selectAll(`g.${l}`).data([b]).join(x=>x.append("g").classed(l,!0).attr("clip-path",`url(#${n})`).each((_,A,S)=>{V(S[A]).selectAll("defs").data([A]).join("defs"),V(S[A]).selectAll("g").data([A]).join("g").classed(u,!0)}),x=>x,x=>x.remove())}),g=>g,g=>g.remove())),pt(1));W({seriesSelection:c,gridContainerPosition:i}).pipe(G(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(m,g)=>{const y=d.gridContainerPosition[g]??d.gridContainerPosition[0],b=y.translate,v=y.scale;return`translate(${b[0]}, ${b[1]}) scale(${v[0]}, ${v[1]})`})});const f=W({seriesSelection:c,gridAxesTransform:o}).pipe(G(async d=>d),R(d=>d.seriesSelection.select(`g.${l}`).style("transform",d.gridAxesTransform.value)),pt(1)),h=f.pipe(R(d=>d.select("defs")),pt(1)),p=W({axesSelection:f,gridGraphicTransform:a}).pipe(G(async d=>d),R(d=>{const m=d.axesSelection.select(`g.${u}`);return m.transition().duration(50).style("transform",d.gridGraphicTransform.value),m}),pt(1));return{seriesSelection$:c,axesSelection$:f,defsSelection$:h,graphicGSelection$:p}},s$=({fullDataFormatter$:t,gridAxesSize$:e,computedData$:n,fullChartParams$:r,gridContainerPosition$:i,layout$:o})=>{const a=new J,s=W({fullDataFormatter:t,gridAxesSize:e,computedData:n}).pipe(G(async h=>h),R(h=>{const p=h.computedData[0]?h.computedData[0].length-1:0,d=h.fullDataFormatter.groupAxis.scaleDomain[0]-h.fullDataFormatter.groupAxis.scalePadding,m=h.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?p+h.fullDataFormatter.groupAxis.scalePadding:h.fullDataFormatter.groupAxis.scaleDomain[1]+h.fullDataFormatter.groupAxis.scalePadding;return[d,m]}),pt(1)),l=W({fullDataFormatter:t,computedData:n}).pipe(G(async h=>h),R(h=>h.fullDataFormatter.seriesDirection==="row"?(h.computedData[0]??[]).map(p=>p.groupLabel):h.computedData.map(p=>p[0].groupLabel))),u=W({groupScaleDomain:s,groupLabels:l}).pipe(G(async h=>h),R(h=>h.groupLabels.filter((p,d)=>d>=h.groupScaleDomain[0]&&d<=h.groupScaleDomain[1]))),c=i.pipe(R(h=>h.reduce((d,m)=>m.columnIndex>d?m.columnIndex:d,0)+1),tt()),f=i.pipe(R(h=>h.reduce((d,m)=>m.rowIndex>d?m.rowIndex:d,0)+1),tt());return new dt(h=>{W({dataFormatter:t,axisSize:e,fullChartParams:r,scaleRangeGroupLabels:u,groupLabels:l,groupScaleDomain:s,columnAmount:c,rowAmount:f,layout:o}).pipe(L(a),G(async p=>p)).subscribe(p=>{const d=p.dataFormatter.valueAxis.position==="right"||p.dataFormatter.valueAxis.position==="bottom",m=h0({axisLabels:p.scaleRangeGroupLabels,axisWidth:p.axisSize.width,padding:p.dataFormatter.groupAxis.scalePadding,reverse:d}),g=b=>p.dataFormatter.groupAxis.position==="bottom"||p.dataFormatter.groupAxis.position==="top"?b.offsetX-p.fullChartParams.padding.left:b.offsetY-p.fullChartParams.padding.top,y=b=>{const v={offsetX:b.offsetX*p.columnAmount%p.layout.rootWidth,offsetY:b.offsetY*p.rowAmount%p.layout.rootHeight},x=g(v),_=m(x),A=Math.ceil(p.groupScaleDomain[0]),S=_+A;return{groupIndex:S,groupLabel:p.groupLabels[S]??""}};return h.next(y),function(){a.next(void 0)}})})},gI=({rootSelection:t,fullDataFormatter$:e,gridAxesSize$:n,computedData$:r,fullChartParams$:i,gridContainerPosition$:o,layout$:a})=>{const s=pa(t,"mousemove"),l=W({fullDataFormatter:e,gridAxesSize:n,computedData:r}).pipe(G(async b=>b),R(b=>{const v=b.computedData[0]?b.computedData[0].length-1:0,x=b.fullDataFormatter.groupAxis.scaleDomain[0]-b.fullDataFormatter.groupAxis.scalePadding,_=b.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?v+b.fullDataFormatter.groupAxis.scalePadding:b.fullDataFormatter.groupAxis.scaleDomain[1]+b.fullDataFormatter.groupAxis.scalePadding;return[x,_]}),pt(1)),u=W({fullDataFormatter:e,computedData:r}).pipe(G(async b=>b),R(b=>b.fullDataFormatter.seriesDirection==="row"?(b.computedData[0]??[]).map(v=>v.groupLabel):b.computedData.map(v=>v[0].groupLabel))),c=W({groupScaleDomain:l,groupLabels:u}).pipe(G(async b=>b),R(b=>b.groupLabels.filter((v,x)=>x>=b.groupScaleDomain[0]&&x<=b.groupScaleDomain[1]))),f=e.pipe(R(b=>b.valueAxis.position==="right"||b.valueAxis.position==="bottom")),h=W({reverse:f,gridAxesSize:n,scaleRangeGroupLabels:c,fullDataFormatter:e}).pipe(G(async b=>b),R(b=>h0({axisLabels:b.scaleRangeGroupLabels,axisWidth:b.gridAxesSize.width,padding:b.fullDataFormatter.groupAxis.scalePadding,reverse:b.reverse}))),p=o.pipe(R(b=>b.reduce((x,_)=>_.columnIndex>x?_.columnIndex:x,0)+1),tt()),d=o.pipe(R(b=>b.reduce((x,_)=>_.rowIndex>x?_.rowIndex:x,0)+1),tt()),m=W({fullDataFormatter:e,fullChartParams:i,rootMousemove:s,columnAmount:p,rowAmount:d,layout:a}).pipe(G(async b=>b),R(b=>{const v={offsetX:b.rootMousemove.offsetX*b.columnAmount%b.layout.rootWidth,offsetY:b.rootMousemove.offsetY*b.rowAmount%b.layout.rootHeight};return b.fullDataFormatter.groupAxis.position==="bottom"||b.fullDataFormatter.groupAxis.position==="top"?v.offsetX-b.fullChartParams.padding.left:v.offsetY-b.fullChartParams.padding.top})),g=W({xIndexScale:h,axisValue:m,groupScaleDomain:l}).pipe(G(async b=>b),R(b=>{const v=b.xIndexScale(b.axisValue),x=Math.ceil(b.groupScaleDomain[0]);return v+x})),y=W({groupIndex:g,groupLabels:u}).pipe(G(async b=>b),R(b=>b.groupLabels[b.groupIndex]??""));return W({groupIndex:g,groupLabel:y}).pipe(G(async b=>b),R(b=>({groupIndex:b.groupIndex,groupLabel:b.groupLabel})))};function mI(t="curveLinear"){return eu().x(e=>e.axisX).y(e=>e.axisY).curve(vp[t])}function yI(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function bI({selection:t,pathClassName:e,segmentData:n,linePath:r,params:i}){return t.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(e,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function xI({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function vI({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const l=s.append("rect");return l.transition().duration(n).ease(fa(r)).tween("tween",(u,c,f)=>h=>{const p=u.width*h;l.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),l},s=>s.attr("x",0).attr("y",0).attr("width",l=>l.width).attr("height",l=>l.height),s=>s.remove())})}const l$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,allContainerPosition$:y,layout$:b,event$:v})=>{const x=new J,_=Pe(t,"clipPath-box"),A=Z(t,"path"),{seriesSelection$:S,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),$=new dt(z=>{const I=u.pipe(L(x)).subscribe(N=>{if(!N)return;const E=mI(N.lineCurve);z.next(E)});return()=>{I.unsubscribe()}}),k=f.pipe(R(z=>z.transitionDuration),tt()),M=f.pipe(R(z=>z.transitionEase),tt());W({defsSelection:C,seriesLabels:a,axisSize:d,transitionDuration:k,transitionEase:M}).pipe(L(x),G(async z=>z)).subscribe(z=>{const N=[{id:_,width:z.axisSize.width,height:z.axisSize.height}].concat(z.seriesLabels.map(E=>({id:`orbcharts__clipPath_${E}`,width:z.axisSize.width,height:z.axisSize.height})));vI({defsSelection:z.defsSelection,clipPathData:N,transitionDuration:z.transitionDuration,transitionEase:z.transitionEase})});const T=n.pipe(R(z=>{const I=new Map;return z.flat().forEach(N=>I.set(N.id,N)),I})),w=s$({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:y,layout$:b}),D=f.pipe(L(x),R(z=>z.highlightTarget),tt()),F=W({graphicGSelection:B,visibleComputedLayoutData:o,linePath:$,params:u}).pipe(L(x),G(async z=>z),R(z=>{let I=[];return z.graphicGSelection.each((N,E,O)=>{const j=yI(z.visibleComputedLayoutData[E]??[]);I[E]=bI({selection:V(O[E]),pathClassName:A,linePath:z.linePath,segmentData:j,params:z.params})}),I}));return W({pathSelectionArr:F,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:D,gridGroupPositionFn:w}).pipe(L(x),G(async z=>z)).subscribe(z=>{z.pathSelectionArr.forEach(I=>{I.on("mouseover",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})}).on("mousemove",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})}).on("mouseout",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})}).on("click",(N,E)=>{N.stopPropagation();const O=E[0]?E[0].seriesLabel:"",{groupIndex:j,groupLabel:it}=z.gridGroupPositionFn(N),X=z.GroupDataMap.get(it).find(K=>K.seriesLabel===O)??E[0];v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:z.highlightTarget,datum:X,gridIndex:X.gridIndex,series:z.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:z.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:N,data:z.computedData})})})}),f.pipe(L(x),Rr(z=>z.highlightTarget==="series"),G(z=>W({graphicGSelection:B,gridHighlight:m,DataMap:T,fullChartParams:f}).pipe(L(x),G(async I=>I)))).subscribe(z=>{const I=z.gridHighlight[0]?z.gridHighlight[0].seriesLabel:null;xI({selection:z.graphicGSelection,seriesLabel:I,fullChartParams:z.fullChartParams})}),()=>{x.next(void 0)}},u$=0,bn=2,c$=3,f$=4,be=5,fu=6,_p=7,ki=8,Ri=9,h$="Lines",$I=se({name:h$,defaultParams:Dr,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new J,a=l$(h$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,allContainerPosition$:r.gridContainerPosition$,layout$:r.layout$,event$:i.event$});return()=>{o.next(void 0),a()}});function _I(t="curveLinear",e){return up().x(n=>n.axisX).y0(n=>e).y1(n=>n.axisY).curve(vp[t])}function SI(t){let e=[[]],n=0;for(let r in t){if(t[r].visible==!1||t[r].value===void 0||t[r].value===null){e[n].length&&(n++,e[n]=[]);continue}e[n].push(t[r])}return e}function wI({selection:t,pathClassName:e,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return t.selectAll("path").data(n,(s,l)=>s.length?`${s[0].id}_${s[s.length-1].id}`:l).join(s=>s.append("path").classed(e,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,l)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function TI({selection:t,seriesLabel:e,fullChartParams:n}){if(t.interrupt("highlight"),!e){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{r===e?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function AI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
51
|
+
----> find in '${n}'`}function DC({chartType:e,config:t,initFn:n}){const r=new Xr,i=new WeakMap;let o=()=>{},a;const s=new a0(t.defaultParams),l=new a0({}),u=s.pipe(bc(c=>l.pipe(A0(r),Ur(h=>{try{const{status:f,columnName:p,expectToBe:d}=t.validator(h,{validateColumns:A_});if(f==="error")throw new Error(PC({columnName:p,expectToBe:d,from:`${t.name}.params$`}));f==="warning"&&console.warn(CC({columnName:p,expectToBe:d,from:`${t.name}.params$`}))}catch(f){console.error(AC(f))}return Wu(h,c)}))),_C(1));return{params$:l,name:t.name,chartType:e,defaultParams:t.defaultParams,layerIndex:t.layerIndex,init(){a&&(o=n(a)??(()=>{}),i.set(a.selection,a))},destroy(){o(),a&&(a.selection.remove(),a=void 0),r.next(void 0)},setPresetParams:c=>{s.next(Wu(c,t.defaultParams))},setContext:c=>{a=c,a.observer.fullParams$=u}}}const Hr=e=>function(t){return function(n){return class{constructor(){const r=DC({chartType:e,config:t,initFn:n});this.params$=r.params$,this.name=r.name,this.chartType=r.chartType,this.defaultParams=r.defaultParams,this.layerIndex=r.layerIndex,this.init=r.init,this.destroy=r.destroy,this.setPresetParams=r.setPresetParams,this.setContext=r.setContext}}}},An=Hr("series"),lt=Hr("grid"),mt=Hr("multiGrid"),kt=Hr("multiValue"),es=Hr("relationship"),$c=Hr("tree");function we(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function k0(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ts(e){let t,n,r;e.length!==2?(t=we,n=(s,l)=>we(e(s),l),r=(s,l)=>e(s)-l):(t=e===we||e===k0?e:MC,n=e,r=e);function i(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const h=u+c>>>1;n(s[h],l)<0?u=h+1:c=h}while(u<c)}return u}function o(s,l,u=0,c=s.length){if(u<c){if(t(l,l)!==0)return c;do{const h=u+c>>>1;n(s[h],l)<=0?u=h+1:c=h}while(u<c)}return u}function a(s,l,u=0,c=s.length){const h=i(s,l,u,c-1);return h>u&&r(s[h-1],l)>-r(s[h],l)?h-1:h}return{left:i,center:a,right:o}}function MC(){return 0}function ns(e){return e===null?NaN:+e}function*LC(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const R0=ts(we),E0=R0.right,kC=R0.left,RC=ts(ns).center,Kn=E0;function EC(e,t){if(!((t=+t)>=0))throw new RangeError("invalid r");let n=e.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!t)return e;const r=vc(t),i=e.slice();return r(e,i,0,n,1),r(i,e,0,n,1),r(e,i,0,n,1),e}const I0=B0(vc),IC=B0(BC);function B0(e){return function(t,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:a}=t;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!n&&!r)return t;const s=n&&e(n),l=r&&e(r),u=i.slice();return s&&l?(qr(s,u,i,o,a),qr(s,i,u,o,a),qr(s,u,i,o,a),Zr(l,i,u,o,a),Zr(l,u,i,o,a),Zr(l,i,u,o,a)):s?(qr(s,i,u,o,a),qr(s,u,i,o,a),qr(s,i,u,o,a)):l&&(Zr(l,i,u,o,a),Zr(l,u,i,o,a),Zr(l,i,u,o,a)),t}}function qr(e,t,n,r,i){for(let o=0,a=r*i;o<a;)e(t,n,o,o+=r,1)}function Zr(e,t,n,r,i){for(let o=0,a=r*i;o<r;++o)e(t,n,o,o+a,r)}function BC(e){const t=vc(e);return(n,r,i,o,a)=>{i<<=2,o<<=2,a<<=2,t(n,r,i+0,o+0,a),t(n,r,i+1,o+1,a),t(n,r,i+2,o+2,a),t(n,r,i+3,o+3,a)}}function vc(e){const t=Math.floor(e);if(t===e)return NC(e);const n=e-t,r=2*e+1;return(i,o,a,s,l)=>{if(!((s-=l)>=a))return;let u=t*o[a];const c=l*t,h=c+l;for(let f=a,p=a+c;f<p;f+=l)u+=o[Math.min(s,f)];for(let f=a,p=s;f<=p;f+=l)u+=o[Math.min(s,f+c)],i[f]=(u+n*(o[Math.max(a,f-h)]+o[Math.min(s,f+h)]))/r,u-=o[Math.max(a,f-c)]}}function NC(e){const t=2*e+1;return(n,r,i,o,a)=>{if(!((o-=a)>=i))return;let s=e*r[i];const l=a*e;for(let u=i,c=i+l;u<c;u+=a)s+=r[Math.min(o,u)];for(let u=i,c=o;u<=c;u+=a)s+=r[Math.min(o,u+l)],n[u]=s/t,s-=r[Math.max(i,u-l)]}}function rs(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function FC(e){return e.length|0}function zC(e){return!(e>0)}function OC(e){return typeof e!="object"||"length"in e?e:Array.from(e)}function GC(e){return t=>e(...t)}function WC(...e){const t=typeof e[e.length-1]=="function"&&GC(e.pop());e=e.map(OC);const n=e.map(FC),r=e.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(zC))return o;for(;;){o.push(i.map((s,l)=>e[l][s]));let a=r;for(;++i[a]===n[a];){if(a===0)return t?o.map(t):o;i[a--]=0}}}function YC(e,t){var n=0,r=0;return Float64Array.from(e,t===void 0?i=>n+=+i||0:i=>n+=+t(i,r++,e)||0)}function N0(e,t){let n=0,r,i=0,o=0;if(t===void 0)for(let a of e)a!=null&&(a=+a)>=a&&(r=a-i,i+=r/++n,o+=r*(a-i));else{let a=-1;for(let s of e)(s=t(s,++a,e))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,o+=r*(s-i))}if(n>1)return o/(n-1)}function F0(e,t){const n=N0(e,t);return n&&Math.sqrt(n)}function oo(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class ke{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const o=n[i],a=t+o,s=Math.abs(t)<Math.abs(o)?t-(a-o):o-(a-t);s&&(n[r++]=s),t=a}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,o,a=0;if(n>0){for(a=t[--n];n>0&&(r=a,i=t[--n],a=r+i,o=i-(a-r),!o););n>0&&(o<0&&t[n-1]<0||o>0&&t[n-1]>0)&&(i=o*2,r=a+i,i==r-a&&(a=r))}return a}}function VC(e,t){const n=new ke;if(t===void 0)for(let r of e)(r=+r)&&n.add(r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function jC(e,t){const n=new ke;let r=-1;return Float64Array.from(e,t===void 0?i=>n.add(+i||0):i=>n.add(+t(i,++r,e)||0))}class ao extends Map{constructor(t,n=G0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Sc(this,t))}has(t){return super.has(Sc(this,t))}set(t,n){return super.set(z0(this,t),n)}delete(t){return super.delete(O0(this,t))}}class Qn extends Set{constructor(t,n=G0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const r of t)this.add(r)}has(t){return super.has(Sc(this,t))}add(t){return super.add(z0(this,t))}delete(t){return super.delete(O0(this,t))}}function Sc({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function z0({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function O0({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function G0(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Kr(e){return e}function W0(e,...t){return Qr(e,Kr,Kr,t)}function Y0(e,...t){return Qr(e,Array.from,Kr,t)}function V0(e,t){for(let n=1,r=t.length;n<r;++n)e=e.flatMap(i=>i.pop().map(([o,a])=>[...i,o,a]));return e}function XC(e,...t){return V0(Y0(e,...t),t)}function UC(e,t,...n){return V0(X0(e,t,...n),n)}function j0(e,t,...n){return Qr(e,Kr,t,n)}function X0(e,t,...n){return Qr(e,Array.from,t,n)}function HC(e,...t){return Qr(e,Kr,U0,t)}function qC(e,...t){return Qr(e,Array.from,U0,t)}function U0(e){if(e.length!==1)throw new Error("duplicate key");return e[0]}function Qr(e,t,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new ao,l=r[a++];let u=-1;for(const c of o){const h=l(c,++u,o),f=s.get(h);f?f.push(c):s.set(h,[c])}for(const[c,h]of s)s.set(c,i(h,a));return t(s)}(e,0)}function H0(e,t){return Array.from(t,n=>e[n])}function _c(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[n]=t;if(n&&n.length!==2||t.length>1){const r=Uint32Array.from(e,(i,o)=>o);return t.length>1?(t=t.map(i=>e.map(i)),r.sort((i,o)=>{for(const a of t){const s=Jr(a[i],a[o]);if(s)return s}})):(n=e.map(n),r.sort((i,o)=>Jr(n[i],n[o]))),H0(e,r)}return e.sort(wc(n))}function wc(e=we){if(e===we)return Jr;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Jr(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}function ZC(e,t,n){return(t.length!==2?_c(j0(e,t,n),([r,i],[o,a])=>we(i,a)||we(r,o)):_c(W0(e,n),([r,i],[o,a])=>t(i,a)||we(r,o))).map(([r])=>r)}var KC=Array.prototype,QC=KC.slice;function Tc(e){return()=>e}const JC=Math.sqrt(50),eD=Math.sqrt(10),tD=Math.sqrt(2);function is(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=JC?10:o>=eD?5:o>=tD?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?is(e,t,n*2):[s,l,u]}function Jn(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?is(t,e,n):is(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u<s;++u)l[u]=(o-u)/-a;else for(let u=0;u<s;++u)l[u]=(o-u)*a;else if(a<0)for(let u=0;u<s;++u)l[u]=(i+u)/-a;else for(let u=0;u<s;++u)l[u]=(i+u)*a;return l}function er(e,t,n){return t=+t,e=+e,n=+n,is(e,t,n)[2]}function os(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?er(t,e,n):er(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function Ac(e,t,n){let r;for(;;){const i=er(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function Pc(e){return Math.max(1,Math.ceil(Math.log(rs(e))/Math.LN2)+1)}function q0(){var e=Kr,t=oo,n=Pc;function r(i){Array.isArray(i)||(i=Array.from(i));var o,a=i.length,s,l,u=new Array(a);for(o=0;o<a;++o)u[o]=e(i[o],o,i);var c=t(u),h=c[0],f=c[1],p=n(u,h,f);if(!Array.isArray(p)){const x=f,$=+p;if(t===oo&&([h,f]=Ac(h,f,$)),p=Jn(h,f,$),p[0]<=h&&(l=er(h,f,$)),p[p.length-1]>=f)if(x>=f&&t===oo){const S=er(h,f,$);isFinite(S)&&(S>0?f=(Math.floor(f/S)+1)*S:S<0&&(f=(Math.ceil(f*-S)+1)/-S))}else p.pop()}for(var d=p.length,g=0,m=d;p[g]<=h;)++g;for(;p[m-1]>f;)--m;(g||m<d)&&(p=p.slice(g,m),d=m-g);var b=new Array(d+1),y;for(o=0;o<=d;++o)y=b[o]=[],y.x0=o>0?p[o-1]:h,y.x1=o<d?p[o]:f;if(isFinite(l)){if(l>0)for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=f&&b[Math.min(d,Math.floor((s-h)/l))].push(i[o]);else if(l<0){for(o=0;o<a;++o)if((s=u[o])!=null&&h<=s&&s<=f){const x=Math.floor((h-s)*l);b[Math.min(d,x+(p[x]<=s))].push(i[o])}}}else for(o=0;o<a;++o)(s=u[o])!=null&&h<=s&&s<=f&&b[Kn(p,s,0,d)].push(i[o]);return b}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Tc(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Tc([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Tc(Array.isArray(i)?QC.call(i):i),r):n},r}function so(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Cc(e,t){let n,r=-1,i=-1;if(t===void 0)for(const o of e)++i,o!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of e)(o=t(o,++i,e))!=null&&(n<o||n===void 0&&o>=o)&&(n=o,r=i);return r}function as(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Dc(e,t){let n,r=-1,i=-1;if(t===void 0)for(const o of e)++i,o!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);else for(let o of e)(o=t(o,++i,e))!=null&&(n>o||n===void 0&&o>=o)&&(n=o,r=i);return r}function ss(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Jr:wc(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(l-h)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(t-u*h/l+f)),d=Math.min(r,Math.floor(t+(l-u)*h/l+f));ss(e,t,p,d,i)}const o=e[t];let a=n,s=r;for(lo(e,n,t),i(e[r],o)>0&&lo(e,n,r);a<s;){for(lo(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?lo(e,n,s):(++s,lo(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function lo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Z0(e,t=we){let n,r=!1;if(t.length===1){let i;for(const o of e){const a=t(o);(r?we(a,i)>0:we(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of e)(r?t(i,n)>0:t(i,i)===0)&&(n=i,r=!0);return n}function uo(e,t,n){if(e=Float64Array.from(LC(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return as(e);if(t>=1)return so(e);var r,i=(r-1)*t,o=Math.floor(i),a=so(ss(e,o).subarray(0,o+1)),s=as(e.subarray(o+1));return a+(s-a)*(i-o)}}function K0(e,t,n=ns){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function Q0(e,t,n=ns){if(!isNaN(t=+t)){if(r=Float64Array.from(e,(s,l)=>ns(n(e[l],l,e))),t<=0)return Dc(r);if(t>=1)return Cc(r);var r,i=Uint32Array.from(e,(s,l)=>l),o=r.length-1,a=Math.floor(o*t);return ss(i,a,0,o,(s,l)=>Jr(r[s],r[l])),a=Z0(i.subarray(0,a+1),s=>r[s]),a>=0?a:-1}}function nD(e,t,n){const r=rs(e),i=uo(e,.75)-uo(e,.25);return r&&i?Math.ceil((n-t)/(2*i*Math.pow(r,-1/3))):1}function rD(e,t,n){const r=rs(e),i=F0(e);return r&&i?Math.ceil((n-t)*Math.cbrt(r)/(3.49*i)):1}function iD(e,t){let n=0,r=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let o of e)(o=t(o,++i,e))!=null&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function oD(e,t){return uo(e,.5,t)}function aD(e,t){return Q0(e,.5,t)}function*sD(e){for(const t of e)yield*t}function Mc(e){return Array.from(sD(e))}function lD(e,t){const n=new ao;if(t===void 0)for(let o of e)o!=null&&o>=o&&n.set(o,(n.get(o)||0)+1);else{let o=-1;for(let a of e)(a=t(a,++o,e))!=null&&a>=a&&n.set(a,(n.get(a)||0)+1)}let r,i=0;for(const[o,a]of n)a>i&&(i=a,r=o);return r}function uD(e,t=cD){const n=[];let r,i=!1;for(const o of e)i&&n.push(t(r,o)),r=o,i=!0;return n}function cD(e,t){return[e,t]}function Pn(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function fD(e,t=we){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let n=Array.from(e);const r=new Float64Array(n.length);t.length!==2&&(n=n.map(t),t=we);const i=(s,l)=>t(n[s],n[l]);let o,a;return e=Uint32Array.from(n,(s,l)=>l),e.sort(t===we?(s,l)=>Jr(n[s],n[l]):wc(i)),e.forEach((s,l)=>{const u=i(s,o===void 0?s:o);u>=0?((o===void 0||u>0)&&(o=s,a=l),r[s]=a):r[s]=NaN}),r}function hD(e,t=we){let n,r=!1;if(t.length===1){let i;for(const o of e){const a=t(o);(r?we(a,i)<0:we(a,a)===0)&&(n=o,i=a,r=!0)}}else for(const i of e)(r?t(i,n)<0:t(i,i)===0)&&(n=i,r=!0);return n}function J0(e,t=we){if(t.length===1)return Dc(e,t);let n,r=-1,i=-1;for(const o of e)++i,(r<0?t(o,o)===0:t(o,n)<0)&&(n=o,r=i);return r}function pD(e,t=we){if(t.length===1)return Cc(e,t);let n,r=-1,i=-1;for(const o of e)++i,(r<0?t(o,o)===0:t(o,n)>0)&&(n=o,r=i);return r}function dD(e,t){const n=J0(e,t);return n<0?void 0:n}const gD=em(Math.random);function em(e){return function(n,r=0,i=n.length){let o=i-(r=+r);for(;o;){const a=e()*o--|0,s=n[o+r];n[o+r]=n[a+r],n[a+r]=s}return n}}function Lc(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function tm(e){if(!(o=e.length))return[];for(var t=-1,n=as(e,mD),r=new Array(n);++t<n;)for(var i=-1,o,a=r[t]=new Array(o);++i<o;)a[i]=e[i][t];return r}function mD(e){return e.length}function yD(){return tm(arguments)}function bD(e,t){if(typeof t!="function")throw new TypeError("test is not a function");let n=-1;for(const r of e)if(!t(r,++n,e))return!1;return!0}function xD(e,t){if(typeof t!="function")throw new TypeError("test is not a function");let n=-1;for(const r of e)if(t(r,++n,e))return!0;return!1}function $D(e,t){if(typeof t!="function")throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of e)t(i,++r,e)&&n.push(i);return n}function vD(e,t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof t!="function")throw new TypeError("mapper is not a function");return Array.from(e,(n,r)=>t(n,r,e))}function SD(e,t,n){if(typeof t!="function")throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if({done:i,value:n}=r.next(),i)return;++a}for(;{done:i,value:o}=r.next(),!i;)n=t(n,o,++a,e);return n}function _D(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(e).reverse()}function wD(e,...t){e=new Qn(e);for(const n of t)for(const r of n)e.delete(r);return e}function TD(e,t){const n=t[Symbol.iterator](),r=new Qn;for(const i of e){if(r.has(i))return!1;let o,a;for(;({value:o,done:a}=n.next())&&!a;){if(Object.is(i,o))return!1;r.add(o)}}return!0}function AD(e,...t){e=new Qn(e),t=t.map(PD);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e}function PD(e){return e instanceof Qn?e:new Qn(e)}function nm(e,t){const n=e[Symbol.iterator](),r=new Set;for(const i of t){const o=rm(i);if(r.has(o))continue;let a,s;for(;{value:a,done:s}=n.next();){if(s)return!1;const l=rm(a);if(r.add(l),Object.is(o,l))break}}return!0}function rm(e){return e!==null&&typeof e=="object"?e.valueOf():e}function CD(e,t){return nm(t,e)}function DD(...e){const t=new Qn;for(const n of e)for(const r of n)t.add(r);return t}function MD(e){return e}var ls=1,us=2,kc=3,co=4,im=1e-6;function LD(e){return"translate("+e+",0)"}function kD(e){return"translate(0,"+e+")"}function RD(e){return t=>+e(t)}function ED(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function ID(){return!this.__axis}function cs(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===ls||e===co?-1:1,c=e===co||e===us?"x":"y",h=e===ls||e===kc?LD:kD;function f(p){var d=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):MD),m=Math.max(o,0)+s,b=t.range(),y=+b[0]+l,x=+b[b.length-1]+l,$=(t.bandwidth?ED:RD)(t.copy(),l),S=p.selection?p.selection():p,A=S.selectAll(".domain").data([null]),_=S.selectAll(".tick").data(d,t).order(),P=_.exit(),M=_.enter().append("g").attr("class","tick"),R=_.select("line"),v=_.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(M),R=R.merge(M.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),v=v.merge(M.append("text").attr("fill","currentColor").attr(c,u*m).attr("dy",e===ls?"0em":e===kc?"0.71em":"0.32em")),p!==S&&(A=A.transition(p),_=_.transition(p),R=R.transition(p),v=v.transition(p),P=P.transition(p).attr("opacity",im).attr("transform",function(E){return isFinite(E=$(E))?h(E+l):this.getAttribute("transform")}),M.attr("opacity",im).attr("transform",function(E){var k=this.parentNode.__axis;return h((k&&isFinite(k=k(E))?k:$(E))+l)})),P.remove(),A.attr("d",e===co||e===us?a?"M"+u*a+","+y+"H"+l+"V"+x+"H"+u*a:"M"+l+","+y+"V"+x:a?"M"+y+","+u*a+"V"+l+"H"+x+"V"+u*a:"M"+y+","+l+"H"+x),_.attr("opacity",1).attr("transform",function(E){return h($(E)+l)}),R.attr(c+"2",u*o),v.attr(c,u*m).text(g),S.filter(ID).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===us?"start":e===co?"end":"middle"),S.each(function(){this.__axis=$})}return f.scale=function(p){return arguments.length?(t=p,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),f):n.slice()},f.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),f):r&&r.slice()},f.tickFormat=function(p){return arguments.length?(i=p,f):i},f.tickSize=function(p){return arguments.length?(o=a=+p,f):o},f.tickSizeInner=function(p){return arguments.length?(o=+p,f):o},f.tickSizeOuter=function(p){return arguments.length?(a=+p,f):a},f.tickPadding=function(p){return arguments.length?(s=+p,f):s},f.offset=function(p){return arguments.length?(l=+p,f):l},f}function Rc(e){return cs(ls,e)}function BD(e){return cs(us,e)}function om(e){return cs(kc,e)}function Ec(e){return cs(co,e)}var ND={value:()=>{}};function tr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new fs(n)}function fs(e){this._=e}function FD(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}fs.prototype=tr.prototype={constructor:fs,on:function(e,t){var n=this._,r=FD(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=zD(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=am(n[i],e.name,t);else if(t==null)for(i in n)n[i]=am(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new fs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function zD(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function am(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=ND,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ic="http://www.w3.org/1999/xhtml";const Bc={svg:"http://www.w3.org/2000/svg",xhtml:Ic,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Bc.hasOwnProperty(t)?{space:Bc[t],local:e}:e}function OD(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ic&&t.documentElement.namespaceURI===Ic?t.createElement(e):t.createElementNS(n,e)}}function GD(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function hs(e){var t=fo(e);return(t.local?GD:OD)(t)}function WD(){}function ps(e){return e==null?WD:function(){return this.querySelector(e)}}function YD(e){typeof e!="function"&&(e=ps(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),l,u,c=0;c<a;++c)(l=o[c])&&(u=e.call(l,l.__data__,c,o))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Ue(r,this._parents)}function sm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function VD(){return[]}function Nc(e){return e==null?VD:function(){return this.querySelectorAll(e)}}function jD(e){return function(){return sm(e.apply(this,arguments))}}function XD(e){typeof e=="function"?e=jD(e):e=Nc(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new Ue(r,i)}function Fc(e){return function(){return this.matches(e)}}function lm(e){return function(t){return t.matches(e)}}var UD=Array.prototype.find;function HD(e){return function(){return UD.call(this.children,e)}}function qD(){return this.firstElementChild}function ZD(e){return this.select(e==null?qD:HD(typeof e=="function"?e:lm(e)))}var KD=Array.prototype.filter;function QD(){return Array.from(this.children)}function JD(e){return function(){return KD.call(this.children,e)}}function eM(e){return this.selectAll(e==null?QD:JD(typeof e=="function"?e:lm(e)))}function tM(e){typeof e!="function"&&(e=Fc(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Ue(r,this._parents)}function um(e){return new Array(e.length)}function nM(){return new Ue(this._enter||this._groups.map(um),this._parents)}function ds(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ds.prototype={constructor:ds,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function rM(e){return function(){return e}}function iM(e,t,n,r,i,o){for(var a=0,s,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new ds(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function oM(e,t,n,r,i,o,a){var s,l,u=new Map,c=t.length,h=o.length,f=new Array(c),p;for(s=0;s<c;++s)(l=t[s])&&(f[s]=p=a.call(l,l.__data__,s,t)+"",u.has(p)?i[s]=l:u.set(p,l));for(s=0;s<h;++s)p=a.call(e,o[s],s,o)+"",(l=u.get(p))?(r[s]=l,l.__data__=o[s],u.delete(p)):n[s]=new ds(e,o[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function aM(e){return e.__data__}function sM(e,t){if(!arguments.length)return Array.from(this,aM);var n=t?oM:iM,r=this._parents,i=this._groups;typeof e!="function"&&(e=rM(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var c=r[u],h=i[u],f=h.length,p=lM(e.call(c,c&&c.__data__,u,r)),d=p.length,g=s[u]=new Array(d),m=a[u]=new Array(d),b=l[u]=new Array(f);n(c,h,g,m,b,p,t);for(var y=0,x=0,$,S;y<d;++y)if($=g[y]){for(y>=x&&(x=y+1);!(S=m[x])&&++x<d;);$._next=S||null}}return a=new Ue(a,r),a._enter=s,a._exit=l,a}function lM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function uM(){return new Ue(this._exit||this._groups.map(um),this._parents)}function cM(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function fM(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],c=r[l],h=u.length,f=s[l]=new Array(h),p,d=0;d<h;++d)(p=u[d]||c[d])&&(f[d]=p);for(;l<i;++l)s[l]=n[l];return new Ue(s,this._parents)}function hM(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function pM(e){e||(e=dM);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Ue(i,this._parents).order()}function dM(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function gM(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function mM(){return Array.from(this)}function yM(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function bM(){let e=0;for(const t of this)++e;return e}function xM(){return!this.node()}function $M(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function vM(e){return function(){this.removeAttribute(e)}}function SM(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _M(e,t){return function(){this.setAttribute(e,t)}}function wM(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function TM(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function AM(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function PM(e,t){var n=fo(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?SM:vM:typeof t=="function"?n.local?AM:TM:n.local?wM:_M)(n,t))}function zc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function CM(e){return function(){this.style.removeProperty(e)}}function DM(e,t,n){return function(){this.style.setProperty(e,t,n)}}function MM(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function LM(e,t,n){return arguments.length>1?this.each((t==null?CM:typeof t=="function"?MM:DM)(e,t,n??"")):nr(this.node(),e)}function nr(e,t){return e.style.getPropertyValue(t)||zc(e).getComputedStyle(e,null).getPropertyValue(t)}function kM(e){return function(){delete this[e]}}function RM(e,t){return function(){this[e]=t}}function EM(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function IM(e,t){return arguments.length>1?this.each((t==null?kM:typeof t=="function"?EM:RM)(e,t)):this.node()[e]}function cm(e){return e.trim().split(/^|\s+/)}function Oc(e){return e.classList||new fm(e)}function fm(e){this._node=e,this._names=cm(e.getAttribute("class")||"")}fm.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function hm(e,t){for(var n=Oc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function pm(e,t){for(var n=Oc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function BM(e){return function(){hm(this,e)}}function NM(e){return function(){pm(this,e)}}function FM(e,t){return function(){(t.apply(this,arguments)?hm:pm)(this,e)}}function zM(e,t){var n=cm(e+"");if(arguments.length<2){for(var r=Oc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?FM:t?BM:NM)(n,t))}function OM(){this.textContent=""}function GM(e){return function(){this.textContent=e}}function WM(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function YM(e){return arguments.length?this.each(e==null?OM:(typeof e=="function"?WM:GM)(e)):this.node().textContent}function VM(){this.innerHTML=""}function jM(e){return function(){this.innerHTML=e}}function XM(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function UM(e){return arguments.length?this.each(e==null?VM:(typeof e=="function"?XM:jM)(e)):this.node().innerHTML}function HM(){this.nextSibling&&this.parentNode.appendChild(this)}function qM(){return this.each(HM)}function ZM(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function KM(){return this.each(ZM)}function QM(e){var t=typeof e=="function"?e:hs(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function JM(){return null}function eL(e,t){var n=typeof e=="function"?e:hs(e),r=t==null?JM:typeof t=="function"?t:ps(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function tL(){var e=this.parentNode;e&&e.removeChild(this)}function nL(){return this.each(tL)}function rL(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function iL(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oL(e){return this.select(e?iL:rL)}function aL(e){return arguments.length?this.property("__data__",e):this.node().__data__}function sL(e){return function(t){e.call(this,t,this.__data__)}}function lL(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function uL(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function cL(e,t,n){return function(){var r=this.__on,i,o=sL(t);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function fL(e,t,n){var r=lL(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(i=0,c=s[l];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?cL:uL,i=0;i<o;++i)this.each(s(r[i],t,n));return this}function dm(e,t,n){var r=zc(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function hL(e,t){return function(){return dm(this,e,t)}}function pL(e,t){return function(){return dm(this,e,t.apply(this,arguments))}}function dL(e,t){return this.each((typeof t=="function"?pL:hL)(e,t))}function*gL(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Gc=[null];function Ue(e,t){this._groups=e,this._parents=t}function rr(){return new Ue([[document.documentElement]],Gc)}function mL(){return this}Ue.prototype=rr.prototype={constructor:Ue,select:YD,selectAll:XD,selectChild:ZD,selectChildren:eM,filter:tM,data:sM,enter:nM,exit:uM,join:cM,merge:fM,selection:mL,order:hM,sort:pM,call:gM,nodes:mM,node:yM,size:bM,empty:xM,each:$M,attr:PM,style:LM,property:IM,classed:zM,text:YM,html:UM,raise:qM,lower:KM,append:QM,insert:eL,remove:nL,clone:oL,datum:aL,on:fL,dispatch:dL,[Symbol.iterator]:gL};function j(e){return typeof e=="string"?new Ue([[document.querySelector(e)]],[document.documentElement]):new Ue([[e]],Gc)}function yL(e){return j(hs(e).call(document.documentElement))}var bL=0;function gm(){return new Wc}function Wc(){this._="@"+(++bL).toString(36)}Wc.prototype=gm.prototype={constructor:Wc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function mm(e){let t;for(;t=e.sourceEvent;)e=t;return e}function yt(e,t){if(e=mm(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}function xL(e,t){return e.target&&(e=mm(e),t===void 0&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,n=>yt(n,t))}function $L(e){return typeof e=="string"?new Ue([document.querySelectorAll(e)],[document.documentElement]):new Ue([sm(e)],Gc)}const vL={passive:!1},ho={capture:!0,passive:!1};function Yc(e){e.stopImmediatePropagation()}function ei(e){e.preventDefault(),e.stopImmediatePropagation()}function gs(e){var t=e.document.documentElement,n=j(e).on("dragstart.drag",ei,ho);"onselectstart"in t?n.on("selectstart.drag",ei,ho):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ms(e,t){var n=e.document.documentElement,r=j(e).on("dragstart.drag",null);t&&(r.on("click.drag",ei,ho),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const ys=e=>()=>e;function Vc(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Vc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function SL(e){return!e.ctrlKey&&!e.button}function _L(){return this.parentNode}function wL(e,t){return t??{x:e.x,y:e.y}}function TL(){return navigator.maxTouchPoints||"ontouchstart"in this}function bs(){var e=SL,t=_L,n=wL,r=TL,i={},o=tr("start","drag","end"),a=0,s,l,u,c,h=0;function f($){$.on("mousedown.drag",p).filter(r).on("touchstart.drag",m).on("touchmove.drag",b,vL).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p($,S){if(!(c||!e.call(this,$,S))){var A=x(this,t.call(this,$,S),$,S,"mouse");A&&(j($.view).on("mousemove.drag",d,ho).on("mouseup.drag",g,ho),gs($.view),Yc($),u=!1,s=$.clientX,l=$.clientY,A("start",$))}}function d($){if(ei($),!u){var S=$.clientX-s,A=$.clientY-l;u=S*S+A*A>h}i.mouse("drag",$)}function g($){j($.view).on("mousemove.drag mouseup.drag",null),ms($.view,u),ei($),i.mouse("end",$)}function m($,S){if(e.call(this,$,S)){var A=$.changedTouches,_=t.call(this,$,S),P=A.length,M,R;for(M=0;M<P;++M)(R=x(this,_,$,S,A[M].identifier,A[M]))&&(Yc($),R("start",$,A[M]))}}function b($){var S=$.changedTouches,A=S.length,_,P;for(_=0;_<A;++_)(P=i[S[_].identifier])&&(ei($),P("drag",$,S[_]))}function y($){var S=$.changedTouches,A=S.length,_,P;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),_=0;_<A;++_)(P=i[S[_].identifier])&&(Yc($),P("end",$,S[_]))}function x($,S,A,_,P,M){var R=o.copy(),v=yt(M||A,S),E,k,T;if((T=n.call($,new Vc("beforestart",{sourceEvent:A,target:f,identifier:P,active:a,x:v[0],y:v[1],dx:0,dy:0,dispatch:R}),_))!=null)return E=T.x-v[0]||0,k=T.y-v[1]||0,function w(C,F,O){var B=v,N;switch(C){case"start":i[P]=w,N=a++;break;case"end":delete i[P],--a;case"drag":v=yt(O||F,S),N=a;break}R.call(C,$,new Vc(C,{sourceEvent:F,subject:T,target:f,identifier:P,active:N,x:v[0]+E,y:v[1]+k,dx:v[0]-B[0],dy:v[1]-B[1],dispatch:R}),_)}}return f.filter=function($){return arguments.length?(e=typeof $=="function"?$:ys(!!$),f):e},f.container=function($){return arguments.length?(t=typeof $=="function"?$:ys($),f):t},f.subject=function($){return arguments.length?(n=typeof $=="function"?$:ys($),f):n},f.touchable=function($){return arguments.length?(r=typeof $=="function"?$:ys(!!$),f):r},f.on=function(){var $=o.on.apply(o,arguments);return $===o?f:$},f.clickDistance=function($){return arguments.length?(h=($=+$)*$,f):Math.sqrt(h)},f}function ti(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function po(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Cn(){}var ir=.7,ni=1/ir,ri="\\s*([+-]?\\d+)\\s*",go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",AL=/^#([0-9a-f]{3,8})$/,PL=new RegExp(`^rgb\\(${ri},${ri},${ri}\\)$`),CL=new RegExp(`^rgb\\(${Xt},${Xt},${Xt}\\)$`),DL=new RegExp(`^rgba\\(${ri},${ri},${ri},${go}\\)$`),ML=new RegExp(`^rgba\\(${Xt},${Xt},${Xt},${go}\\)$`),LL=new RegExp(`^hsl\\(${go},${Xt},${Xt}\\)$`),kL=new RegExp(`^hsla\\(${go},${Xt},${Xt},${go}\\)$`),ym={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};ti(Cn,Dn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bm,formatHex:bm,formatHex8:RL,formatHsl:EL,formatRgb:xm,toString:xm});function bm(){return this.rgb().formatHex()}function RL(){return this.rgb().formatHex8()}function EL(){return wm(this).formatHsl()}function xm(){return this.rgb().formatRgb()}function Dn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=AL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$m(t):n===3?new Ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xs(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=PL.exec(e))?new Ie(t[1],t[2],t[3],1):(t=CL.exec(e))?new Ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=DL.exec(e))?xs(t[1],t[2],t[3],t[4]):(t=ML.exec(e))?xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=LL.exec(e))?_m(t[1],t[2]/100,t[3]/100,1):(t=kL.exec(e))?_m(t[1],t[2]/100,t[3]/100,t[4]):ym.hasOwnProperty(e)?$m(ym[e]):e==="transparent"?new Ie(NaN,NaN,NaN,0):null}function $m(e){return new Ie(e>>16&255,e>>8&255,e&255,1)}function xs(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ie(e,t,n,r)}function jc(e){return e instanceof Cn||(e=Dn(e)),e?(e=e.rgb(),new Ie(e.r,e.g,e.b,e.opacity)):new Ie}function ii(e,t,n,r){return arguments.length===1?jc(e):new Ie(e,t,n,r??1)}function Ie(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ti(Ie,ii,po(Cn,{brighter(e){return e=e==null?ni:Math.pow(ni,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ir:Math.pow(ir,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ie(or(this.r),or(this.g),or(this.b),$s(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:vm,formatHex:vm,formatHex8:IL,formatRgb:Sm,toString:Sm}));function vm(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}`}function IL(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}${ar((isNaN(this.opacity)?1:this.opacity)*255)}`}function Sm(){const e=$s(this.opacity);return`${e===1?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${e===1?")":`, ${e})`}`}function $s(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function or(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ar(e){return e=or(e),(e<16?"0":"")+e.toString(16)}function _m(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rt(e,t,n,r)}function wm(e){if(e instanceof Rt)return new Rt(e.h,e.s,e.l,e.opacity);if(e instanceof Cn||(e=Dn(e)),!e)return new Rt;if(e instanceof Rt)return e;e=e.rgb();var t=e.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?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Rt(a,s,l,e.opacity)}function vs(e,t,n,r){return arguments.length===1?wm(e):new Rt(e,t,n,r??1)}function Rt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ti(Rt,vs,po(Cn,{brighter(e){return e=e==null?ni:Math.pow(ni,e),new Rt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ir:Math.pow(ir,e),new Rt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ie(Xc(e>=240?e-240:e+120,i,r),Xc(e,i,r),Xc(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Rt(Tm(this.h),Ss(this.s),Ss(this.l),$s(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=$s(this.opacity);return`${e===1?"hsl(":"hsla("}${Tm(this.h)}, ${Ss(this.s)*100}%, ${Ss(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tm(e){return e=(e||0)%360,e<0?e+360:e}function Ss(e){return Math.max(0,Math.min(1,e||0))}function Xc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Am=Math.PI/180,Pm=180/Math.PI,_s=18,Cm=.96422,Dm=1,Mm=.82521,Lm=4/29,oi=6/29,km=3*oi*oi,BL=oi*oi*oi;function Rm(e){if(e instanceof Et)return new Et(e.l,e.a,e.b,e.opacity);if(e instanceof Ut)return Im(e);e instanceof Ie||(e=jc(e));var t=Zc(e.r),n=Zc(e.g),r=Zc(e.b),i=Uc((.2225045*t+.7168786*n+.0606169*r)/Dm),o,a;return t===n&&n===r?o=a=i:(o=Uc((.4360747*t+.3850649*n+.1430804*r)/Cm),a=Uc((.0139322*t+.0971045*n+.7141733*r)/Mm)),new Et(116*i-16,500*(o-i),200*(i-a),e.opacity)}function NL(e,t){return new Et(e,0,0,t??1)}function mo(e,t,n,r){return arguments.length===1?Rm(e):new Et(e,t,n,r??1)}function Et(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ti(Et,mo,po(Cn,{brighter(e){return new Et(this.l+_s*(e??1),this.a,this.b,this.opacity)},darker(e){return new Et(this.l-_s*(e??1),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 t=Cm*Hc(t),e=Dm*Hc(e),n=Mm*Hc(n),new Ie(qc(3.1338561*t-1.6168667*e-.4906146*n),qc(-.9787684*t+1.9161415*e+.033454*n),qc(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Uc(e){return e>BL?Math.pow(e,1/3):e/km+Lm}function Hc(e){return e>oi?e*e*e:km*(e-Lm)}function qc(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Zc(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Em(e){if(e instanceof Ut)return new Ut(e.h,e.c,e.l,e.opacity);if(e instanceof Et||(e=Rm(e)),e.a===0&&e.b===0)return new Ut(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Pm;return new Ut(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function FL(e,t,n,r){return arguments.length===1?Em(e):new Ut(n,t,e,r??1)}function ws(e,t,n,r){return arguments.length===1?Em(e):new Ut(e,t,n,r??1)}function Ut(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Im(e){if(isNaN(e.h))return new Et(e.l,0,0,e.opacity);var t=e.h*Am;return new Et(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ti(Ut,ws,po(Cn,{brighter(e){return new Ut(this.h,this.c,this.l+_s*(e??1),this.opacity)},darker(e){return new Ut(this.h,this.c,this.l-_s*(e??1),this.opacity)},rgb(){return Im(this).rgb()}}));var Bm=-.14861,Kc=1.78277,Qc=-.29227,Ts=-.90649,yo=1.97294,Nm=yo*Ts,Fm=yo*Kc,zm=Kc*Qc-Ts*Bm;function zL(e){if(e instanceof sr)return new sr(e.h,e.s,e.l,e.opacity);e instanceof Ie||(e=jc(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(zm*r+Nm*t-Fm*n)/(zm+Nm-Fm),o=r-i,a=(yo*(n-i)-Qc*o)/Ts,s=Math.sqrt(a*a+o*o)/(yo*i*(1-i)),l=s?Math.atan2(a,o)*Pm-120:NaN;return new sr(l<0?l+360:l,s,i,e.opacity)}function It(e,t,n,r){return arguments.length===1?zL(e):new sr(e,t,n,r??1)}function sr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ti(sr,It,po(Cn,{brighter(e){return e=e==null?ni:Math.pow(ni,e),new sr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ir:Math.pow(ir,e),new sr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Am,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Ie(255*(t+n*(Bm*r+Kc*i)),255*(t+n*(Qc*r+Ts*i)),255*(t+n*(yo*r)),this.opacity)}}));function Om(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}function Gm(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return Om((n-r/t)*t,a,i,o,s)}}function Wm(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return Om((n-r/t)*t,i,o,a,s)}}const As=e=>()=>e;function Ym(e,t){return function(n){return e+n*t}}function OL(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)}}function Ps(e,t){var n=t-e;return n?Ym(e,n>180||n<-180?n-360*Math.round(n/360):n):As(isNaN(e)?t:e)}function GL(e){return(e=+e)==1?Be:function(t,n){return n-t?OL(t,n,e):As(isNaN(t)?n:t)}}function Be(e,t){var n=t-e;return n?Ym(e,n):As(isNaN(e)?t:e)}const bo=function e(t){var n=GL(t);function r(i,o){var a=n((i=ii(i)).r,(o=ii(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=Be(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function Vm(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),o=new Array(n),a,s;for(a=0;a<n;++a)s=ii(t[a]),r[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return r=e(r),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=o(l),s+""}}}var jm=Vm(Gm),WL=Vm(Wm);function Jc(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function Xm(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function YL(e,t){return(Xm(t)?Jc:Um)(e,t)}function Um(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=sn(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Hm(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function bt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qm(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=sn(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ef=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tf=new RegExp(ef.source,"g");function VL(e){return function(){return e}}function jL(e){return function(t){return e(t)+""}}function nf(e,t){var n=ef.lastIndex=tf.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=ef.exec(e))&&(i=tf.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:bt(r,i)})),n=tf.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?jL(l[0].x):VL(t):(t=l.length,function(u){for(var c=0,h;c<t;++c)s[(h=l[c]).i]=h.x(u);return s.join("")})}function sn(e,t){var n=typeof t,r;return t==null||n==="boolean"?As(t):(n==="number"?bt:n==="string"?(r=Dn(t))?(t=r,bo):nf:t instanceof Dn?bo:t instanceof Date?Hm:Xm(t)?Jc:Array.isArray(t)?Um:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qm:bt)(e,t)}function XL(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function UL(e,t){var n=Ps(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function xo(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Zm=180/Math.PI,rf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Km(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Zm,skewX:Math.atan(l)*Zm,scaleX:a,scaleY:s}}var Cs;function HL(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?rf:Km(t.a,t.b,t.c,t.d,t.e,t.f)}function qL(e){return e==null||(Cs||(Cs=document.createElementNS("http://www.w3.org/2000/svg","g")),Cs.setAttribute("transform",e),!(e=Cs.transform.baseVal.consolidate()))?rf:(e=e.matrix,Km(e.a,e.b,e.c,e.d,e.e,e.f))}function Qm(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,c,h,f,p,d){if(u!==h||c!==f){var g=p.push("translate(",null,t,null,n);d.push({i:g-4,x:bt(u,h)},{i:g-2,x:bt(c,f)})}else(h||f)&&p.push("translate("+h+t+f+n)}function a(u,c,h,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:bt(u,c)})):c&&h.push(i(h)+"rotate("+c+r)}function s(u,c,h,f){u!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:bt(u,c)}):c&&h.push(i(h)+"skewX("+c+r)}function l(u,c,h,f,p,d){if(u!==h||c!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:bt(u,h)},{i:g-2,x:bt(c,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(u,c){var h=[],f=[];return u=e(u),c=e(c),o(u.translateX,u.translateY,c.translateX,c.translateY,h,f),a(u.rotate,c.rotate,h,f),s(u.skewX,c.skewX,h,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,h,f),u=c=null,function(p){for(var d=-1,g=f.length,m;++d<g;)h[(m=f[d]).i]=m.x(p);return h.join("")}}}var Jm=Qm(HL,"px, ","px)","deg)"),ey=Qm(qL,", ",")",")"),ZL=1e-12;function ty(e){return((e=Math.exp(e))+1/e)/2}function KL(e){return((e=Math.exp(e))-1/e)/2}function QL(e){return((e=Math.exp(2*e))-1)/(e+1)}const ny=function e(t,n,r){function i(o,a){var s=o[0],l=o[1],u=o[2],c=a[0],h=a[1],f=a[2],p=c-s,d=h-l,g=p*p+d*d,m,b;if(g<ZL)b=Math.log(f/u)/t,m=function(_){return[s+_*p,l+_*d,u*Math.exp(t*_*b)]};else{var y=Math.sqrt(g),x=(f*f-u*u+r*g)/(2*u*n*y),$=(f*f-u*u-r*g)/(2*f*n*y),S=Math.log(Math.sqrt(x*x+1)-x),A=Math.log(Math.sqrt($*$+1)-$);b=(A-S)/t,m=function(_){var P=_*b,M=ty(S),R=u/(n*y)*(M*QL(t*P+S)-KL(S));return[s+R*p,l+R*d,u*M/ty(t*P+S)]}}return m.duration=b*1e3*t/Math.SQRT2,m}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,l=s*s;return e(a,s,l)},i}(Math.SQRT2,2,4);function ry(e){return function(t,n){var r=e((t=vs(t)).h,(n=vs(n)).h),i=Be(t.s,n.s),o=Be(t.l,n.l),a=Be(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const JL=ry(Ps);var e3=ry(Be);function t3(e,t){var n=Be((e=mo(e)).l,(t=mo(t)).l),r=Be(e.a,t.a),i=Be(e.b,t.b),o=Be(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function iy(e){return function(t,n){var r=e((t=ws(t)).h,(n=ws(n)).h),i=Be(t.c,n.c),o=Be(t.l,n.l),a=Be(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}const n3=iy(Ps);var r3=iy(Be);function oy(e){return function t(n){n=+n;function r(i,o){var a=e((i=It(i)).h,(o=It(o)).h),s=Be(i.s,o.s),l=Be(i.l,o.l),u=Be(i.opacity,o.opacity);return function(c){return i.h=a(c),i.s=s(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=t,r}(1)}const i3=oy(Ps);var Ds=oy(Be);function ay(e,t){t===void 0&&(t=e,e=sn);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function o3(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var ai=0,$o=0,vo=0,sy=1e3,Ms,So,Ls=0,lr=0,ks=0,_o=typeof performance=="object"&&performance.now?performance:Date,ly=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function wo(){return lr||(ly(a3),lr=_o.now()+ks)}function a3(){lr=0}function To(){this._call=this._time=this._next=null}To.prototype=Rs.prototype={constructor:To,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?wo():+n)+(t==null?0:+t),!this._next&&So!==this&&(So?So._next=this:Ms=this,So=this),this._call=e,this._time=n,of()},stop:function(){this._call&&(this._call=null,this._time=1/0,of())}};function Rs(e,t,n){var r=new To;return r.restart(e,t,n),r}function uy(){wo(),++ai;for(var e=Ms,t;e;)(t=lr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ai}function cy(){lr=(Ls=_o.now())+ks,ai=$o=0;try{uy()}finally{ai=0,l3(),lr=0}}function s3(){var e=_o.now(),t=e-Ls;t>sy&&(ks-=t,Ls=e)}function l3(){for(var e,t=Ms,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ms=n);So=e,of(r)}function of(e){if(!ai){$o&&($o=clearTimeout($o));var t=e-lr;t>24?(e<1/0&&($o=setTimeout(cy,e-_o.now()-ks)),vo&&(vo=clearInterval(vo))):(vo||(Ls=_o.now(),vo=setInterval(s3,sy)),ai=1,ly(cy))}}function af(e,t,n){var r=new To;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}function u3(e,t,n){var r=new To,i=t;return t==null?(r.restart(e,t,n),r):(r._restart=r.restart,r.restart=function(o,a,s){a=+a,s=s==null?wo():+s,r._restart(function l(u){u+=i,r._restart(l,i+=a,s),o(u)},a,s)},r.restart(e,t,n),r)}var c3=tr("start","end","cancel","interrupt"),f3=[],fy=0,sf=1,lf=2,Es=3,hy=4,uf=5,Is=6;function Bs(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;h3(e,n,{name:t,index:r,group:i,on:c3,tween:f3,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:fy})}function cf(e,t){var n=Bt(e,t);if(n.state>fy)throw new Error("too late; already scheduled");return n}function Ht(e,t){var n=Bt(e,t);if(n.state>Es)throw new Error("too late; already running");return n}function Bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function h3(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Rs(o,0,n.time);function o(u){n.state=sf,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,h,f,p;if(n.state!==sf)return l();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Es)return af(a);p.state===hy?(p.state=Is,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c<t&&(p.state=Is,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[c])}if(af(function(){n.state===Es&&(n.state=hy,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=lf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===lf){for(n.state=Es,i=new Array(f=n.tween.length),c=0,h=-1;c<f;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=p);i.length=h+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=uf,1),h=-1,f=i.length;++h<f;)i[h].call(e,c);n.state===uf&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Is,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ur(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>lf&&r.state<uf,r.state=Is,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function p3(e){return this.each(function(){ur(this,e)})}function d3(e,t){var n,r;return function(){var i=Ht(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function g3(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Ht(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function m3(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Bt(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?d3:g3)(n,e,t))}function ff(e,t,n){var r=e._id;return e.each(function(){var i=Ht(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Bt(i,r).value[t]}}function py(e,t){var n;return(typeof t=="number"?bt:t instanceof Dn?bo:(n=Dn(t))?(t=n,bo):nf)(e,t)}function y3(e){return function(){this.removeAttribute(e)}}function b3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function x3(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function $3(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function v3(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function S3(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function _3(e,t){var n=fo(e),r=n==="transform"?ey:py;return this.attrTween(e,typeof t=="function"?(n.local?S3:v3)(n,r,ff(this,"attr."+e,t)):t==null?(n.local?b3:y3)(n):(n.local?$3:x3)(n,r,t))}function w3(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function T3(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function A3(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&T3(e,o)),n}return i._value=t,i}function P3(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&w3(e,o)),n}return i._value=t,i}function C3(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=fo(e);return this.tween(n,(r.local?A3:P3)(r,t))}function D3(e,t){return function(){cf(this,e).delay=+t.apply(this,arguments)}}function M3(e,t){return t=+t,function(){cf(this,e).delay=t}}function L3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?D3:M3)(t,e)):Bt(this.node(),t).delay}function k3(e,t){return function(){Ht(this,e).duration=+t.apply(this,arguments)}}function R3(e,t){return t=+t,function(){Ht(this,e).duration=t}}function E3(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?k3:R3)(t,e)):Bt(this.node(),t).duration}function I3(e,t){if(typeof t!="function")throw new Error;return function(){Ht(this,e).ease=t}}function B3(e){var t=this._id;return arguments.length?this.each(I3(t,e)):Bt(this.node(),t).ease}function N3(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ht(this,e).ease=n}}function F3(e){if(typeof e!="function")throw new Error;return this.each(N3(this._id,e))}function z3(e){typeof e!="function"&&(e=Fc(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new qt(r,this._parents,this._name,this._id)}function O3(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],c=l.length,h=a[s]=new Array(c),f,p=0;p<c;++p)(f=l[p]||u[p])&&(h[p]=f);for(;s<r;++s)a[s]=t[s];return new qt(a,this._parents,this._name,this._id)}function G3(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function W3(e,t,n){var r,i,o=G3(t)?cf:Ht;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function Y3(e,t){var n=this._id;return arguments.length<2?Bt(this.node(),n).on.on(e):this.each(W3(n,e,t))}function V3(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function j3(){return this.on("end.remove",V3(this._id))}function X3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ps(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),c,h,f=0;f<l;++f)(c=s[f])&&(h=e.call(c,c.__data__,f,s))&&("__data__"in c&&(h.__data__=c.__data__),u[f]=h,Bs(u[f],t,n,f,u,Bt(c,n)));return new qt(o,this._parents,t,n)}function U3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Nc(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,c,h=0;h<u;++h)if(c=l[h]){for(var f=e.call(c,c.__data__,h,l),p,d=Bt(c,n),g=0,m=f.length;g<m;++g)(p=f[g])&&Bs(p,t,n,g,f,d);o.push(f),a.push(c)}return new qt(o,a,t,n)}var H3=rr.prototype.constructor;function q3(){return new H3(this._groups,this._parents)}function Z3(e,t){var n,r,i;return function(){var o=nr(this,e),a=(this.style.removeProperty(e),nr(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function dy(e){return function(){this.style.removeProperty(e)}}function K3(e,t,n){var r,i=n+"",o;return function(){var a=nr(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function Q3(e,t,n){var r,i,o;return function(){var a=nr(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),nr(this,e))),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}function J3(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var l=Ht(this,e),u=l.on,c=l.value[o]==null?s||(s=dy(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),l.on=r}}function e5(e,t,n){var r=(e+="")=="transform"?Jm:py;return t==null?this.styleTween(e,Z3(e,r)).on("end.style."+e,dy(e)):typeof t=="function"?this.styleTween(e,Q3(e,r,ff(this,"style."+e,t))).each(J3(this._id,e)):this.styleTween(e,K3(e,r,t),n).on("end.style."+e,null)}function t5(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function n5(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&t5(e,a,n)),r}return o._value=t,o}function r5(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,n5(e,t,n??""))}function i5(e){return function(){this.textContent=e}}function o5(e){return function(){var t=e(this);this.textContent=t??""}}function a5(e){return this.tween("text",typeof e=="function"?o5(ff(this,"text",e)):i5(e==null?"":e+""))}function s5(e){return function(t){this.textContent=e.call(this,t)}}function l5(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&s5(i)),t}return r._value=e,r}function u5(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,l5(e))}function c5(){for(var e=this._name,t=this._id,n=my(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Bt(l,t);Bs(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new qt(r,this._parents,e,n)}function f5(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=Ht(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),i===0&&o()})}var h5=0;function qt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function gy(e){return rr().transition(e)}function my(){return++h5}var ln=rr.prototype;qt.prototype=gy.prototype={constructor:qt,select:X3,selectAll:U3,selectChild:ln.selectChild,selectChildren:ln.selectChildren,filter:z3,merge:O3,selection:q3,transition:c5,call:ln.call,nodes:ln.nodes,node:ln.node,size:ln.size,empty:ln.empty,each:ln.each,on:Y3,attr:_3,attrTween:C3,style:e5,styleTween:r5,text:a5,textTween:u5,remove:j3,tween:m3,delay:L3,duration:E3,ease:B3,easeVarying:F3,end:f5,[Symbol.iterator]:ln[Symbol.iterator]};const Zt=e=>+e;function p5(e){return e*e}function d5(e){return e*(2-e)}function yy(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function g5(e){return e*e*e}function m5(e){return--e*e*e+1}function Ao(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hf=3,y5=function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n}(hf),b5=function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n}(hf),by=function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n}(hf),xy=Math.PI,$y=xy/2;function x5(e){return+e==1?1:1-Math.cos(e*$y)}function $5(e){return Math.sin(e*$y)}function vy(e){return(1-Math.cos(xy*e))/2}function Mn(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function v5(e){return Mn(1-+e)}function S5(e){return 1-Mn(e)}function Sy(e){return((e*=2)<=1?Mn(1-e):2-Mn(e-1))/2}function _5(e){return 1-Math.sqrt(1-e*e)}function w5(e){return Math.sqrt(1- --e*e)}function _y(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var pf=4/11,T5=6/11,A5=8/11,P5=3/4,C5=9/11,D5=10/11,M5=15/16,L5=21/22,k5=63/64,Ns=1/pf/pf;function R5(e){return 1-Po(1-e)}function Po(e){return(e=+e)<pf?Ns*e*e:e<A5?Ns*(e-=T5)*e+P5:e<D5?Ns*(e-=C5)*e+M5:Ns*(e-=L5)*e+k5}function E5(e){return((e*=2)<=1?1-Po(1-e):Po(e-1)+1)/2}var df=1.70158,I5=function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n}(df),B5=function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n}(df),wy=function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n}(df),si=2*Math.PI,gf=1,mf=.3,N5=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=si);function i(o){return t*Mn(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return e(o,n*si)},i.period=function(o){return e(t,o)},i}(gf,mf),cr=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=si);function i(o){return 1-t*Mn(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return e(o,n*si)},i.period=function(o){return e(t,o)},i}(gf,mf),F5=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=si);function i(o){return((o=o*2-1)<0?t*Mn(-o)*Math.sin((r-o)/n):2-t*Mn(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return e(o,n*si)},i.period=function(o){return e(t,o)},i}(gf,mf),z5={time:null,delay:0,duration:250,ease:Ao};function O5(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function G5(e){var t,n;e instanceof qt?(t=e._id,e=e._name):(t=my(),(n=z5).time=wo(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&Bs(l,e,t,u,a,n||O5(l,t));return new qt(r,this._parents,e,t)}rr.prototype.interrupt=p3,rr.prototype.transition=G5;var W5=[null];function Y5(e,t){var n=e.__transition,r,i;if(n){t=t==null?null:t+"";for(i in n)if((r=n[i]).state>sf&&r.name===t)return new qt([[e]],W5,t,+i)}return null}const yf=e=>()=>e;function V5(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function j5(e){e.stopImmediatePropagation()}function bf(e){e.preventDefault(),e.stopImmediatePropagation()}var Ty={name:"drag"},xf={name:"space"},li={name:"handle"},ui={name:"center"};const{abs:Ay,max:Ge,min:We}=Math;function Py(e){return[+e[0],+e[1]]}function $f(e){return[Py(e[0]),Py(e[1])]}var Fs={name:"x",handles:["w","e"].map(Co),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},zs={name:"y",handles:["n","s"].map(Co),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},X5={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Co),input:function(e){return e==null?null:$f(e)},output:function(e){return e}},un={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Cy={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Dy={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},U5={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},H5={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Co(e){return{type:e}}function q5(e){return!e.ctrlKey&&!e.button}function Z5(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function K5(){return navigator.maxTouchPoints||"ontouchstart"in this}function vf(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Q5(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function J5(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function e6(){return Sf(Fs)}function t6(){return Sf(zs)}function n6(){return Sf(X5)}function Sf(e){var t=Z5,n=q5,r=K5,i=!0,o=tr("start","brush","end"),a=6,s;function l(m){var b=m.property("__brush",g).selectAll(".overlay").data([Co("overlay")]);b.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",un.overlay).merge(b).each(function(){var x=vf(this).extent;j(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([Co("selection")]).enter().append("rect").attr("class","selection").attr("cursor",un.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var y=m.selectAll(".handle").data(e.handles,function(x){return x.type});y.exit().remove(),y.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return un[x.type]}),m.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(r).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,b,y){m.tween?m.on("start.brush",function(x){c(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){c(this,arguments).end(x)}).tween("brush",function(){var x=this,$=x.__brush,S=c(x,arguments),A=$.selection,_=e.input(typeof b=="function"?b.apply(this,arguments):b,$.extent),P=sn(A,_);function M(R){$.selection=R===1&&_===null?null:P(R),u.call(x),S.brush()}return A!==null&&_!==null?M:M(1)}):m.each(function(){var x=this,$=arguments,S=x.__brush,A=e.input(typeof b=="function"?b.apply(x,$):b,S.extent),_=c(x,$).beforestart();ur(x),S.selection=A===null?null:A,u.call(x),_.start(y).brush(y).end(y)})},l.clear=function(m,b){l.move(m,null,b)};function u(){var m=j(this),b=vf(this).selection;b?(m.selectAll(".selection").style("display",null).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(y){return y.type[y.type.length-1]==="e"?b[1][0]-a/2:b[0][0]-a/2}).attr("y",function(y){return y.type[0]==="s"?b[1][1]-a/2:b[0][1]-a/2}).attr("width",function(y){return y.type==="n"||y.type==="s"?b[1][0]-b[0][0]+a:a}).attr("height",function(y){return y.type==="e"||y.type==="w"?b[1][1]-b[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(m,b,y){var x=m.__brush.emitter;return x&&(!y||!x.clean)?x:new h(m,b,y)}function h(m,b,y){this.that=m,this.args=b,this.state=m.__brush,this.active=0,this.clean=y}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,b){return this.starting?(this.starting=!1,this.emit("start",m,b)):this.emit("brush",m),this},brush:function(m,b){return this.emit("brush",m,b),this},end:function(m,b){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,b)),this},emit:function(m,b,y){var x=j(this.that).datum();o.call(m,this.that,new V5(m,{sourceEvent:b,target:l,selection:e.output(this.state.selection),mode:y,dispatch:o}),x)}};function f(m){if(s&&!m.touches||!n.apply(this,arguments))return;var b=this,y=m.target.__data__.type,x=(i&&m.metaKey?y="overlay":y)==="selection"?Ty:i&&m.altKey?ui:li,$=e===zs?null:U5[y],S=e===Fs?null:H5[y],A=vf(b),_=A.extent,P=A.selection,M=_[0][0],R,v,E=_[0][1],k,T,w=_[1][0],C,F,O=_[1][1],B,N,I=0,W=0,H,ie=$&&S&&i&&m.shiftKey,Y,ee,V=Array.from(m.touches||[m],ue=>{const De=ue.identifier;return ue=yt(ue,b),ue.point0=ue.slice(),ue.identifier=De,ue});ur(b);var J=c(b,arguments,!0).beforestart();if(y==="overlay"){P&&(H=!0);const ue=[V[0],V[1]||V[0]];A.selection=P=[[R=e===zs?M:We(ue[0][0],ue[1][0]),k=e===Fs?E:We(ue[0][1],ue[1][1])],[C=e===zs?w:Ge(ue[0][0],ue[1][0]),B=e===Fs?O:Ge(ue[0][1],ue[1][1])]],V.length>1&&me(m)}else R=P[0][0],k=P[0][1],C=P[1][0],B=P[1][1];v=R,T=k,F=C,N=B;var Z=j(b).attr("pointer-events","none"),ne=Z.selectAll(".overlay").attr("cursor",un[y]);if(m.touches)J.moved=U,J.ended=he;else{var le=j(m.view).on("mousemove.brush",U,!0).on("mouseup.brush",he,!0);i&&le.on("keydown.brush",Ee,!0).on("keyup.brush",ot,!0),gs(m.view)}u.call(b),J.start(m,x.name);function U(ue){for(const De of ue.changedTouches||[ue])for(const $a of V)$a.identifier===De.identifier&&($a.cur=yt(De,b));if(ie&&!Y&&!ee&&V.length===1){const De=V[0];Ay(De.cur[0]-De[0])>Ay(De.cur[1]-De[1])?ee=!0:Y=!0}for(const De of V)De.cur&&(De[0]=De.cur[0],De[1]=De.cur[1]);H=!0,bf(ue),me(ue)}function me(ue){const De=V[0],$a=De.point0;var Gn;switch(I=De[0]-$a[0],W=De[1]-$a[1],x){case xf:case Ty:{$&&(I=Ge(M-R,We(w-C,I)),v=R+I,F=C+I),S&&(W=Ge(E-k,We(O-B,W)),T=k+W,N=B+W);break}case li:{V[1]?($&&(v=Ge(M,We(w,V[0][0])),F=Ge(M,We(w,V[1][0])),$=1),S&&(T=Ge(E,We(O,V[0][1])),N=Ge(E,We(O,V[1][1])),S=1)):($<0?(I=Ge(M-R,We(w-R,I)),v=R+I,F=C):$>0&&(I=Ge(M-C,We(w-C,I)),v=R,F=C+I),S<0?(W=Ge(E-k,We(O-k,W)),T=k+W,N=B):S>0&&(W=Ge(E-B,We(O-B,W)),T=k,N=B+W));break}case ui:{$&&(v=Ge(M,We(w,R-I*$)),F=Ge(M,We(w,C+I*$))),S&&(T=Ge(E,We(O,k-W*S)),N=Ge(E,We(O,B+W*S)));break}}F<v&&($*=-1,Gn=R,R=C,C=Gn,Gn=v,v=F,F=Gn,y in Cy&&ne.attr("cursor",un[y=Cy[y]])),N<T&&(S*=-1,Gn=k,k=B,B=Gn,Gn=T,T=N,N=Gn,y in Dy&&ne.attr("cursor",un[y=Dy[y]])),A.selection&&(P=A.selection),Y&&(v=P[0][0],F=P[1][0]),ee&&(T=P[0][1],N=P[1][1]),(P[0][0]!==v||P[0][1]!==T||P[1][0]!==F||P[1][1]!==N)&&(A.selection=[[v,T],[F,N]],u.call(b),J.brush(ue,x.name))}function he(ue){if(j5(ue),ue.touches){if(ue.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else ms(ue.view,H),le.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Z.attr("pointer-events","all"),ne.attr("cursor",un.overlay),A.selection&&(P=A.selection),Q5(P)&&(A.selection=null,u.call(b)),J.end(ue,x.name)}function Ee(ue){switch(ue.keyCode){case 16:{ie=$&&S;break}case 18:{x===li&&($&&(C=F-I*$,R=v+I*$),S&&(B=N-W*S,k=T+W*S),x=ui,me(ue));break}case 32:{(x===li||x===ui)&&($<0?C=F-I:$>0&&(R=v-I),S<0?B=N-W:S>0&&(k=T-W),x=xf,ne.attr("cursor",un.selection),me(ue));break}default:return}bf(ue)}function ot(ue){switch(ue.keyCode){case 16:{ie&&(Y=ee=ie=!1,me(ue));break}case 18:{x===ui&&($<0?C=F:$>0&&(R=v),S<0?B=N:S>0&&(k=T),x=li,me(ue));break}case 32:{x===xf&&(ue.altKey?($&&(C=F-I*$,R=v+I*$),S&&(B=N-W*S,k=T+W*S),x=ui):($<0?C=F:$>0&&(R=v),S<0?B=N:S>0&&(k=T),x=li),ne.attr("cursor",un[y]),me(ue));break}default:return}bf(ue)}}function p(m){c(this,arguments).moved(m)}function d(m){c(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=$f(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:yf($f(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:yf(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:yf(!!m),l):r},l.handleSize=function(m){return arguments.length?(a=+m,l):a},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=o.on.apply(o,arguments);return m===o?l:m},l}var My=Math.abs,ci=Math.cos,fi=Math.sin,Ly=Math.PI,Os=Ly/2,ky=Ly*2,Ry=Math.max,_f=1e-12;function wf(e,t){return Array.from({length:t-e},(n,r)=>e+r)}function r6(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}function i6(){return Tf(!1,!1)}function o6(){return Tf(!1,!0)}function a6(){return Tf(!0,!1)}function Tf(e,t){var n=0,r=null,i=null,o=null;function a(s){var l=s.length,u=new Array(l),c=wf(0,l),h=new Array(l*l),f=new Array(l),p=0,d;s=Float64Array.from({length:l*l},t?(g,m)=>s[m%l][m/l|0]:(g,m)=>s[m/l|0][m%l]);for(let g=0;g<l;++g){let m=0;for(let b=0;b<l;++b)m+=s[g*l+b]+e*s[b*l+g];p+=u[g]=m}p=Ry(0,ky-n*l)/p,d=p?n:ky/l;{let g=0;r&&c.sort((m,b)=>r(u[m],u[b]));for(const m of c){const b=g;if(e){const y=wf(~l+1,l).filter(x=>x<0?s[~x*l+m]:s[m*l+x]);i&&y.sort((x,$)=>i(x<0?-s[~x*l+m]:s[m*l+x],$<0?-s[~$*l+m]:s[m*l+$]));for(const x of y)if(x<0){const $=h[~x*l+m]||(h[~x*l+m]={source:null,target:null});$.target={index:m,startAngle:g,endAngle:g+=s[~x*l+m]*p,value:s[~x*l+m]}}else{const $=h[m*l+x]||(h[m*l+x]={source:null,target:null});$.source={index:m,startAngle:g,endAngle:g+=s[m*l+x]*p,value:s[m*l+x]}}f[m]={index:m,startAngle:b,endAngle:g,value:u[m]}}else{const y=wf(0,l).filter(x=>s[m*l+x]||s[x*l+m]);i&&y.sort((x,$)=>i(s[m*l+x],s[m*l+$]));for(const x of y){let $;if(m<x?($=h[m*l+x]||(h[m*l+x]={source:null,target:null}),$.source={index:m,startAngle:g,endAngle:g+=s[m*l+x]*p,value:s[m*l+x]}):($=h[x*l+m]||(h[x*l+m]={source:null,target:null}),$.target={index:m,startAngle:g,endAngle:g+=s[m*l+x]*p,value:s[m*l+x]},m===x&&($.source=$.target)),$.source&&$.target&&$.source.value<$.target.value){const S=$.source;$.source=$.target,$.target=S}}f[m]={index:m,startAngle:b,endAngle:g,value:u[m]}}g+=d}}return h=Object.values(h),h.groups=f,o?h.sort(o):h}return a.padAngle=function(s){return arguments.length?(n=Ry(0,s),a):n},a.sortGroups=function(s){return arguments.length?(r=s,a):r},a.sortSubgroups=function(s){return arguments.length?(i=s,a):i},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=r6(s))._=s,a):o&&o._},a}const Af=Math.PI,Pf=2*Af,fr=1e-6,s6=Pf-fr;function Ey(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function l6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ey;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Do=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Ey:l6(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-t,u=i-n,c=a-t,h=s-n,f=c*c+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>fr)if(!(Math.abs(h*l-u*c)>fr)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,d=i-s,g=l*l+u*u,m=p*p+d*d,b=Math.sqrt(g),y=Math.sqrt(f),x=o*Math.tan((Af-Math.acos((g+f-m)/(2*b*y)))/2),$=x/y,S=x/b;Math.abs($-1)>fr&&this._append`L${t+$*c},${n+$*h}`,this._append`A${o},${o},0,0,${+(h*p>c*d)},${this._x1=t+S*l},${this._y1=n+S*u}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,c=n+l,h=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>fr||Math.abs(this._y1-c)>fr)&&this._append`L${u},${c}`,r&&(f<0&&(f=f%Pf+Pf),f>s6?this._append`A${r},${r},0,1,${h},${t-s},${n-l}A${r},${r},0,1,${h},${this._x1=u},${this._y1=c}`:f>fr&&this._append`A${r},${r},0,${+(f>=Af)},${h},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Cf(){return new Do}Cf.prototype=Do.prototype;function u6(e=3){return new Do(+e)}var c6=Array.prototype.slice;function hr(e){return function(){return e}}function f6(e){return e.source}function h6(e){return e.target}function Iy(e){return e.radius}function p6(e){return e.startAngle}function d6(e){return e.endAngle}function g6(){return 0}function m6(){return 10}function By(e){var t=f6,n=h6,r=Iy,i=Iy,o=p6,a=d6,s=g6,l=null;function u(){var c,h=t.apply(this,arguments),f=n.apply(this,arguments),p=s.apply(this,arguments)/2,d=c6.call(arguments),g=+r.apply(this,(d[0]=h,d)),m=o.apply(this,d)-Os,b=a.apply(this,d)-Os,y=+i.apply(this,(d[0]=f,d)),x=o.apply(this,d)-Os,$=a.apply(this,d)-Os;if(l||(l=c=Cf()),p>_f&&(My(b-m)>p*2+_f?b>m?(m+=p,b-=p):(m-=p,b+=p):m=b=(m+b)/2,My($-x)>p*2+_f?$>x?(x+=p,$-=p):(x-=p,$+=p):x=$=(x+$)/2),l.moveTo(g*ci(m),g*fi(m)),l.arc(0,0,g,m,b),m!==x||b!==$)if(e){var S=+e.apply(this,arguments),A=y-S,_=(x+$)/2;l.quadraticCurveTo(0,0,A*ci(x),A*fi(x)),l.lineTo(y*ci(_),y*fi(_)),l.lineTo(A*ci($),A*fi($))}else l.quadraticCurveTo(0,0,y*ci(x),y*fi(x)),l.arc(0,0,y,x,$);if(l.quadraticCurveTo(0,0,g*ci(m),g*fi(m)),l.closePath(),c)return l=null,c+""||null}return e&&(u.headRadius=function(c){return arguments.length?(e=typeof c=="function"?c:hr(+c),u):e}),u.radius=function(c){return arguments.length?(r=i=typeof c=="function"?c:hr(+c),u):r},u.sourceRadius=function(c){return arguments.length?(r=typeof c=="function"?c:hr(+c),u):r},u.targetRadius=function(c){return arguments.length?(i=typeof c=="function"?c:hr(+c),u):i},u.startAngle=function(c){return arguments.length?(o=typeof c=="function"?c:hr(+c),u):o},u.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:hr(+c),u):a},u.padAngle=function(c){return arguments.length?(s=typeof c=="function"?c:hr(+c),u):s},u.source=function(c){return arguments.length?(t=c,u):t},u.target=function(c){return arguments.length?(n=c,u):n},u.context=function(c){return arguments.length?(l=c??null,u):l},u}function y6(){return By()}function b6(){return By(m6)}var x6=Array.prototype,Ny=x6.slice;function $6(e,t){return e-t}function v6(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}const Ln=e=>()=>e;function S6(e,t){for(var n=-1,r=t.length,i;++n<r;)if(i=_6(e,t[n]))return i;return 0}function _6(e,t){for(var n=t[0],r=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],u=l[0],c=l[1],h=e[s],f=h[0],p=h[1];if(w6(l,h,t))return 0;c>r!=p>r&&n<(f-u)*(r-c)/(p-c)+u&&(i=-i)}return i}function w6(e,t,n){var r;return T6(e,t,n)&&A6(e[r=+(e[0]===t[0])],n[r],t[r])}function T6(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}function A6(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}function P6(){}var cn=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Df(){var e=1,t=1,n=Pc,r=l;function i(u){var c=n(u);if(Array.isArray(c))c=c.slice().sort($6);else{const h=oo(u,C6);for(c=Jn(...Ac(h[0],h[1],c),c);c[c.length-1]>=h[1];)c.pop();for(;c[1]<h[0];)c.shift()}return c.map(h=>o(u,h))}function o(u,c){const h=c==null?NaN:+c;if(isNaN(h))throw new Error(`invalid value: ${c}`);var f=[],p=[];return a(u,h,function(d){r(d,u,h),v6(d)>0?f.push([d]):p.push(d)}),p.forEach(function(d){for(var g=0,m=f.length,b;g<m;++g)if(S6((b=f[g])[0],d)!==-1){b.push(d);return}}),{type:"MultiPolygon",value:c,coordinates:f}}function a(u,c,h){var f=new Array,p=new Array,d,g,m,b,y,x;for(d=g=-1,b=pr(u[0],c),cn[b<<1].forEach($);++d<e-1;)m=b,b=pr(u[d+1],c),cn[m|b<<1].forEach($);for(cn[b<<0].forEach($);++g<t-1;){for(d=-1,b=pr(u[g*e+e],c),y=pr(u[g*e],c),cn[b<<1|y<<2].forEach($);++d<e-1;)m=b,b=pr(u[g*e+e+d+1],c),x=y,y=pr(u[g*e+d+1],c),cn[m|b<<1|y<<2|x<<3].forEach($);cn[b|y<<3].forEach($)}for(d=-1,y=u[g*e]>=c,cn[y<<2].forEach($);++d<e-1;)x=y,y=pr(u[g*e+d+1],c),cn[y<<2|x<<3].forEach($);cn[y<<3].forEach($);function $(S){var A=[S[0][0]+d,S[0][1]+g],_=[S[1][0]+d,S[1][1]+g],P=s(A),M=s(_),R,v;(R=p[P])?(v=f[M])?(delete p[R.end],delete f[v.start],R===v?(R.ring.push(_),h(R.ring)):f[R.start]=p[v.end]={start:R.start,end:v.end,ring:R.ring.concat(v.ring)}):(delete p[R.end],R.ring.push(_),p[R.end=M]=R):(R=f[M])?(v=p[P])?(delete f[R.start],delete p[v.end],R===v?(R.ring.push(_),h(R.ring)):f[v.start]=p[R.end]={start:v.start,end:R.end,ring:v.ring.concat(R.ring)}):(delete f[R.start],R.ring.unshift(A),f[R.start=P]=R):f[P]=p[M]={start:P,end:M,ring:[A,_]}}}function s(u){return u[0]*2+u[1]*(e+1)*4}function l(u,c,h){u.forEach(function(f){var p=f[0],d=f[1],g=p|0,m=d|0,b=Mf(c[m*e+g]);p>0&&p<e&&g===p&&(f[0]=Fy(p,Mf(c[m*e+g-1]),b,h)),d>0&&d<t&&m===d&&(f[1]=Fy(d,Mf(c[(m-1)*e+g]),b,h))})}return i.contour=o,i.size=function(u){if(!arguments.length)return[e,t];var c=Math.floor(u[0]),h=Math.floor(u[1]);if(!(c>=0&&h>=0))throw new Error("invalid size");return e=c,t=h,i},i.thresholds=function(u){return arguments.length?(n=typeof u=="function"?u:Array.isArray(u)?Ln(Ny.call(u)):Ln(u),i):n},i.smooth=function(u){return arguments.length?(r=u?l:P6,i):r===l},i}function C6(e){return isFinite(e)?e:NaN}function pr(e,t){return e==null?!1:+e>=t}function Mf(e){return e==null||isNaN(e=+e)?-1/0:e}function Fy(e,t,n,r){const i=r-t,o=n-t,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?e:e+a-.5}function D6(e){return e[0]}function M6(e){return e[1]}function L6(){return 1}function k6(){var e=D6,t=M6,n=L6,r=960,i=500,o=20,a=2,s=o*3,l=r+s*2>>a,u=i+s*2>>a,c=Ln(20);function h(y){var x=new Float32Array(l*u),$=Math.pow(2,-a),S=-1;for(const k of y){var A=(e(k,++S,y)+s)*$,_=(t(k,S,y)+s)*$,P=+n(k,S,y);if(P&&A>=0&&A<l&&_>=0&&_<u){var M=Math.floor(A),R=Math.floor(_),v=A-M-.5,E=_-R-.5;x[M+R*l]+=(1-v)*(1-E)*P,x[M+1+R*l]+=v*(1-E)*P,x[M+1+(R+1)*l]+=v*E*P,x[M+(R+1)*l]+=(1-v)*E*P}}return I0({data:x,width:l,height:u},o*$),x}function f(y){var x=h(y),$=c(x),S=Math.pow(2,2*a);return Array.isArray($)||($=Jn(Number.MIN_VALUE,so(x)/S,$)),Df().size([l,u]).thresholds($.map(A=>A*S))(x).map((A,_)=>(A.value=+$[_],p(A)))}f.contours=function(y){var x=h(y),$=Df().size([l,u]),S=Math.pow(2,2*a),A=_=>{_=+_;var P=p($.contour(x,_*S));return P.value=_,P};return Object.defineProperty(A,"max",{get:()=>so(x)/S}),A};function p(y){return y.coordinates.forEach(d),y}function d(y){y.forEach(g)}function g(y){y.forEach(m)}function m(y){y[0]=y[0]*Math.pow(2,a)-s,y[1]=y[1]*Math.pow(2,a)-s}function b(){return s=o*3,l=r+s*2>>a,u=i+s*2>>a,f}return f.x=function(y){return arguments.length?(e=typeof y=="function"?y:Ln(+y),f):e},f.y=function(y){return arguments.length?(t=typeof y=="function"?y:Ln(+y),f):t},f.weight=function(y){return arguments.length?(n=typeof y=="function"?y:Ln(+y),f):n},f.size=function(y){if(!arguments.length)return[r,i];var x=+y[0],$=+y[1];if(!(x>=0&&$>=0))throw new Error("invalid size");return r=x,i=$,b()},f.cellSize=function(y){if(!arguments.length)return 1<<a;if(!((y=+y)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(y)/Math.LN2),b()},f.thresholds=function(y){return arguments.length?(c=typeof y=="function"?y:Array.isArray(y)?Ln(Ny.call(y)):Ln(y),f):c},f.bandwidth=function(y){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((y=+y)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*y*y+1)-1)/2,b()},f}const fn=11102230246251565e-32,Ye=134217729,R6=(3+8*fn)*fn;function Lf(e,t,n,r,i){let o,a,s,l,u=t[0],c=r[0],h=0,f=0;c>u==c>-u?(o=u,u=t[++h]):(o=c,c=r[++f]);let p=0;if(h<e&&f<n)for(c>u==c>-u?(a=u+o,s=o-(a-u),u=t[++h]):(a=c+o,s=o-(a-c),c=r[++f]),o=a,s!==0&&(i[p++]=s);h<e&&f<n;)c>u==c>-u?(a=o+u,l=a-o,s=o-(a-l)+(u-l),u=t[++h]):(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=r[++f]),o=a,s!==0&&(i[p++]=s);for(;h<e;)a=o+u,l=a-o,s=o-(a-l)+(u-l),u=t[++h],o=a,s!==0&&(i[p++]=s);for(;f<n;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=r[++f],o=a,s!==0&&(i[p++]=s);return(o!==0||p===0)&&(i[p++]=o),p}function E6(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function Mo(e){return new Float64Array(e)}const I6=(3+16*fn)*fn,B6=(2+12*fn)*fn,N6=(9+64*fn)*fn*fn,hi=Mo(4),zy=Mo(8),Oy=Mo(12),Gy=Mo(16),He=Mo(4);function F6(e,t,n,r,i,o,a){let s,l,u,c,h,f,p,d,g,m,b,y,x,$,S,A,_,P;const M=e-i,R=n-i,v=t-o,E=r-o;$=M*E,f=Ye*M,p=f-(f-M),d=M-p,f=Ye*E,g=f-(f-E),m=E-g,S=d*m-($-p*g-d*g-p*m),A=v*R,f=Ye*v,p=f-(f-v),d=v-p,f=Ye*R,g=f-(f-R),m=R-g,_=d*m-(A-p*g-d*g-p*m),b=S-_,h=S-b,hi[0]=S-(b+h)+(h-_),y=$+b,h=y-$,x=$-(y-h)+(b-h),b=x-A,h=x-b,hi[1]=x-(b+h)+(h-A),P=y+b,h=P-y,hi[2]=y-(P-h)+(b-h),hi[3]=P;let k=E6(4,hi),T=B6*a;if(k>=T||-k>=T||(h=e-M,s=e-(M+h)+(h-i),h=n-R,u=n-(R+h)+(h-i),h=t-v,l=t-(v+h)+(h-o),h=r-E,c=r-(E+h)+(h-o),s===0&&l===0&&u===0&&c===0)||(T=N6*a+R6*Math.abs(k),k+=M*c+E*s-(v*u+R*l),k>=T||-k>=T))return k;$=s*E,f=Ye*s,p=f-(f-s),d=s-p,f=Ye*E,g=f-(f-E),m=E-g,S=d*m-($-p*g-d*g-p*m),A=l*R,f=Ye*l,p=f-(f-l),d=l-p,f=Ye*R,g=f-(f-R),m=R-g,_=d*m-(A-p*g-d*g-p*m),b=S-_,h=S-b,He[0]=S-(b+h)+(h-_),y=$+b,h=y-$,x=$-(y-h)+(b-h),b=x-A,h=x-b,He[1]=x-(b+h)+(h-A),P=y+b,h=P-y,He[2]=y-(P-h)+(b-h),He[3]=P;const w=Lf(4,hi,4,He,zy);$=M*c,f=Ye*M,p=f-(f-M),d=M-p,f=Ye*c,g=f-(f-c),m=c-g,S=d*m-($-p*g-d*g-p*m),A=v*u,f=Ye*v,p=f-(f-v),d=v-p,f=Ye*u,g=f-(f-u),m=u-g,_=d*m-(A-p*g-d*g-p*m),b=S-_,h=S-b,He[0]=S-(b+h)+(h-_),y=$+b,h=y-$,x=$-(y-h)+(b-h),b=x-A,h=x-b,He[1]=x-(b+h)+(h-A),P=y+b,h=P-y,He[2]=y-(P-h)+(b-h),He[3]=P;const C=Lf(w,zy,4,He,Oy);$=s*c,f=Ye*s,p=f-(f-s),d=s-p,f=Ye*c,g=f-(f-c),m=c-g,S=d*m-($-p*g-d*g-p*m),A=l*u,f=Ye*l,p=f-(f-l),d=l-p,f=Ye*u,g=f-(f-u),m=u-g,_=d*m-(A-p*g-d*g-p*m),b=S-_,h=S-b,He[0]=S-(b+h)+(h-_),y=$+b,h=y-$,x=$-(y-h)+(b-h),b=x-A,h=x-b,He[1]=x-(b+h)+(h-A),P=y+b,h=P-y,He[2]=y-(P-h)+(b-h),He[3]=P;const F=Lf(C,Oy,4,He,Gy);return Gy[F-1]}function Gs(e,t,n,r,i,o){const a=(t-o)*(n-i),s=(e-i)*(r-o),l=a-s,u=Math.abs(a+s);return Math.abs(l)>=I6*u?l:-F6(e,t,n,r,i,o,u)}const Wy=Math.pow(2,-52),Ws=new Uint32Array(512);class Ys{static from(t,n=Y6,r=V6){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=t[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new Ys(o)}constructor(t){const n=t.length>>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=t.length>>1;let s=1/0,l=1/0,u=-1/0,c=-1/0;for(let M=0;M<a;M++){const R=t[2*M],v=t[2*M+1];R<s&&(s=R),v<l&&(l=v),R>u&&(u=R),v>c&&(c=v),this._ids[M]=M}const h=(s+u)/2,f=(l+c)/2;let p,d,g;for(let M=0,R=1/0;M<a;M++){const v=kf(h,f,t[2*M],t[2*M+1]);v<R&&(p=M,R=v)}const m=t[2*p],b=t[2*p+1];for(let M=0,R=1/0;M<a;M++){if(M===p)continue;const v=kf(m,b,t[2*M],t[2*M+1]);v<R&&v>0&&(d=M,R=v)}let y=t[2*d],x=t[2*d+1],$=1/0;for(let M=0;M<a;M++){if(M===p||M===d)continue;const R=G6(m,b,y,x,t[2*M],t[2*M+1]);R<$&&(g=M,$=R)}let S=t[2*g],A=t[2*g+1];if($===1/0){for(let v=0;v<a;v++)this._dists[v]=t[2*v]-t[0]||t[2*v+1]-t[1];pi(this._ids,this._dists,0,a-1);const M=new Uint32Array(a);let R=0;for(let v=0,E=-1/0;v<a;v++){const k=this._ids[v],T=this._dists[k];T>E&&(M[R++]=k,E=T)}this.hull=M.subarray(0,R),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Gs(m,b,y,x,S,A)<0){const M=d,R=y,v=x;d=g,y=S,x=A,g=M,S=R,A=v}const _=W6(m,b,y,x,S,A);this._cx=_.x,this._cy=_.y;for(let M=0;M<a;M++)this._dists[M]=kf(t[2*M],t[2*M+1],_.x,_.y);pi(this._ids,this._dists,0,a-1),this._hullStart=p;let P=3;r[p]=n[g]=d,r[d]=n[p]=g,r[g]=n[d]=p,i[p]=0,i[d]=1,i[g]=2,o.fill(-1),o[this._hashKey(m,b)]=p,o[this._hashKey(y,x)]=d,o[this._hashKey(S,A)]=g,this.trianglesLen=0,this._addTriangle(p,d,g,-1,-1,-1);for(let M=0,R,v;M<this._ids.length;M++){const E=this._ids[M],k=t[2*E],T=t[2*E+1];if(M>0&&Math.abs(k-R)<=Wy&&Math.abs(T-v)<=Wy||(R=k,v=T,E===p||E===d||E===g))continue;let w=0;for(let N=0,I=this._hashKey(k,T);N<this._hashSize&&(w=o[(I+N)%this._hashSize],!(w!==-1&&w!==r[w]));N++);w=n[w];let C=w,F;for(;F=r[C],Gs(k,T,t[2*C],t[2*C+1],t[2*F],t[2*F+1])>=0;)if(C=F,C===w){C=-1;break}if(C===-1)continue;let O=this._addTriangle(C,E,r[C],-1,-1,i[C]);i[E]=this._legalize(O+2),i[C]=O,P++;let B=r[C];for(;F=r[B],Gs(k,T,t[2*B],t[2*B+1],t[2*F],t[2*F+1])<0;)O=this._addTriangle(B,E,F,i[E],-1,i[B]),i[E]=this._legalize(O+2),r[B]=B,P--,B=F;if(C===w)for(;F=n[C],Gs(k,T,t[2*F],t[2*F+1],t[2*C],t[2*C+1])<0;)O=this._addTriangle(F,E,C,-1,i[C],i[F]),this._legalize(O+2),i[F]=O,r[C]=C,P--,C=F;this._hullStart=n[E]=C,r[C]=n[B]=E,r[E]=B,o[this._hashKey(k,T)]=E,o[this._hashKey(t[2*C],t[2*C+1])]=C}this.hull=new Uint32Array(P);for(let M=0,R=this._hullStart;M<P;M++)this.hull[M]=R,R=r[R];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(z6(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[t],l=t-t%3;if(a=l+(t+2)%3,s===-1){if(o===0)break;t=Ws[--o];continue}const u=s-s%3,c=l+(t+1)%3,h=u+(s+2)%3,f=n[a],p=n[t],d=n[c],g=n[h];if(O6(i[2*f],i[2*f+1],i[2*p],i[2*p+1],i[2*d],i[2*d+1],i[2*g],i[2*g+1])){n[t]=g,n[s]=f;const b=r[h];if(b===-1){let x=this._hullStart;do{if(this._hullTri[x]===h){this._hullTri[x]=t;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(t,b),this._link(s,r[a]),this._link(a,h);const y=u+(s+1)%3;o<Ws.length&&(Ws[o++]=y)}else{if(o===0)break;t=Ws[--o]}}return a}_link(t,n){this._halfedges[t]=n,n!==-1&&(this._halfedges[n]=t)}_addTriangle(t,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function z6(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function kf(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}function O6(e,t,n,r,i,o,a,s){const l=e-a,u=t-s,c=n-a,h=r-s,f=i-a,p=o-s,d=l*l+u*u,g=c*c+h*h,m=f*f+p*p;return l*(h*m-g*p)-u*(c*m-g*f)+d*(c*p-h*f)<0}function G6(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,u=o-t,c=a*a+s*s,h=l*l+u*u,f=.5/(a*u-s*l),p=(u*c-s*h)*f,d=(a*h-l*c)*f;return p*p+d*d}function W6(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,u=o-t,c=a*a+s*s,h=l*l+u*u,f=.5/(a*u-s*l),p=e+(u*c-s*h)*f,d=t+(a*h-l*c)*f;return{x:p,y:d}}function pi(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=e[i],a=t[o];let s=i-1;for(;s>=n&&t[e[s]]>a;)e[s+1]=e[s--];e[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;Lo(e,i,o),t[e[n]]>t[e[r]]&&Lo(e,n,r),t[e[o]]>t[e[r]]&&Lo(e,o,r),t[e[n]]>t[e[o]]&&Lo(e,n,o);const s=e[o],l=t[s];for(;;){do o++;while(t[e[o]]<l);do a--;while(t[e[a]]>l);if(a<o)break;Lo(e,o,a)}e[n+1]=e[a],e[a]=s,r-o+1>=a-n?(pi(e,t,o,r),pi(e,t,n,a-1)):(pi(e,t,n,a-1),pi(e,t,o,r))}}function Lo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Y6(e){return e[0]}function V6(e){return e[1]}const Yy=1e-6;class dr{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,r){t=+t,n=+n,r=+r;const i=t+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>Yy||Math.abs(this._y1-o)>Yy)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${t-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(t,n,r,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Rf{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class Vy{constructor(t,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,m=0,b=r.length,y,x;g<b;g+=3,m+=2){const $=r[g]*2,S=r[g+1]*2,A=r[g+2]*2,_=t[$],P=t[$+1],M=t[S],R=t[S+1],v=t[A],E=t[A+1],k=M-_,T=R-P,w=v-_,C=E-P,F=(k*C-T*w)*2;if(Math.abs(F)<1e-9){if(o===void 0){o=a=0;for(const B of n)o+=t[B*2],a+=t[B*2+1];o/=n.length,a/=n.length}const O=1e9*Math.sign((o-_)*C-(a-P)*w);y=(_+v)/2-O*C,x=(P+E)/2+O*w}else{const O=1/F,B=k*k+T*T,N=w*w+C*C;y=_+(C*B-T*N)*O,x=P+(k*N-w*B)*O}s[m]=y,s[m+1]=x}let l=n[n.length-1],u,c=l*4,h,f=t[2*l],p,d=t[2*l+1];i.fill(0);for(let g=0;g<n.length;++g)l=n[g],u=c,h=f,p=d,c=l*4,f=t[2*l],d=t[2*l+1],i[u+2]=i[c]=p-d,i[u+3]=i[c+1]=f-h}render(t){const n=t==null?t=new dr:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let c=0,h=r.length;c<h;++c){const f=r[c];if(f<c)continue;const p=Math.floor(c/3)*2,d=Math.floor(f/3)*2,g=a[p],m=a[p+1],b=a[d],y=a[d+1];this._renderSegment(g,m,b,y,t)}let l,u=o[o.length-1];for(let c=0;c<o.length;++c){l=u,u=o[c];const h=Math.floor(i[u]/3)*2,f=a[h],p=a[h+1],d=l*4,g=this._project(f,p,s[d+2],s[d+3]);g&&this._renderSegment(f,p,g[0],g[1],t)}return n&&n.value()}renderBounds(t){const n=t==null?t=new dr:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const r=n==null?n=new dr:void 0,i=this._clip(t);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,r=t.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(t){const n=new Rf;return this.renderCell(t,n),n.value()}_renderSegment(t,n,r,i,o){let a;const s=this._regioncode(t,n),l=this._regioncode(r,i);s===0&&l===0?(o.moveTo(t,n),o.lineTo(r,i)):(a=this._clipSegment(t,n,r,i,s,l))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(t,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(t,n,r)===t}*neighbors(t){const n=this._clip(t);if(n)for(const r of this.delaunay.neighbors(t)){const i=this._clip(r);if(i){e:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,l=i.length;s<l;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+l-2)%l]&&n[(o+3)%a]===i[(s+l-1)%l]){yield r;break e}}}}_cell(t){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[t];if(a===-1)return null;const s=[];let l=a;do{const u=Math.floor(l/3);if(s.push(n[u*2],n[u*2+1]),l=l%3===2?l-2:l+1,o[l]!==t)break;l=i[l]}while(l!==a&&l!==-1);return s}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(n===null)return null;const{vectors:r}=this,i=t*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(t,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(t,n))}_clipFinite(t,n){const r=n.length;let i=null,o,a,s=n[r-2],l=n[r-1],u,c=this._regioncode(s,l),h,f=0;for(let p=0;p<r;p+=2)if(o=s,a=l,s=n[p],l=n[p+1],u=c,c=this._regioncode(s,l),u===0&&c===0)h=f,f=0,i?i.push(s,l):i=[s,l];else{let d,g,m,b,y;if(u===0){if((d=this._clipSegment(o,a,s,l,u,c))===null)continue;[g,m,b,y]=d}else{if((d=this._clipSegment(s,l,o,a,c,u))===null)continue;[b,y,g,m]=d,h=f,f=this._edgecode(g,m),h&&f&&this._edge(t,h,f,i,i.length),i?i.push(g,m):i=[g,m]}h=f,f=this._edgecode(b,y),h&&f&&this._edge(t,h,f,i,i.length),i?i.push(b,y):i=[b,y]}if(i)h=f,f=this._edgecode(i[0],i[1]),h&&f&&this._edge(t,h,f,i,i.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(t,n,r,i,o,a){const s=o<a;for(s&&([t,n,r,i,o,a]=[r,i,t,n,a,o]);;){if(o===0&&a===0)return s?[r,i,t,n]:[t,n,r,i];if(o&a)return null;let l,u,c=o||a;c&8?(l=t+(r-t)*(this.ymax-n)/(i-n),u=this.ymax):c&4?(l=t+(r-t)*(this.ymin-n)/(i-n),u=this.ymin):c&2?(u=n+(i-n)*(this.xmax-t)/(r-t),l=this.xmax):(u=n+(i-n)*(this.xmin-t)/(r-t),l=this.xmin),o?(t=l,n=u,o=this._regioncode(t,n)):(r=l,i=u,a=this._regioncode(r,i))}}_clipInfinite(t,n,r,i,o,a){let s=Array.from(n),l;if((l=this._project(s[0],s[1],r,i))&&s.unshift(l[0],l[1]),(l=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(l[0],l[1]),s=this._clipFinite(t,s))for(let u=0,c=s.length,h,f=this._edgecode(s[c-2],s[c-1]);u<c;u+=2)h=f,f=this._edgecode(s[u],s[u+1]),h&&f&&(u=this._edge(t,h,f,s,u),c=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(t,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(t,n,r,i){let o=1/0,a,s,l;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(l=this.ymin,s=t+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(l=this.ymax,s=t+(o=a)*r)}if(r>0){if(t>=this.xmax)return null;(a=(this.xmax-t)/r)<o&&(s=this.xmax,l=n+(o=a)*i)}else if(r<0){if(t<=this.xmin)return null;(a=(this.xmin-t)/r)<o&&(s=this.xmin,l=n+(o=a)*i)}return[s,l]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const r=(n+2)%t.length,i=(n+4)%t.length;(t[n]===t[r]&&t[r]===t[i]||t[n+1]===t[r+1]&&t[r+1]===t[i+1])&&(t.splice(r,2),n-=2)}t.length||(t=null)}return t}}const j6=2*Math.PI,di=Math.pow;function X6(e){return e[0]}function U6(e){return e[1]}function H6(e){const{triangles:t,coords:n}=e;for(let r=0;r<t.length;r+=3){const i=2*t[r],o=2*t[r+1],a=2*t[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function q6(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Ef{static from(t,n=X6,r=U6,i){return new Ef("length"in t?Z6(t,n,r,i):Float64Array.from(K6(t,n,r,i)))}constructor(t){this._delaunator=new Ys(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&H6(t)){this.collinear=Int32Array.from({length:n.length/2},(f,p)=>p).sort((f,p)=>n[2*f]-n[2*p]||n[2*f+1]-n[2*p+1]);const l=this.collinear[0],u=this.collinear[this.collinear.length-1],c=[n[2*l],n[2*l+1],n[2*u],n[2*u+1]],h=1e-8*Math.hypot(c[3]-c[1],c[2]-c[0]);for(let f=0,p=n.length/2;f<p;++f){const d=q6(n[2*f],n[2*f+1],h);n[2*f]=d[0],n[2*f+1]=d[1]}this._delaunator=new Ys(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let l=0,u=r.length;l<u;++l){const c=o[l%3===2?l-2:l+1];(r[l]===-1||a[c]===-1)&&(a[c]=l)}for(let l=0,u=i.length;l<u;++l)s[i[l]]=l;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new Vy(this,t)}*neighbors(t){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const h=s.indexOf(t);h>0&&(yield s[h-1]),h<s.length-1&&(yield s[h+1]);return}const l=n[t];if(l===-1)return;let u=l,c=-1;do{if(yield c=a[u],u=u%3===2?u-2:u+1,a[u]!==t)return;if(u=o[u],u===-1){const h=r[(i[t]+1)%r.length];h!==c&&(yield h);return}}while(u!==l)}find(t,n,r=0){if(t=+t,t!==t||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,t,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(t,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:l,points:u}=this;if(i[t]===-1||!u.length)return(t+1)%(u.length>>1);let c=t,h=di(n-u[t*2],2)+di(r-u[t*2+1],2);const f=i[t];let p=f;do{let d=l[p];const g=di(n-u[d*2],2)+di(r-u[d*2+1],2);if(g<h&&(h=g,c=d),p=p%3===2?p-2:p+1,l[p]!==t)break;if(p=s[p],p===-1){if(p=o[(a[t]+1)%o.length],p!==d&&di(n-u[p*2],2)+di(r-u[p*2+1],2)<h)return p;break}}while(p!==f);return c}render(t){const n=t==null?t=new dr:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const l=i[a];if(l<a)continue;const u=o[a]*2,c=o[l]*2;t.moveTo(r[u],r[u+1]),t.lineTo(r[c],r[c+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n){n===void 0&&(!t||typeof t.moveTo!="function")&&(n=t,t=null),n=n==null?2:+n;const r=t==null?t=new dr:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],l=i[o+1];t.moveTo(s+n,l),t.arc(s,l,n,0,j6)}return r&&r.value()}renderHull(t){const n=t==null?t=new dr:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;t.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const l=2*r[s];t.lineTo(i[l],i[l+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new Rf;return this.renderHull(t),t.value()}renderTriangle(t,n){const r=n==null?n=new dr:void 0,{points:i,triangles:o}=this,a=o[t*=3]*2,s=o[t+1]*2,l=o[t+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[l],i[l+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,r=t.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new Rf;return this.renderTriangle(t,n),n.value()}}function Z6(e,t,n,r){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=e[a];o[a*2]=t.call(r,s,a,e),o[a*2+1]=n.call(r,s,a,e)}return o}function*K6(e,t,n,r){let i=0;for(const o of e)yield t.call(r,o,i,e),yield n.call(r,o,i,e),++i}var jy={},If={},Bf=34,ko=10,Nf=13;function Xy(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function Q6(e,t){var n=Xy(e);return function(r,i){return t(n(r),i,e)}}function Uy(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function ut(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function J6(e){return e<0?"-"+ut(-e,6):e>9999?"+"+ut(e,6):ut(e,4)}function e8(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":J6(e.getUTCFullYear())+"-"+ut(e.getUTCMonth()+1,2)+"-"+ut(e.getUTCDate(),2)+(i?"T"+ut(t,2)+":"+ut(n,2)+":"+ut(r,2)+"."+ut(i,3)+"Z":r?"T"+ut(t,2)+":"+ut(n,2)+":"+ut(r,2)+"Z":n||t?"T"+ut(t,2)+":"+ut(n,2)+"Z":"")}function Vs(e){var t=new RegExp('["'+e+`
|
52
|
+
\r]`),n=e.charCodeAt(0);function r(h,f){var p,d,g=i(h,function(m,b){if(p)return p(m,b-1);d=m,p=f?Q6(m,f):Xy(m)});return g.columns=d||[],g}function i(h,f){var p=[],d=h.length,g=0,m=0,b,y=d<=0,x=!1;h.charCodeAt(d-1)===ko&&--d,h.charCodeAt(d-1)===Nf&&--d;function $(){if(y)return If;if(x)return x=!1,jy;var A,_=g,P;if(h.charCodeAt(_)===Bf){for(;g++<d&&h.charCodeAt(g)!==Bf||h.charCodeAt(++g)===Bf;);return(A=g)>=d?y=!0:(P=h.charCodeAt(g++))===ko?x=!0:P===Nf&&(x=!0,h.charCodeAt(g)===ko&&++g),h.slice(_+1,A-1).replace(/""/g,'"')}for(;g<d;){if((P=h.charCodeAt(A=g++))===ko)x=!0;else if(P===Nf)x=!0,h.charCodeAt(g)===ko&&++g;else if(P!==n)continue;return h.slice(_,A)}return y=!0,h.slice(_,d)}for(;(b=$())!==If;){for(var S=[];b!==jy&&b!==If;)S.push(b),b=$();f&&(S=f(S,m++))==null||p.push(S)}return p}function o(h,f){return h.map(function(p){return f.map(function(d){return c(p[d])}).join(e)})}function a(h,f){return f==null&&(f=Uy(h)),[f.map(c).join(e)].concat(o(h,f)).join(`
|
53
|
+
`)}function s(h,f){return f==null&&(f=Uy(h)),o(h,f).join(`
|
54
|
+
`)}function l(h){return h.map(u).join(`
|
55
|
+
`)}function u(h){return h.map(c).join(e)}function c(h){return h==null?"":h instanceof Date?e8(h):t.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:u,formatValue:c}}var gr=Vs(","),Hy=gr.parse,t8=gr.parseRows,n8=gr.format,r8=gr.formatBody,i8=gr.formatRows,o8=gr.formatRow,a8=gr.formatValue,mr=Vs(" "),qy=mr.parse,s8=mr.parseRows,l8=mr.format,u8=mr.formatBody,c8=mr.formatRows,f8=mr.formatRow,h8=mr.formatValue;function p8(e){for(var t in e){var n=e[t].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))d8&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;e[t]=n}return e}const d8=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function g8(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function m8(e,t){return fetch(e,t).then(g8)}function y8(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function b8(e,t){return fetch(e,t).then(y8)}function x8(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function js(e,t){return fetch(e,t).then(x8)}function Zy(e){return function(t,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=void 0),js(t,n).then(function(i){return e(i,r)})}}function $8(e,t,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=Vs(e);return js(t,n).then(function(o){return i.parse(o,r)})}var v8=Zy(Hy),S8=Zy(qy);function _8(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function w8(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function T8(e,t){return fetch(e,t).then(w8)}function Ff(e){return(t,n)=>js(t,n).then(r=>new DOMParser().parseFromString(r,e))}const A8=Ff("application/xml");var P8=Ff("text/html"),C8=Ff("image/svg+xml");function zf(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var o,a=n.length,s,l=0,u=0;for(o=0;o<a;++o)s=n[o],l+=s.x,u+=s.y;for(l=(l/a-e)*r,u=(u/a-t)*r,o=0;o<a;++o)s=n[o],s.x-=l,s.y-=u}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function D8(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return Ky(this.cover(t,n),t,n,e)}function Ky(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,c=e._y1,h,f,p,d,g,m,b,y;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(h=(s+u)/2))?s=h:u=h,(m=n>=(f=(l+c)/2))?l=f:c=f,i=o,!(o=o[b=m<<1|g]))return i[b]=a,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&n===d)return a.next=o,i?i[b]=a:e._root=a,e;do i=i?i[b]=new Array(4):e._root=new Array(4),(g=t>=(h=(s+u)/2))?s=h:u=h,(m=n>=(f=(l+c)/2))?l=f:c=f;while((b=m<<1|g)===(y=(d>=f)<<1|p>=h));return i[y]=o,i[b]=a,e}function M8(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,c=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<l&&(l=i),i>c&&(c=i),o<u&&(u=o),o>h&&(h=o));if(l>c||u>h)return this;for(this.cover(l,u).cover(c,h),n=0;n<r;++n)Ky(this,a[n],s[n],e[n]);return this}function L8(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n||1,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function k8(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function R8(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function qe(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function E8(e,t,n){var r,i=this._x0,o=this._y0,a,s,l,u,c=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new qe(p,i,o,c,h)),n==null?n=1/0:(i=e-n,o=t-n,c=e+n,h=t+n,n*=n);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>c||(s=d.y0)>h||(l=d.x1)<i||(u=d.y1)<o))if(p.length){var m=(a+l)/2,b=(s+u)/2;f.push(new qe(p[3],m,b,l,u),new qe(p[2],a,b,m,u),new qe(p[1],m,s,l,b),new qe(p[0],a,s,m,b)),(g=(t>=b)<<1|e>=m)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var y=e-+this._x.call(null,p.data),x=t-+this._y.call(null,p.data),$=y*y+x*x;if($<n){var S=Math.sqrt(n=$);i=e-S,o=t-S,c=e+S,h=t+S,r=p.data}}return r}function I8(e){if(isNaN(c=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,c,h,f,p,d,g,m,b;if(!n)return this;if(n.length)for(;;){if((d=c>=(f=(a+l)/2))?a=f:l=f,(g=h>=(p=(s+u)/2))?s=p:u=p,t=n,!(n=n[m=g<<1|d]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(r=t,b=m)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[b]=n:this._root=n),this):(this._root=o,this)}function B8(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function N8(){return this._root}function F8(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function z8(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new qe(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,c=(a+l)/2;(i=r[3])&&t.push(new qe(i,u,c,s,l)),(i=r[2])&&t.push(new qe(i,o,c,u,l)),(i=r[1])&&t.push(new qe(i,u,a,s,c)),(i=r[0])&&t.push(new qe(i,o,a,u,c))}return this}function O8(e){var t=[],n=[],r;for(this._root&&t.push(new qe(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,c=(a+l)/2,h=(s+u)/2;(o=i[0])&&t.push(new qe(o,a,s,c,h)),(o=i[1])&&t.push(new qe(o,c,s,l,h)),(o=i[2])&&t.push(new qe(o,a,h,c,u)),(o=i[3])&&t.push(new qe(o,c,h,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function G8(e){return e[0]}function W8(e){return arguments.length?(this._x=e,this):this._x}function Y8(e){return e[1]}function V8(e){return arguments.length?(this._y=e,this):this._y}function Xs(e,t,n){var r=new Of(t??G8,n??Y8,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Of(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Qy(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Ze=Xs.prototype=Of.prototype;Ze.copy=function(){var e=new Of(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Qy(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=Qy(r));return e},Ze.add=D8,Ze.addAll=M8,Ze.cover=L8,Ze.data=k8,Ze.extent=R8,Ze.find=E8,Ze.remove=I8,Ze.removeAll=B8,Ze.root=N8,Ze.size=F8,Ze.visit=z8,Ze.visitAfter=O8,Ze.x=W8,Ze.y=V8;function Re(e){return function(){return e}}function kn(e){return(e()-.5)*1e-6}function j8(e){return e.x+e.vx}function X8(e){return e.y+e.vy}function Us(e){var t,n,r,i=1,o=1;typeof e!="function"&&(e=Re(e==null?1:+e));function a(){for(var u,c=t.length,h,f,p,d,g,m,b=0;b<o;++b)for(h=Xs(t,j8,X8).visitAfter(s),u=0;u<c;++u)f=t[u],g=n[f.index],m=g*g,p=f.x+f.vx,d=f.y+f.vy,h.visit(y);function y(x,$,S,A,_){var P=x.data,M=x.r,R=g+M;if(P){if(P.index>f.index){var v=p-P.x-P.vx,E=d-P.y-P.vy,k=v*v+E*E;k<R*R&&(v===0&&(v=kn(r),k+=v*v),E===0&&(E=kn(r),k+=E*E),k=(R-(k=Math.sqrt(k)))/k*i,f.vx+=(v*=k)*(R=(M*=M)/(m+M)),f.vy+=(E*=k)*R,P.vx-=v*(R=1-R),P.vy-=E*R)}return}return $>p+R||A<p-R||S>d+R||_<d-R}}function s(u){if(u.data)return u.r=n[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function l(){if(t){var u,c=t.length,h;for(n=new Array(c),u=0;u<c;++u)h=t[u],n[h.index]=+e(h,u,t)}}return a.initialize=function(u,c){t=u,r=c,l()},a.iterations=function(u){return arguments.length?(o=+u,a):o},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Re(+u),l(),a):e},a}function U8(e){return e.index}function Jy(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function Gf(e){var t=U8,n=h,r,i=Re(30),o,a,s,l,u,c=1;e==null&&(e=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function f(m){for(var b=0,y=e.length;b<c;++b)for(var x=0,$,S,A,_,P,M,R;x<y;++x)$=e[x],S=$.source,A=$.target,_=A.x+A.vx-S.x-S.vx||kn(u),P=A.y+A.vy-S.y-S.vy||kn(u),M=Math.sqrt(_*_+P*P),M=(M-o[x])/M*m*r[x],_*=M,P*=M,A.vx-=_*(R=l[x]),A.vy-=P*R,S.vx+=_*(R=1-R),S.vy+=P*R}function p(){if(a){var m,b=a.length,y=e.length,x=new Map(a.map((S,A)=>[t(S,A,a),S])),$;for(m=0,s=new Array(b);m<y;++m)$=e[m],$.index=m,typeof $.source!="object"&&($.source=Jy(x,$.source)),typeof $.target!="object"&&($.target=Jy(x,$.target)),s[$.source.index]=(s[$.source.index]||0)+1,s[$.target.index]=(s[$.target.index]||0)+1;for(m=0,l=new Array(y);m<y;++m)$=e[m],l[m]=s[$.source.index]/(s[$.source.index]+s[$.target.index]);r=new Array(y),d(),o=new Array(y),g()}}function d(){if(a)for(var m=0,b=e.length;m<b;++m)r[m]=+n(e[m],m,e)}function g(){if(a)for(var m=0,b=e.length;m<b;++m)o[m]=+i(e[m],m,e)}return f.initialize=function(m,b){a=m,u=b,p()},f.links=function(m){return arguments.length?(e=m,p(),f):e},f.id=function(m){return arguments.length?(t=m,f):t},f.iterations=function(m){return arguments.length?(c=+m,f):c},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Re(+m),d(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Re(+m),g(),f):i},f}const H8=1664525,q8=1013904223,e1=4294967296;function Z8(){let e=1;return()=>(e=(H8*e+q8)%e1)/e1}function K8(e){return e.x}function Q8(e){return e.y}var J8=10,e4=Math.PI*(3-Math.sqrt(5));function Hs(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,l=Rs(h),u=tr("tick","end"),c=Z8();e==null&&(e=[]);function h(){f(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function f(g){var m,b=e.length,y;g===void 0&&(g=1);for(var x=0;x<g;++x)for(n+=(o-n)*i,s.forEach(function($){$(n)}),m=0;m<b;++m)y=e[m],y.fx==null?y.x+=y.vx*=a:(y.x=y.fx,y.vx=0),y.fy==null?y.y+=y.vy*=a:(y.y=y.fy,y.vy=0);return t}function p(){for(var g=0,m=e.length,b;g<m;++g){if(b=e[g],b.index=g,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var y=J8*Math.sqrt(.5+g),x=g*e4;b.x=y*Math.cos(x),b.y=y*Math.sin(x)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function d(g){return g.initialize&&g.initialize(e,c),g}return p(),t={tick:f,restart:function(){return l.restart(h),t},stop:function(){return l.stop(),t},nodes:function(g){return arguments.length?(e=g,p(),s.forEach(d),t):e},alpha:function(g){return arguments.length?(n=+g,t):n},alphaMin:function(g){return arguments.length?(r=+g,t):r},alphaDecay:function(g){return arguments.length?(i=+g,t):+i},alphaTarget:function(g){return arguments.length?(o=+g,t):o},velocityDecay:function(g){return arguments.length?(a=1-g,t):1-a},randomSource:function(g){return arguments.length?(c=g,s.forEach(d),t):c},force:function(g,m){return arguments.length>1?(m==null?s.delete(g):s.set(g,d(m)),t):s.get(g)},find:function(g,m,b){var y=0,x=e.length,$,S,A,_,P;for(b==null?b=1/0:b*=b,y=0;y<x;++y)_=e[y],$=g-_.x,S=m-_.y,A=$*$+S*S,A<b&&(P=_,b=A);return P},on:function(g,m){return arguments.length>1?(u.on(g,m),t):u.on(g)}}}function qs(){var e,t,n,r,i=Re(-30),o,a=1,s=1/0,l=.81;function u(p){var d,g=e.length,m=Xs(e,K8,Q8).visitAfter(h);for(r=p,d=0;d<g;++d)t=e[d],m.visit(f)}function c(){if(e){var p,d=e.length,g;for(o=new Array(d),p=0;p<d;++p)g=e[p],o[g.index]=+i(g,p,e)}}function h(p){var d=0,g,m,b=0,y,x,$;if(p.length){for(y=x=$=0;$<4;++$)(g=p[$])&&(m=Math.abs(g.value))&&(d+=g.value,b+=m,y+=m*g.x,x+=m*g.y);p.x=y/b,p.y=x/b}else{g=p,g.x=g.data.x,g.y=g.data.y;do d+=o[g.data.index];while(g=g.next)}p.value=d}function f(p,d,g,m){if(!p.value)return!0;var b=p.x-t.x,y=p.y-t.y,x=m-d,$=b*b+y*y;if(x*x/l<$)return $<s&&(b===0&&(b=kn(n),$+=b*b),y===0&&(y=kn(n),$+=y*y),$<a&&($=Math.sqrt(a*$)),t.vx+=b*p.value*r/$,t.vy+=y*p.value*r/$),!0;if(p.length||$>=s)return;(p.data!==t||p.next)&&(b===0&&(b=kn(n),$+=b*b),y===0&&(y=kn(n),$+=y*y),$<a&&($=Math.sqrt(a*$)));do p.data!==t&&(x=o[p.data.index]*r/$,t.vx+=b*x,t.vy+=y*x);while(p=p.next)}return u.initialize=function(p,d){e=p,n=d,c()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:Re(+p),c(),u):i},u.distanceMin=function(p){return arguments.length?(a=p*p,u):Math.sqrt(a)},u.distanceMax=function(p){return arguments.length?(s=p*p,u):Math.sqrt(s)},u.theta=function(p){return arguments.length?(l=p*p,u):Math.sqrt(l)},u}function t4(e,t,n){var r,i=Re(.1),o,a;typeof e!="function"&&(e=Re(+e)),t==null&&(t=0),n==null&&(n=0);function s(u){for(var c=0,h=r.length;c<h;++c){var f=r[c],p=f.x-t||1e-6,d=f.y-n||1e-6,g=Math.sqrt(p*p+d*d),m=(a[c]-g)*o[c]*u/g;f.vx+=p*m,f.vy+=d*m}}function l(){if(r){var u,c=r.length;for(o=new Array(c),a=new Array(c),u=0;u<c;++u)a[u]=+e(r[u],u,r),o[u]=isNaN(a[u])?0:+i(r[u],u,r)}}return s.initialize=function(u){r=u,l()},s.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Re(+u),l(),s):i},s.radius=function(u){return arguments.length?(e=typeof u=="function"?u:Re(+u),l(),s):e},s.x=function(u){return arguments.length?(t=+u,s):t},s.y=function(u){return arguments.length?(n=+u,s):n},s}function t1(e){var t=Re(.1),n,r,i;typeof e!="function"&&(e=Re(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vx+=(i[l]-c.x)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Re(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Re(+s),a(),o):e},o}function n1(e){var t=Re(.1),n,r,i;typeof e!="function"&&(e=Re(e==null?0:+e));function o(s){for(var l=0,u=n.length,c;l<u;++l)c=n[l],c.vy+=(i[l]-c.y)*r[l]*s}function a(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return o.initialize=function(s){n=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Re(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Re(+s),a(),o):e},o}function n4(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zs(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 gi(e){return e=Zs(Math.abs(e)),e?e[1]:NaN}function r4(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)}}function i4(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var o4=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mi(e){if(!(t=o4.exec(e)))throw new Error("invalid format: "+e);var t;return new Ks({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]})}mi.prototype=Ks.prototype;function Ks(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ks.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a4(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var r1;function s4(e,t){var n=Zs(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(r1=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+Zs(e,Math.max(0,t+o-1))[0]}function i1(e,t){var n=Zs(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")}const o1={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:n4,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>i1(e*100,t),r:i1,s:s4,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function a1(e){return e}var s1=Array.prototype.map,l1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u1(e){var t=e.grouping===void 0||e.thousands===void 0?a1:r4(s1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?a1:i4(s1.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(h){h=mi(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,m=h.zero,b=h.width,y=h.comma,x=h.precision,$=h.trim,S=h.type;S==="n"?(y=!0,S="g"):o1[S]||(x===void 0&&(x=12),$=!0,S="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var A=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",_=g==="$"?r:/[%p]/.test(S)?a:"",P=o1[S],M=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function R(v){var E=A,k=_,T,w,C;if(S==="c")k=P(v)+k,v="";else{v=+v;var F=v<0||1/v<0;if(v=isNaN(v)?l:P(Math.abs(v),x),$&&(v=a4(v)),F&&+v==0&&d!=="+"&&(F=!1),E=(F?d==="("?d:s:d==="-"||d==="("?"":d)+E,k=(S==="s"?l1[8+r1/3]:"")+k+(F&&d==="("?")":""),M){for(T=-1,w=v.length;++T<w;)if(C=v.charCodeAt(T),48>C||C>57){k=(C===46?i+v.slice(T+1):v.slice(T))+k,v=v.slice(0,T);break}}}y&&!m&&(v=t(v,1/0));var O=E.length+v.length+k.length,B=O<b?new Array(b-O+1).join(f):"";switch(y&&m&&(v=t(B+v,B.length?b-k.length:1/0),B=""),p){case"<":v=E+v+k+B;break;case"=":v=E+B+v+k;break;case"^":v=B.slice(0,O=B.length>>1)+E+v+k+B.slice(O);break;default:v=B+E+v+k;break}return o(v)}return R.toString=function(){return h+""},R}function c(h,f){var p=u((h=mi(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(gi(f)/3)))*3,g=Math.pow(10,-d),m=l1[8+d/3];return function(b){return p(g*b)+m}}return{format:u,formatPrefix:c}}var Qs,Ro,Wf;c1({thousands:",",grouping:[3],currency:["$",""]});function c1(e){return Qs=u1(e),Ro=Qs.format,Wf=Qs.formatPrefix,Qs}function f1(e){return Math.max(0,-gi(Math.abs(e)))}function h1(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(gi(t)/3)))*3-gi(Math.abs(e)))}function p1(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,gi(t)-gi(e))+1}var oe=1e-6,Eo=1e-12,pe=Math.PI,Pe=pe/2,Js=pe/4,Ke=pe*2,$e=180/pe,ae=pe/180,de=Math.abs,yi=Math.atan,Qe=Math.atan2,re=Math.cos,el=Math.ceil,d1=Math.exp,Yf=Math.hypot,tl=Math.log,Vf=Math.pow,te=Math.sin,St=Math.sign||function(e){return e>0?1:e<0?-1:0},Ne=Math.sqrt,jf=Math.tan;function g1(e){return e>1?0:e<-1?pe:Math.acos(e)}function Je(e){return e>1?Pe:e<-1?-Pe:Math.asin(e)}function m1(e){return(e=te(e/2))*e}function Te(){}function nl(e,t){e&&b1.hasOwnProperty(e.type)&&b1[e.type](e,t)}var y1={Feature:function(e,t){nl(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)nl(n[r].geometry,t)}},b1={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Xf(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Xf(n[r],t,0)},Polygon:function(e,t){x1(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)x1(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)nl(n[r],t)}};function Xf(e,t,n){var r=-1,i=e.length-n,o;for(t.lineStart();++r<i;)o=e[r],t.point(o[0],o[1],o[2]);t.lineEnd()}function x1(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Xf(e[n],t,1);t.polygonEnd()}function Nt(e,t){e&&y1.hasOwnProperty(e.type)?y1[e.type](e,t):nl(e,t)}var rl=new ke,il=new ke,$1,v1,Uf,Hf,qf,Kt={point:Te,lineStart:Te,lineEnd:Te,polygonStart:function(){rl=new ke,Kt.lineStart=l4,Kt.lineEnd=u4},polygonEnd:function(){var e=+rl;il.add(e<0?Ke+e:e),this.lineStart=this.lineEnd=this.point=Te},sphere:function(){il.add(Ke)}};function l4(){Kt.point=c4}function u4(){S1($1,v1)}function c4(e,t){Kt.point=S1,$1=e,v1=t,e*=ae,t*=ae,Uf=e,Hf=re(t=t/2+Js),qf=te(t)}function S1(e,t){e*=ae,t*=ae,t=t/2+Js;var n=e-Uf,r=n>=0?1:-1,i=r*n,o=re(t),a=te(t),s=qf*a,l=Hf*o+s*re(i),u=s*r*te(i);rl.add(Qe(u,l)),Uf=e,Hf=o,qf=a}function f4(e){return il=new ke,Nt(e,Kt),il*2}function ol(e){return[Qe(e[1],e[0]),Je(e[2])]}function yr(e){var t=e[0],n=e[1],r=re(n);return[r*re(t),r*te(t),te(n)]}function al(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function bi(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Zf(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function sl(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function ll(e){var t=Ne(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ae,ct,Ce,xt,br,_1,w1,xi,Io,Rn,hn,pn={point:Kf,lineStart:A1,lineEnd:P1,polygonStart:function(){pn.point=C1,pn.lineStart=h4,pn.lineEnd=p4,Io=new ke,Kt.polygonStart()},polygonEnd:function(){Kt.polygonEnd(),pn.point=Kf,pn.lineStart=A1,pn.lineEnd=P1,rl<0?(Ae=-(Ce=180),ct=-(xt=90)):Io>oe?xt=90:Io<-oe&&(ct=-90),hn[0]=Ae,hn[1]=Ce},sphere:function(){Ae=-(Ce=180),ct=-(xt=90)}};function Kf(e,t){Rn.push(hn=[Ae=e,Ce=e]),t<ct&&(ct=t),t>xt&&(xt=t)}function T1(e,t){var n=yr([e*ae,t*ae]);if(xi){var r=bi(xi,n),i=[r[1],-r[0],0],o=bi(i,r);ll(o),o=ol(o);var a=e-br,s=a>0?1:-1,l=o[0]*$e*s,u,c=de(a)>180;c^(s*br<l&&l<s*e)?(u=o[1]*$e,u>xt&&(xt=u)):(l=(l+360)%360-180,c^(s*br<l&&l<s*e)?(u=-o[1]*$e,u<ct&&(ct=u)):(t<ct&&(ct=t),t>xt&&(xt=t))),c?e<br?$t(Ae,e)>$t(Ae,Ce)&&(Ce=e):$t(e,Ce)>$t(Ae,Ce)&&(Ae=e):Ce>=Ae?(e<Ae&&(Ae=e),e>Ce&&(Ce=e)):e>br?$t(Ae,e)>$t(Ae,Ce)&&(Ce=e):$t(e,Ce)>$t(Ae,Ce)&&(Ae=e)}else Rn.push(hn=[Ae=e,Ce=e]);t<ct&&(ct=t),t>xt&&(xt=t),xi=n,br=e}function A1(){pn.point=T1}function P1(){hn[0]=Ae,hn[1]=Ce,pn.point=Kf,xi=null}function C1(e,t){if(xi){var n=e-br;Io.add(de(n)>180?n+(n>0?360:-360):n)}else _1=e,w1=t;Kt.point(e,t),T1(e,t)}function h4(){Kt.lineStart()}function p4(){C1(_1,w1),Kt.lineEnd(),de(Io)>oe&&(Ae=-(Ce=180)),hn[0]=Ae,hn[1]=Ce,xi=null}function $t(e,t){return(t-=e)<0?t+360:t}function d4(e,t){return e[0]-t[0]}function D1(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function g4(e){var t,n,r,i,o,a,s;if(xt=Ce=-(Ae=ct=1/0),Rn=[],Nt(e,pn),n=Rn.length){for(Rn.sort(d4),t=1,r=Rn[0],o=[r];t<n;++t)i=Rn[t],D1(r,i[0])||D1(r,i[1])?($t(r[0],i[1])>$t(r[0],r[1])&&(r[1]=i[1]),$t(i[0],r[1])>$t(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=o.length-1,t=0,r=o[n];t<=n;r=i,++t)i=o[t],(s=$t(r[1],i[0]))>a&&(a=s,Ae=i[0],Ce=r[1])}return Rn=hn=null,Ae===1/0||ct===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ae,ct],[Ce,xt]]}var Bo,ul,cl,fl,hl,pl,dl,gl,Qf,Jf,eh,M1,L1,et,tt,nt,Ft={sphere:Te,point:th,lineStart:k1,lineEnd:R1,polygonStart:function(){Ft.lineStart=b4,Ft.lineEnd=x4},polygonEnd:function(){Ft.lineStart=k1,Ft.lineEnd=R1}};function th(e,t){e*=ae,t*=ae;var n=re(t);No(n*re(e),n*te(e),te(t))}function No(e,t,n){++Bo,cl+=(e-cl)/Bo,fl+=(t-fl)/Bo,hl+=(n-hl)/Bo}function k1(){Ft.point=m4}function m4(e,t){e*=ae,t*=ae;var n=re(t);et=n*re(e),tt=n*te(e),nt=te(t),Ft.point=y4,No(et,tt,nt)}function y4(e,t){e*=ae,t*=ae;var n=re(t),r=n*re(e),i=n*te(e),o=te(t),a=Qe(Ne((a=tt*o-nt*i)*a+(a=nt*r-et*o)*a+(a=et*i-tt*r)*a),et*r+tt*i+nt*o);ul+=a,pl+=a*(et+(et=r)),dl+=a*(tt+(tt=i)),gl+=a*(nt+(nt=o)),No(et,tt,nt)}function R1(){Ft.point=th}function b4(){Ft.point=$4}function x4(){E1(M1,L1),Ft.point=th}function $4(e,t){M1=e,L1=t,e*=ae,t*=ae,Ft.point=E1;var n=re(t);et=n*re(e),tt=n*te(e),nt=te(t),No(et,tt,nt)}function E1(e,t){e*=ae,t*=ae;var n=re(t),r=n*re(e),i=n*te(e),o=te(t),a=tt*o-nt*i,s=nt*r-et*o,l=et*i-tt*r,u=Yf(a,s,l),c=Je(u),h=u&&-c/u;Qf.add(h*a),Jf.add(h*s),eh.add(h*l),ul+=c,pl+=c*(et+(et=r)),dl+=c*(tt+(tt=i)),gl+=c*(nt+(nt=o)),No(et,tt,nt)}function v4(e){Bo=ul=cl=fl=hl=pl=dl=gl=0,Qf=new ke,Jf=new ke,eh=new ke,Nt(e,Ft);var t=+Qf,n=+Jf,r=+eh,i=Yf(t,n,r);return i<Eo&&(t=pl,n=dl,r=gl,ul<oe&&(t=cl,n=fl,r=hl),i=Yf(t,n,r),i<Eo)?[NaN,NaN]:[Qe(n,t)*$e,Je(r/i)*$e]}function $i(e){return function(){return e}}function nh(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function rh(e,t){return de(e)>pe&&(e-=Math.round(e/Ke)*Ke),[e,t]}rh.invert=rh;function ih(e,t,n){return(e%=Ke)?t||n?nh(B1(e),N1(t,n)):B1(e):t||n?N1(t,n):rh}function I1(e){return function(t,n){return t+=e,de(t)>pe&&(t-=Math.round(t/Ke)*Ke),[t,n]}}function B1(e){var t=I1(e);return t.invert=I1(-e),t}function N1(e,t){var n=re(e),r=te(e),i=re(t),o=te(t);function a(s,l){var u=re(l),c=re(s)*u,h=te(s)*u,f=te(l),p=f*n+c*r;return[Qe(h*i-p*o,c*n-f*r),Je(p*i+h*o)]}return a.invert=function(s,l){var u=re(l),c=re(s)*u,h=te(s)*u,f=te(l),p=f*i-h*o;return[Qe(h*i+f*o,c*n+p*r),Je(p*n-c*r)]},a}function F1(e){e=ih(e[0]*ae,e[1]*ae,e.length>2?e[2]*ae:0);function t(n){return n=e(n[0]*ae,n[1]*ae),n[0]*=$e,n[1]*=$e,n}return t.invert=function(n){return n=e.invert(n[0]*ae,n[1]*ae),n[0]*=$e,n[1]*=$e,n},t}function z1(e,t,n,r,i,o){if(n){var a=re(t),s=te(t),l=r*n;i==null?(i=t+r*Ke,o=t-l/2):(i=O1(a,i),o=O1(a,o),(r>0?i<o:i>o)&&(i+=r*Ke));for(var u,c=i;r>0?c>o:c<o;c-=l)u=ol([a,-s*re(c),-s*te(c)]),e.point(u[0],u[1])}}function O1(e,t){t=yr(t),t[0]-=e,ll(t);var n=g1(-t[1]);return((-t[2]<0?-n:n)+Ke-oe)%Ke}function S4(){var e=$i([0,0]),t=$i(90),n=$i(2),r,i,o={point:a};function a(l,u){r.push(l=i(l,u)),l[0]*=$e,l[1]*=$e}function s(){var l=e.apply(this,arguments),u=t.apply(this,arguments)*ae,c=n.apply(this,arguments)*ae;return r=[],i=ih(-l[0]*ae,-l[1]*ae,0).invert,z1(o,u,c,1),l={type:"Polygon",coordinates:[r]},r=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:$i([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:$i(+l),s):t},s.precision=function(l){return arguments.length?(n=typeof l=="function"?l:$i(+l),s):n},s}function G1(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Te,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ml(e,t){return de(e[0]-t[0])<oe&&de(e[1]-t[1])<oe}function yl(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function W1(e,t,n,r,i){var o=[],a=[],s,l;if(e.forEach(function(d){if(!((g=d.length-1)<=0)){var g,m=d[0],b=d[g],y;if(ml(m,b)){if(!m[2]&&!b[2]){for(i.lineStart(),s=0;s<g;++s)i.point((m=d[s])[0],m[1]);i.lineEnd();return}b[0]+=2*oe}o.push(y=new yl(m,d,null,!0)),a.push(y.o=new yl(m,null,y,!1)),o.push(y=new yl(b,d,null,!1)),a.push(y.o=new yl(b,null,y,!0))}}),!!o.length){for(a.sort(t),Y1(o),Y1(a),s=0,l=a.length;s<l;++s)a[s].e=n=!n;for(var u=o[0],c,h;;){for(var f=u,p=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,l=c.length;s<l;++s)i.point((h=c[s])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(p)for(c=f.p.z,s=c.length-1;s>=0;--s)i.point((h=c[s])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Y1(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function oh(e){return de(e[0])<=pe?e[0]:St(e[0])*((de(e[0])+pe)%Ke-pe)}function V1(e,t){var n=oh(t),r=t[1],i=te(r),o=[te(n),-re(n),0],a=0,s=0,l=new ke;i===1?r=Pe+oe:i===-1&&(r=-Pe-oe);for(var u=0,c=e.length;u<c;++u)if(f=(h=e[u]).length)for(var h,f,p=h[f-1],d=oh(p),g=p[1]/2+Js,m=te(g),b=re(g),y=0;y<f;++y,d=$,m=A,b=_,p=x){var x=h[y],$=oh(x),S=x[1]/2+Js,A=te(S),_=re(S),P=$-d,M=P>=0?1:-1,R=M*P,v=R>pe,E=m*A;if(l.add(Qe(E*M*te(R),b*_+E*re(R))),a+=v?P+M*Ke:P,v^d>=n^$>=n){var k=bi(yr(p),yr(x));ll(k);var T=bi(o,k);ll(T);var w=(v^P>=0?-1:1)*Je(T[2]);(r>w||r===w&&(k[0]||k[1]))&&(s+=v^P>=0?1:-1)}}return(a<-oe||a<oe&&l<-Eo)^s&1}function j1(e,t,n,r){return function(i){var o=t(i),a=G1(),s=t(a),l=!1,u,c,h,f={point:p,lineStart:g,lineEnd:m,polygonStart:function(){f.point=b,f.lineStart=y,f.lineEnd=x,c=[],u=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=m,c=Mc(c);var $=V1(u,r);c.length?(l||(i.polygonStart(),l=!0),W1(c,w4,$,n,i)):$&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p($,S){e($,S)&&i.point($,S)}function d($,S){o.point($,S)}function g(){f.point=d,o.lineStart()}function m(){f.point=p,o.lineEnd()}function b($,S){h.push([$,S]),s.point($,S)}function y(){s.lineStart(),h=[]}function x(){b(h[0][0],h[0][1]),s.lineEnd();var $=s.clean(),S=a.result(),A,_=S.length,P,M,R;if(h.pop(),u.push(h),h=null,!!_){if($&1){if(M=S[0],(P=M.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),A=0;A<P;++A)i.point((R=M[A])[0],R[1]);i.lineEnd()}return}_>1&&$&2&&S.push(S.pop().concat(S.shift())),c.push(S.filter(_4))}}return f}}function _4(e){return e.length>1}function w4(e,t){return((e=e.x)[0]<0?e[1]-Pe-oe:Pe-e[1])-((t=t.x)[0]<0?t[1]-Pe-oe:Pe-t[1])}const ah=j1(function(){return!0},T4,P4,[-pe,-Pe]);function T4(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?pe:-pe,l=de(o-t);de(l-pe)<oe?(e.point(t,n=(n+a)/2>0?Pe:-Pe),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(o,n),i=0):r!==s&&l>=pe&&(de(t-r)<oe&&(t-=r*oe),de(o-s)<oe&&(o-=s*oe),n=A4(t,n,o,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=o,n=a),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function A4(e,t,n,r){var i,o,a=te(e-n);return de(a)>oe?yi((te(t)*(o=re(r))*te(n)-te(r)*(i=re(t))*te(e))/(i*o*a)):(t+r)/2}function P4(e,t,n,r){var i;if(e==null)i=n*Pe,r.point(-pe,i),r.point(0,i),r.point(pe,i),r.point(pe,0),r.point(pe,-i),r.point(0,-i),r.point(-pe,-i),r.point(-pe,0),r.point(-pe,i);else if(de(e[0]-t[0])>oe){var o=e[0]<t[0]?pe:-pe;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function X1(e){var t=re(e),n=2*ae,r=t>0,i=de(t)>oe;function o(c,h,f,p){z1(p,e,n,f,c,h)}function a(c,h){return re(c)*re(h)>t}function s(c){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(m,b){var y=[m,b],x,$=a(m,b),S=r?$?0:u(m,b):$?u(m+(m<0?pe:-pe),b):0;if(!h&&(d=p=$)&&c.lineStart(),$!==p&&(x=l(h,y),(!x||ml(h,x)||ml(y,x))&&(y[2]=1)),$!==p)g=0,$?(c.lineStart(),x=l(y,h),c.point(x[0],x[1])):(x=l(h,y),c.point(x[0],x[1],2),c.lineEnd()),h=x;else if(i&&h&&r^$){var A;!(S&f)&&(A=l(y,h,!0))&&(g=0,r?(c.lineStart(),c.point(A[0][0],A[0][1]),c.point(A[1][0],A[1][1]),c.lineEnd()):(c.point(A[1][0],A[1][1]),c.lineEnd(),c.lineStart(),c.point(A[0][0],A[0][1],3)))}$&&(!h||!ml(h,y))&&c.point(y[0],y[1]),h=y,p=$,f=S},lineEnd:function(){p&&c.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function l(c,h,f){var p=yr(c),d=yr(h),g=[1,0,0],m=bi(p,d),b=al(m,m),y=m[0],x=b-y*y;if(!x)return!f&&c;var $=t*b/x,S=-t*y/x,A=bi(g,m),_=sl(g,$),P=sl(m,S);Zf(_,P);var M=A,R=al(_,M),v=al(M,M),E=R*R-v*(al(_,_)-1);if(!(E<0)){var k=Ne(E),T=sl(M,(-R-k)/v);if(Zf(T,_),T=ol(T),!f)return T;var w=c[0],C=h[0],F=c[1],O=h[1],B;C<w&&(B=w,w=C,C=B);var N=C-w,I=de(N-pe)<oe,W=I||N<oe;if(!I&&O<F&&(B=F,F=O,O=B),W?I?F+O>0^T[1]<(de(T[0]-w)<oe?F:O):F<=T[1]&&T[1]<=O:N>pe^(w<=T[0]&&T[0]<=C)){var H=sl(M,(-R+k)/v);return Zf(H,_),[T,ol(H)]}}}function u(c,h){var f=r?e:pe-e,p=0;return c<-f?p|=1:c>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return j1(a,s,o,r?[0,-e]:[-pe,e-pe])}function C4(e,t,n,r,i,o){var a=e[0],s=e[1],l=t[0],u=t[1],c=0,h=1,f=l-a,p=u-s,d;if(d=n-a,!(!f&&d>0)){if(d/=f,f<0){if(d<c)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>c&&(c=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>c&&(c=d)}else if(f>0){if(d<c)return;d<h&&(h=d)}if(d=r-s,!(!p&&d>0)){if(d/=p,p<0){if(d<c)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>c&&(c=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>c&&(c=d)}else if(p>0){if(d<c)return;d<h&&(h=d)}return c>0&&(e[0]=a+c*f,e[1]=s+c*p),h<1&&(t[0]=a+h*f,t[1]=s+h*p),!0}}}}}var Fo=1e9,bl=-Fo;function xl(e,t,n,r){function i(u,c){return e<=u&&u<=n&&t<=c&&c<=r}function o(u,c,h,f){var p=0,d=0;if(u==null||(p=a(u,h))!==(d=a(c,h))||l(u,c)<0^h>0)do f.point(p===0||p===3?e:n,p>1?r:t);while((p=(p+h+4)%4)!==d);else f.point(c[0],c[1])}function a(u,c){return de(u[0]-e)<oe?c>0?0:3:de(u[0]-n)<oe?c>0?2:1:de(u[1]-t)<oe?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var h=a(u,1),f=a(c,1);return h!==f?h-f:h===0?c[1]-u[1]:h===1?u[0]-c[0]:h===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,h=G1(),f,p,d,g,m,b,y,x,$,S,A,_={point:P,lineStart:E,lineEnd:k,polygonStart:R,polygonEnd:v};function P(w,C){i(w,C)&&c.point(w,C)}function M(){for(var w=0,C=0,F=p.length;C<F;++C)for(var O=p[C],B=1,N=O.length,I=O[0],W,H,ie=I[0],Y=I[1];B<N;++B)W=ie,H=Y,I=O[B],ie=I[0],Y=I[1],H<=r?Y>r&&(ie-W)*(r-H)>(Y-H)*(e-W)&&++w:Y<=r&&(ie-W)*(r-H)<(Y-H)*(e-W)&&--w;return w}function R(){c=h,f=[],p=[],A=!0}function v(){var w=M(),C=A&&w,F=(f=Mc(f)).length;(C||F)&&(u.polygonStart(),C&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),F&&W1(f,s,w,o,u),u.polygonEnd()),c=u,f=p=d=null}function E(){_.point=T,p&&p.push(d=[]),S=!0,$=!1,y=x=NaN}function k(){f&&(T(g,m),b&&$&&h.rejoin(),f.push(h.result())),_.point=P,$&&c.lineEnd()}function T(w,C){var F=i(w,C);if(p&&d.push([w,C]),S)g=w,m=C,b=F,S=!1,F&&(c.lineStart(),c.point(w,C));else if(F&&$)c.point(w,C);else{var O=[y=Math.max(bl,Math.min(Fo,y)),x=Math.max(bl,Math.min(Fo,x))],B=[w=Math.max(bl,Math.min(Fo,w)),C=Math.max(bl,Math.min(Fo,C))];C4(O,B,e,t,n,r)?($||(c.lineStart(),c.point(O[0],O[1])),c.point(B[0],B[1]),F||c.lineEnd(),A=!1):F&&(c.lineStart(),c.point(w,C),A=!1)}y=w,x=C,$=F}return _}}function D4(){var e=0,t=0,n=960,r=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=xl(e,t,n,r)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1],i=o=null,a):[[e,t],[n,r]]}}}var sh,lh,$l,vl,vi={sphere:Te,point:Te,lineStart:M4,lineEnd:Te,polygonStart:Te,polygonEnd:Te};function M4(){vi.point=k4,vi.lineEnd=L4}function L4(){vi.point=vi.lineEnd=Te}function k4(e,t){e*=ae,t*=ae,lh=e,$l=te(t),vl=re(t),vi.point=R4}function R4(e,t){e*=ae,t*=ae;var n=te(t),r=re(t),i=de(e-lh),o=re(i),a=te(i),s=r*a,l=vl*n-$l*r*o,u=$l*n+vl*r*o;sh.add(Qe(Ne(s*s+l*l),u)),lh=e,$l=n,vl=r}function U1(e){return sh=new ke,Nt(e,vi),+sh}var uh=[null,null],E4={type:"LineString",coordinates:uh};function Sl(e,t){return uh[0]=e,uh[1]=t,U1(E4)}var H1={Feature:function(e,t){return _l(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(_l(n[r].geometry,t))return!0;return!1}},q1={Sphere:function(){return!0},Point:function(e,t){return Z1(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Z1(n[r],t))return!0;return!1},LineString:function(e,t){return K1(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(K1(n[r],t))return!0;return!1},Polygon:function(e,t){return Q1(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(Q1(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(_l(n[r],t))return!0;return!1}};function _l(e,t){return e&&q1.hasOwnProperty(e.type)?q1[e.type](e,t):!1}function Z1(e,t){return Sl(e,t)===0}function K1(e,t){for(var n,r,i,o=0,a=e.length;o<a;o++){if(r=Sl(e[o],t),r===0||o>0&&(i=Sl(e[o],e[o-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Eo*i))return!0;n=r}return!1}function Q1(e,t){return!!V1(e.map(I4),J1(t))}function I4(e){return e=e.map(J1),e.pop(),e}function J1(e){return[e[0]*ae,e[1]*ae]}function B4(e,t){return(e&&H1.hasOwnProperty(e.type)?H1[e.type]:_l)(e,t)}function eb(e,t,n){var r=Pn(e,t-oe,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function tb(e,t,n){var r=Pn(e,t-oe,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function nb(){var e,t,n,r,i,o,a,s,l=10,u=l,c=90,h=360,f,p,d,g,m=2.5;function b(){return{type:"MultiLineString",coordinates:y()}}function y(){return Pn(el(r/c)*c,n,c).map(d).concat(Pn(el(s/h)*h,a,h).map(g)).concat(Pn(el(t/l)*l,e,l).filter(function(x){return de(x%c)>oe}).map(f)).concat(Pn(el(o/u)*u,i,u).filter(function(x){return de(x%h)>oe}).map(p))}return b.lines=function(){return y().map(function(x){return{type:"LineString",coordinates:x}})},b.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(g(a).slice(1),d(n).reverse().slice(1),g(s).reverse().slice(1))]}},b.extent=function(x){return arguments.length?b.extentMajor(x).extentMinor(x):b.extentMinor()},b.extentMajor=function(x){return arguments.length?(r=+x[0][0],n=+x[1][0],s=+x[0][1],a=+x[1][1],r>n&&(x=r,r=n,n=x),s>a&&(x=s,s=a,a=x),b.precision(m)):[[r,s],[n,a]]},b.extentMinor=function(x){return arguments.length?(t=+x[0][0],e=+x[1][0],o=+x[0][1],i=+x[1][1],t>e&&(x=t,t=e,e=x),o>i&&(x=o,o=i,i=x),b.precision(m)):[[t,o],[e,i]]},b.step=function(x){return arguments.length?b.stepMajor(x).stepMinor(x):b.stepMinor()},b.stepMajor=function(x){return arguments.length?(c=+x[0],h=+x[1],b):[c,h]},b.stepMinor=function(x){return arguments.length?(l=+x[0],u=+x[1],b):[l,u]},b.precision=function(x){return arguments.length?(m=+x,f=eb(o,i,90),p=tb(t,e,m),d=eb(s,a,90),g=tb(r,n,m),b):m},b.extentMajor([[-180,-90+oe],[180,90-oe]]).extentMinor([[-180,-80-oe],[180,80+oe]])}function N4(){return nb()()}function F4(e,t){var n=e[0]*ae,r=e[1]*ae,i=t[0]*ae,o=t[1]*ae,a=re(r),s=te(r),l=re(o),u=te(o),c=a*re(n),h=a*te(n),f=l*re(i),p=l*te(i),d=2*Je(Ne(m1(o-r)+a*l*m1(i-n))),g=te(d),m=d?function(b){var y=te(b*=d)/g,x=te(d-b)/g,$=x*c+y*f,S=x*h+y*p,A=x*s+y*u;return[Qe(S,$)*$e,Qe(A,Ne($*$+S*S))*$e]}:function(){return[n*$e,r*$e]};return m.distance=d,m}const zo=e=>e;var ch=new ke,fh=new ke,rb,ib,hh,ph,dn={point:Te,lineStart:Te,lineEnd:Te,polygonStart:function(){dn.lineStart=z4,dn.lineEnd=G4},polygonEnd:function(){dn.lineStart=dn.lineEnd=dn.point=Te,ch.add(de(fh)),fh=new ke},result:function(){var e=ch/2;return ch=new ke,e}};function z4(){dn.point=O4}function O4(e,t){dn.point=ob,rb=hh=e,ib=ph=t}function ob(e,t){fh.add(ph*e-hh*t),hh=e,ph=t}function G4(){ob(rb,ib)}var Si=1/0,wl=Si,Oo=-Si,Tl=Oo,Al={point:W4,lineStart:Te,lineEnd:Te,polygonStart:Te,polygonEnd:Te,result:function(){var e=[[Si,wl],[Oo,Tl]];return Oo=Tl=-(wl=Si=1/0),e}};function W4(e,t){e<Si&&(Si=e),e>Oo&&(Oo=e),t<wl&&(wl=t),t>Tl&&(Tl=t)}var dh=0,gh=0,Go=0,Pl=0,Cl=0,_i=0,mh=0,yh=0,Wo=0,ab,sb,Qt,Jt,_t={point:xr,lineStart:lb,lineEnd:ub,polygonStart:function(){_t.lineStart=j4,_t.lineEnd=X4},polygonEnd:function(){_t.point=xr,_t.lineStart=lb,_t.lineEnd=ub},result:function(){var e=Wo?[mh/Wo,yh/Wo]:_i?[Pl/_i,Cl/_i]:Go?[dh/Go,gh/Go]:[NaN,NaN];return dh=gh=Go=Pl=Cl=_i=mh=yh=Wo=0,e}};function xr(e,t){dh+=e,gh+=t,++Go}function lb(){_t.point=Y4}function Y4(e,t){_t.point=V4,xr(Qt=e,Jt=t)}function V4(e,t){var n=e-Qt,r=t-Jt,i=Ne(n*n+r*r);Pl+=i*(Qt+e)/2,Cl+=i*(Jt+t)/2,_i+=i,xr(Qt=e,Jt=t)}function ub(){_t.point=xr}function j4(){_t.point=U4}function X4(){cb(ab,sb)}function U4(e,t){_t.point=cb,xr(ab=Qt=e,sb=Jt=t)}function cb(e,t){var n=e-Qt,r=t-Jt,i=Ne(n*n+r*r);Pl+=i*(Qt+e)/2,Cl+=i*(Jt+t)/2,_i+=i,i=Jt*e-Qt*t,mh+=i*(Qt+e),yh+=i*(Jt+t),Wo+=i*3,xr(Qt=e,Jt=t)}function fb(e){this._context=e}fb.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ke);break}}},result:Te};var bh=new ke,xh,hb,pb,Yo,Vo,jo={point:Te,lineStart:function(){jo.point=H4},lineEnd:function(){xh&&db(hb,pb),jo.point=Te},polygonStart:function(){xh=!0},polygonEnd:function(){xh=null},result:function(){var e=+bh;return bh=new ke,e}};function H4(e,t){jo.point=db,hb=Yo=e,pb=Vo=t}function db(e,t){Yo-=e,Vo-=t,bh.add(Ne(Yo*Yo+Vo*Vo)),Yo=e,Vo=t}let gb,Dl,mb,yb;class bb{constructor(t){this._append=t==null?xb:q4(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==mb||this._append!==Dl){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,mb=r,Dl=this._append,yb=this._,this._=i}this._+=yb;break}}}result(){const t=this._;return this._="",t.length?t:null}}function xb(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function q4(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return xb;if(t!==gb){const n=10**t;gb=t,Dl=function(i){let o=1;this._+=i[0];for(const a=i.length;o<a;++o)this._+=Math.round(arguments[o]*n)/n+i[o]}}return Dl}function Z4(e,t){let n=3,r=4.5,i,o;function a(s){return s&&(typeof r=="function"&&o.pointRadius(+r.apply(this,arguments)),Nt(s,i(o))),o.result()}return a.area=function(s){return Nt(s,i(dn)),dn.result()},a.measure=function(s){return Nt(s,i(jo)),jo.result()},a.bounds=function(s){return Nt(s,i(Al)),Al.result()},a.centroid=function(s){return Nt(s,i(_t)),_t.result()},a.projection=function(s){return arguments.length?(i=s==null?(e=null,zo):(e=s).stream,a):e},a.context=function(s){return arguments.length?(o=s==null?(t=null,new bb(n)):new fb(t=s),typeof r!="function"&&o.pointRadius(r),a):t},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(o.pointRadius(+s),+s),a):r},a.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const l=Math.floor(s);if(!(l>=0))throw new RangeError(`invalid digits: ${s}`);n=l}return t===null&&(o=new bb(n)),a},a.projection(e).digits(n).context(t)}function K4(e){return{stream:Xo(e)}}function Xo(e){return function(t){var n=new $h;for(var r in e)n[r]=e[r];return n.stream=t,n}}function $h(){}$h.prototype={constructor:$h,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function vh(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Nt(n,e.stream(Al)),t(Al.result()),r!=null&&e.clipExtent(r),e}function Ml(e,t,n){return vh(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),s=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,l])},n)}function Sh(e,t,n){return Ml(e,[[0,0],t],n)}function _h(e,t,n){return vh(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,s=-o*r[0][1];e.scale(150*o).translate([a,s])},n)}function wh(e,t,n){return vh(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],s=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([a,s])},n)}var $b=16,Q4=re(30*ae);function vb(e,t){return+t?ek(e,t):J4(e)}function J4(e){return Xo({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function ek(e,t){function n(r,i,o,a,s,l,u,c,h,f,p,d,g,m){var b=u-r,y=c-i,x=b*b+y*y;if(x>4*t&&g--){var $=a+f,S=s+p,A=l+d,_=Ne($*$+S*S+A*A),P=Je(A/=_),M=de(de(A)-1)<oe||de(o-h)<oe?(o+h)/2:Qe(S,$),R=e(M,P),v=R[0],E=R[1],k=v-r,T=E-i,w=y*k-b*T;(w*w/x>t||de((b*k+y*T)/x-.5)>.3||a*f+s*p+l*d<Q4)&&(n(r,i,o,a,s,l,v,E,M,$/=_,S/=_,A,g,m),m.point(v,E),n(v,E,M,$,S,A,u,c,h,f,p,d,g,m))}}return function(r){var i,o,a,s,l,u,c,h,f,p,d,g,m={point:b,lineStart:y,lineEnd:$,polygonStart:function(){r.polygonStart(),m.lineStart=S},polygonEnd:function(){r.polygonEnd(),m.lineStart=y}};function b(P,M){P=e(P,M),r.point(P[0],P[1])}function y(){h=NaN,m.point=x,r.lineStart()}function x(P,M){var R=yr([P,M]),v=e(P,M);n(h,f,c,p,d,g,h=v[0],f=v[1],c=P,p=R[0],d=R[1],g=R[2],$b,r),r.point(h,f)}function $(){m.point=b,r.lineEnd()}function S(){y(),m.point=A,m.lineEnd=_}function A(P,M){x(i=P,M),o=h,a=f,s=p,l=d,u=g,m.point=x}function _(){n(h,f,c,p,d,g,o,a,i,s,l,u,$b,r),m.lineEnd=$,$()}return m}}var tk=Xo({point:function(e,t){this.stream.point(e*ae,t*ae)}});function nk(e){return Xo({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function rk(e,t,n,r,i){function o(a,s){return a*=r,s*=i,[t+e*a,n-e*s]}return o.invert=function(a,s){return[(a-t)/e*r,(n-s)/e*i]},o}function Sb(e,t,n,r,i,o){if(!o)return rk(e,t,n,r,i);var a=re(o),s=te(o),l=a*e,u=s*e,c=a/e,h=s/e,f=(s*n-a*t)/e,p=(s*t+a*n)/e;function d(g,m){return g*=r,m*=i,[l*g-u*m+t,n-u*g-l*m]}return d.invert=function(g,m){return[r*(c*g-h*m+f),i*(p-h*g-c*m)]},d}function en(e){return Th(function(){return e})()}function Th(e){var t,n=150,r=480,i=250,o=0,a=0,s=0,l=0,u=0,c,h=0,f=1,p=1,d=null,g=ah,m=null,b,y,x,$=zo,S=.5,A,_,P,M,R;function v(w){return P(w[0]*ae,w[1]*ae)}function E(w){return w=P.invert(w[0],w[1]),w&&[w[0]*$e,w[1]*$e]}v.stream=function(w){return M&&R===w?M:M=tk(nk(c)(g(A($(R=w)))))},v.preclip=function(w){return arguments.length?(g=w,d=void 0,T()):g},v.postclip=function(w){return arguments.length?($=w,m=b=y=x=null,T()):$},v.clipAngle=function(w){return arguments.length?(g=+w?X1(d=w*ae):(d=null,ah),T()):d*$e},v.clipExtent=function(w){return arguments.length?($=w==null?(m=b=y=x=null,zo):xl(m=+w[0][0],b=+w[0][1],y=+w[1][0],x=+w[1][1]),T()):m==null?null:[[m,b],[y,x]]},v.scale=function(w){return arguments.length?(n=+w,k()):n},v.translate=function(w){return arguments.length?(r=+w[0],i=+w[1],k()):[r,i]},v.center=function(w){return arguments.length?(o=w[0]%360*ae,a=w[1]%360*ae,k()):[o*$e,a*$e]},v.rotate=function(w){return arguments.length?(s=w[0]%360*ae,l=w[1]%360*ae,u=w.length>2?w[2]%360*ae:0,k()):[s*$e,l*$e,u*$e]},v.angle=function(w){return arguments.length?(h=w%360*ae,k()):h*$e},v.reflectX=function(w){return arguments.length?(f=w?-1:1,k()):f<0},v.reflectY=function(w){return arguments.length?(p=w?-1:1,k()):p<0},v.precision=function(w){return arguments.length?(A=vb(_,S=w*w),T()):Ne(S)},v.fitExtent=function(w,C){return Ml(v,w,C)},v.fitSize=function(w,C){return Sh(v,w,C)},v.fitWidth=function(w,C){return _h(v,w,C)},v.fitHeight=function(w,C){return wh(v,w,C)};function k(){var w=Sb(n,0,0,f,p,h).apply(null,t(o,a)),C=Sb(n,r-w[0],i-w[1],f,p,h);return c=ih(s,l,u),_=nh(t,C),P=nh(c,_),A=vb(_,S),T()}function T(){return M=R=null,v}return function(){return t=e.apply(this,arguments),v.invert=t.invert&&E,k()}}function Ah(e){var t=0,n=pe/3,r=Th(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*ae,n=o[1]*ae):[t*$e,n*$e]},i}function ik(e){var t=re(e);function n(r,i){return[r*t,te(i)/t]}return n.invert=function(r,i){return[r/t,Je(i*t)]},n}function _b(e,t){var n=te(e),r=(n+te(t))/2;if(de(r)<oe)return ik(e);var i=1+n*(2*r-n),o=Ne(i)/r;function a(s,l){var u=Ne(i-2*r*te(l))/r;return[u*te(s*=r),o-u*re(s)]}return a.invert=function(s,l){var u=o-l,c=Qe(s,de(u))*St(u);return u*r<0&&(c-=pe*St(s)*St(u)),[c/r,Je((i-(s*s+u*u)*r*r)/(2*r))]},a}function Ll(){return Ah(_b).scale(155.424).center([0,33.6442])}function wb(){return Ll().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ok(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function ak(){var e,t,n=wb(),r,i=Ll().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Ll().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,u={point:function(f,p){l=[f,p]}};function c(f){var p=f[0],d=f[1];return l=null,r.point(p,d),l||(o.point(p,d),l)||(s.point(p,d),l)}c.invert=function(f){var p=n.scale(),d=n.translate(),g=(f[0]-d[0])/p,m=(f[1]-d[1])/p;return(m>=.12&&m<.234&&g>=-.425&&g<-.214?i:m>=.166&&m<.234&&g>=-.214&&g<-.115?a:n).invert(f)},c.stream=function(f){return e&&t===f?e:e=ok([n.stream(t=f),i.stream(f),a.stream(f)])},c.precision=function(f){return arguments.length?(n.precision(f),i.precision(f),a.precision(f),h()):n.precision()},c.scale=function(f){return arguments.length?(n.scale(f),i.scale(f*.35),a.scale(f),c.translate(n.translate())):n.scale()},c.translate=function(f){if(!arguments.length)return n.translate();var p=n.scale(),d=+f[0],g=+f[1];return r=n.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(u),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+oe,g+.12*p+oe],[d-.214*p-oe,g+.234*p-oe]]).stream(u),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+oe,g+.166*p+oe],[d-.115*p-oe,g+.234*p-oe]]).stream(u),h()},c.fitExtent=function(f,p){return Ml(c,f,p)},c.fitSize=function(f,p){return Sh(c,f,p)},c.fitWidth=function(f,p){return _h(c,f,p)},c.fitHeight=function(f,p){return wh(c,f,p)};function h(){return e=t=null,c}return c.scale(1070)}function Tb(e){return function(t,n){var r=re(t),i=re(n),o=e(r*i);return o===1/0?[2,0]:[o*i*te(t),o*te(n)]}}function Uo(e){return function(t,n){var r=Ne(t*t+n*n),i=e(r),o=te(i),a=re(i);return[Qe(t*o,r*a),Je(r&&n*o/r)]}}var Ph=Tb(function(e){return Ne(2/(1+e))});Ph.invert=Uo(function(e){return 2*Je(e/2)});function sk(){return en(Ph).scale(124.75).clipAngle(180-.001)}var Ch=Tb(function(e){return(e=g1(e))&&e/te(e)});Ch.invert=Uo(function(e){return e});function lk(){return en(Ch).scale(79.4188).clipAngle(180-.001)}function Ho(e,t){return[e,tl(jf((Pe+t)/2))]}Ho.invert=function(e,t){return[e,2*yi(d1(t))-Pe]};function uk(){return Ab(Ho).scale(961/Ke)}function Ab(e){var t=en(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,u;t.scale=function(h){return arguments.length?(r(h),c()):r()},t.translate=function(h){return arguments.length?(i(h),c()):i()},t.center=function(h){return arguments.length?(n(h),c()):n()},t.clipExtent=function(h){return arguments.length?(h==null?a=s=l=u=null:(a=+h[0][0],s=+h[0][1],l=+h[1][0],u=+h[1][1]),c()):a==null?null:[[a,s],[l,u]]};function c(){var h=pe*r(),f=t(F1(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:e===Ho?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,l),u]]:[[a,Math.max(f[1]-h,s)],[l,Math.min(f[1]+h,u)]])}return c()}function kl(e){return jf((Pe+e)/2)}function Pb(e,t){var n=re(e),r=e===t?te(e):tl(n/re(t))/tl(kl(t)/kl(e)),i=n*Vf(kl(e),r)/r;if(!r)return Ho;function o(a,s){i>0?s<-Pe+oe&&(s=-Pe+oe):s>Pe-oe&&(s=Pe-oe);var l=i/Vf(kl(s),r);return[l*te(r*a),i-l*re(r*a)]}return o.invert=function(a,s){var l=i-s,u=St(r)*Ne(a*a+l*l),c=Qe(a,de(l))*St(l);return l*r<0&&(c-=pe*St(a)*St(l)),[c/r,2*yi(Vf(i/u,1/r))-Pe]},o}function ck(){return Ah(Pb).scale(109.5).parallels([30,30])}function qo(e,t){return[e,t]}qo.invert=qo;function fk(){return en(qo).scale(152.63)}function Cb(e,t){var n=re(e),r=e===t?te(e):(n-re(t))/(t-e),i=n/r+e;if(de(r)<oe)return qo;function o(a,s){var l=i-s,u=r*a;return[l*te(u),i-l*re(u)]}return o.invert=function(a,s){var l=i-s,u=Qe(a,de(l))*St(l);return l*r<0&&(u-=pe*St(a)*St(l)),[u/r,i-St(r)*Ne(a*a+l*l)]},o}function hk(){return Ah(Cb).scale(131.154).center([0,13.9389])}var Zo=1.340264,Ko=-.081106,Qo=893e-6,Jo=.003796,Rl=Ne(3)/2,pk=12;function Dh(e,t){var n=Je(Rl*te(t)),r=n*n,i=r*r*r;return[e*re(n)/(Rl*(Zo+3*Ko*r+i*(7*Qo+9*Jo*r))),n*(Zo+Ko*r+i*(Qo+Jo*r))]}Dh.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,o=0,a,s,l;o<pk&&(s=n*(Zo+Ko*r+i*(Qo+Jo*r))-t,l=Zo+3*Ko*r+i*(7*Qo+9*Jo*r),n-=a=s/l,r=n*n,i=r*r*r,!(de(a)<Eo));++o);return[Rl*e*(Zo+3*Ko*r+i*(7*Qo+9*Jo*r))/re(n),Je(te(n)/Rl)]};function dk(){return en(Dh).scale(177.158)}function Mh(e,t){var n=re(t),r=re(e)*n;return[n*te(e)/r,te(t)/r]}Mh.invert=Uo(yi);function gk(){return en(Mh).scale(144.049).clipAngle(60)}function mk(){var e=1,t=0,n=0,r=1,i=1,o=0,a,s,l=null,u,c,h,f=1,p=1,d=Xo({point:function($,S){var A=x([$,S]);this.stream.point(A[0],A[1])}}),g=zo,m,b;function y(){return f=e*r,p=e*i,m=b=null,x}function x($){var S=$[0]*f,A=$[1]*p;if(o){var _=A*a-S*s;S=S*a+A*s,A=_}return[S+t,A+n]}return x.invert=function($){var S=$[0]-t,A=$[1]-n;if(o){var _=A*a+S*s;S=S*a-A*s,A=_}return[S/f,A/p]},x.stream=function($){return m&&b===$?m:m=d(g(b=$))},x.postclip=function($){return arguments.length?(g=$,l=u=c=h=null,y()):g},x.clipExtent=function($){return arguments.length?(g=$==null?(l=u=c=h=null,zo):xl(l=+$[0][0],u=+$[0][1],c=+$[1][0],h=+$[1][1]),y()):l==null?null:[[l,u],[c,h]]},x.scale=function($){return arguments.length?(e=+$,y()):e},x.translate=function($){return arguments.length?(t=+$[0],n=+$[1],y()):[t,n]},x.angle=function($){return arguments.length?(o=$%360*ae,s=te(o),a=re(o),y()):o*$e},x.reflectX=function($){return arguments.length?(r=$?-1:1,y()):r<0},x.reflectY=function($){return arguments.length?(i=$?-1:1,y()):i<0},x.fitExtent=function($,S){return Ml(x,$,S)},x.fitSize=function($,S){return Sh(x,$,S)},x.fitWidth=function($,S){return _h(x,$,S)},x.fitHeight=function($,S){return wh(x,$,S)},x}function Lh(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Lh.invert=function(e,t){var n=t,r=25,i;do{var o=n*n,a=o*o;n-=i=(n*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(de(i)>oe&&--r>0);return[e/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function yk(){return en(Lh).scale(175.295)}function kh(e,t){return[re(t)*te(e),te(t)]}kh.invert=Uo(Je);function bk(){return en(kh).scale(249.5).clipAngle(90+oe)}function Rh(e,t){var n=re(t),r=1+re(e)*n;return[n*te(e)/r,te(t)/r]}Rh.invert=Uo(function(e){return 2*yi(e)});function xk(){return en(Rh).scale(250).clipAngle(142)}function Eh(e,t){return[tl(jf((Pe+t)/2)),-e]}Eh.invert=function(e,t){return[-t,2*yi(d1(e))-Pe]};function $k(){var e=Ab(Eh),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}function vk(e,t){return e.parent===t.parent?1:2}function Sk(e){return e.reduce(_k,0)/e.length}function _k(e,t){return e+t.x}function wk(e){return 1+e.reduce(Tk,0)}function Tk(e,t){return Math.max(e,t.y)}function Ak(e){for(var t;t=e.children;)e=t[0];return e}function Pk(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Ck(){var e=vk,t=1,n=1,r=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=Sk(p),f.y=wk(p)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=Ak(o),u=Pk(o),c=l.x-e(l,u)/2,h=u.x+e(u,l)/2;return o.eachAfter(r?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*n}:function(f){f.x=(f.x-c)/(h-c)*t,f.y=(1-(o.y?f.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function Dk(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Mk(){return this.eachAfter(Dk)}function Lk(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function kk(e,t){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function Rk(e,t){for(var n=this,r=[n],i=[],o,a,s,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function Ek(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Ik(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Bk(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Nk(e){for(var t=this,n=Fk(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Fk(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function zk(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Ok(){return Array.from(this)}function Gk(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function Wk(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*Yk(){var e=this,t,n=[e],r,i,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function El(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Xk)):t===void 0&&(t=jk);for(var n=new $r(e),r,i=[n],o,a,s,l;r=i.pop();)if((a=t(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,s=l-1;s>=0;--s)i.push(o=a[s]=new $r(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(Db)}function Vk(){return El(this).eachBefore(Uk)}function jk(e){return e.children}function Xk(e){return Array.isArray(e)?e[1]:null}function Uk(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Db(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function $r(e){this.data=e,this.depth=this.height=0,this.parent=null}$r.prototype=El.prototype={constructor:$r,count:Mk,each:Lk,eachAfter:Rk,eachBefore:kk,find:Ek,sum:Ik,sort:Bk,path:Nk,ancestors:zk,descendants:Ok,leaves:Gk,links:Wk,copy:Vk,[Symbol.iterator]:Yk};function Il(e){return e==null?null:Mb(e)}function Mb(e){if(typeof e!="function")throw new Error;return e}function vr(){return 0}function wi(e){return function(){return e}}const Hk=1664525,qk=1013904223,Lb=4294967296;function Ih(){let e=1;return()=>(e=(Hk*e+qk)%Lb)/Lb}function Zk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Kk(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function Qk(e){return kb(e,Ih())}function kb(e,t){for(var n=0,r=(e=Kk(Array.from(e),t)).length,i=[],o,a;n<r;)o=e[n],a&&Rb(a,o)?++n:(a=e7(i=Jk(i,o)),n=0);return a}function Jk(e,t){var n,r;if(Bh(t,e))return[t];for(n=0;n<e.length;++n)if(Bl(t,e[n])&&Bh(ea(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(Bl(ea(e[n],e[r]),t)&&Bl(ea(e[n],t),e[r])&&Bl(ea(e[r],t),e[n])&&Bh(Eb(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function Bl(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function Rb(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Bh(e,t){for(var n=0;n<t.length;++n)if(!Rb(e,t[n]))return!1;return!0}function e7(e){switch(e.length){case 1:return t7(e[0]);case 2:return ea(e[0],e[1]);case 3:return Eb(e[0],e[1],e[2])}}function t7(e){return{x:e.x,y:e.y,r:e.r}}function ea(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-n,u=a-r,c=s-i,h=Math.sqrt(l*l+u*u);return{x:(n+o+l/h*c)/2,y:(r+a+u/h*c)/2,r:(h+i+s)/2}}function Eb(e,t,n){var r=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,u=n.x,c=n.y,h=n.r,f=r-a,p=r-u,d=i-s,g=i-c,m=l-o,b=h-o,y=r*r+i*i-o*o,x=y-a*a-s*s+l*l,$=y-u*u-c*c+h*h,S=p*d-f*g,A=(d*$-g*x)/(S*2)-r,_=(g*m-d*b)/S,P=(p*x-f*$)/(S*2)-i,M=(f*b-p*m)/S,R=_*_+M*M-1,v=2*(o+A*_+P*M),E=A*A+P*P-o*o,k=-(Math.abs(R)>1e-6?(v+Math.sqrt(v*v-4*R*E))/(2*R):E/v);return{x:r+A+_*k,y:i+P+M*k,r:k}}function Ib(e,t,n){var r=e.x-t.x,i,o,a=e.y-t.y,s,l,u=r*r+a*a;u?(o=t.r+n.r,o*=o,l=e.r+n.r,l*=l,o>l?(i=(u+l-o)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),n.x=e.x-i*r-s*a,n.y=e.y-i*a+s*r):(i=(u+o-l)/(2*u),s=Math.sqrt(Math.max(0,o/u-i*i)),n.x=t.x+i*r-s*a,n.y=t.y+i*a+s*r)):(n.x=t.x+n.r,n.y=t.y)}function Bb(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Nb(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function Nl(e){this._=e,this.next=null,this.previous=null}function Fb(e,t){if(!(o=(e=Zk(e)).length))return 0;var n,r,i,o,a,s,l,u,c,h,f;if(n=e[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Ib(r,n,i=e[2]),n=new Nl(n),r=new Nl(r),i=new Nl(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(l=3;l<o;++l){Ib(n._,r._,i=e[l]),i=new Nl(i),u=r.next,c=n.previous,h=r._.r,f=n._.r;do if(h<=f){if(Bb(u._,i._)){r=u,n.next=r,r.previous=n,--l;continue e}h+=u._.r,u=u.next}else{if(Bb(c._,i._)){n=c,n.next=r,r.previous=n,--l;continue e}f+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=Nb(n);(i=i.next)!==r;)(s=Nb(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=kb(n,t),l=0;l<o;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function n7(e){return Fb(e,Ih()),e}function r7(e){return Math.sqrt(e.value)}function i7(){var e=null,t=1,n=1,r=vr;function i(o){const a=Ih();return o.x=t/2,o.y=n/2,e?o.eachBefore(zb(e)).eachAfter(Nh(r,.5,a)).eachBefore(Ob(1)):o.eachBefore(zb(r7)).eachAfter(Nh(vr,1,a)).eachAfter(Nh(r,o.r/Math.min(t,n),a)).eachBefore(Ob(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=Il(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:wi(+o),i):r},i}function zb(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Nh(e,t,n){return function(r){if(i=r.children){var i,o,a=i.length,s=e(r)*t||0,l;if(s)for(o=0;o<a;++o)i[o].r+=s;if(l=Fb(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=l+s}}}function Ob(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Gb(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ta(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function o7(){var e=1,t=1,n=0,r=!1;function i(a){var s=a.height+1;return a.x0=a.y0=n,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),r&&a.eachBefore(Gb),a}function o(a,s){return function(l){l.children&&ta(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var u=l.x0,c=l.y0,h=l.x1-n,f=l.y1-n;h<u&&(u=h=(u+h)/2),f<c&&(c=f=(c+f)/2),l.x0=u,l.y0=c,l.x1=h,l.y1=f}}return i.round=function(a){return arguments.length?(r=!!a,i):r},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(n=+a,i):n},i}var a7={depth:-1},Wb={},Fh={};function s7(e){return e.id}function l7(e){return e.parentId}function u7(){var e=s7,t=l7,n;function r(i){var o=Array.from(i),a=e,s=t,l,u,c,h,f,p,d,g,m=new Map;if(n!=null){const b=o.map(($,S)=>c7(n($,S,i))),y=b.map(Yb),x=new Set(b).add("");for(const $ of y)x.has($)||(x.add($),b.push($),y.push(Yb($)),o.push(Fh));a=($,S)=>b[S],s=($,S)=>y[S]}for(c=0,l=o.length;c<l;++c)u=o[c],p=o[c]=new $r(u),(d=a(u,c,i))!=null&&(d+="")&&(g=p.id=d,m.set(g,m.has(g)?Wb:p)),(d=s(u,c,i))!=null&&(d+="")&&(p.parent=d);for(c=0;c<l;++c)if(p=o[c],d=p.parent){if(f=m.get(d),!f)throw new Error("missing: "+d);if(f===Wb)throw new Error("ambiguous: "+d);f.children?f.children.push(p):f.children=[p],p.parent=f}else{if(h)throw new Error("multiple roots");h=p}if(!h)throw new Error("no root");if(n!=null){for(;h.data===Fh&&h.children.length===1;)h=h.children[0],--l;for(let b=o.length-1;b>=0&&(p=o[b],p.data===Fh);--b)p.data=null}if(h.parent=a7,h.eachBefore(function(b){b.depth=b.parent.depth+1,--l}).eachBefore(Db),h.parent=null,l>0)throw new Error("cycle");return h}return r.id=function(i){return arguments.length?(e=Il(i),r):e},r.parentId=function(i){return arguments.length?(t=Il(i),r):t},r.path=function(i){return arguments.length?(n=Il(i),r):n},r}function c7(e){e=`${e}`;let t=e.length;return zh(e,t-1)&&!zh(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Yb(e){let t=e.length;if(t<2)return"";for(;--t>1&&!zh(e,t););return e.slice(0,t)}function zh(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function f7(e,t){return e.parent===t.parent?1:2}function Oh(e){var t=e.children;return t?t[0]:e.t}function Gh(e){var t=e.children;return t?t[t.length-1]:e.t}function h7(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function p7(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function d7(e,t,n){return e.a.parent===t.parent?e.a:n}function Fl(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Fl.prototype=Object.create($r.prototype);function g7(e){for(var t=new Fl(e,0),n,r=[t],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Fl(o[a],a)),i.parent=n;return(t.parent=new Fl(null,0)).children=[t],t}function m7(){var e=f7,t=1,n=1,r=null;function i(u){var c=g7(u);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)u.eachBefore(l);else{var h=u,f=u,p=u;u.eachBefore(function(y){y.x<h.x&&(h=y),y.x>f.x&&(f=y),y.depth>p.depth&&(p=y)});var d=h===f?1:e(h,f)/2,g=d-h.x,m=t/(f.x+d+g),b=n/(p.depth||1);u.eachBefore(function(y){y.x=(y.x+g)*m,y.y=y.depth*b})}return u}function o(u){var c=u.children,h=u.parent.children,f=u.i?h[u.i-1]:null;if(c){p7(u);var p=(c[0].z+c[c.length-1].z)/2;f?(u.z=f.z+e(u._,f._),u.m=u.z-p):u.z=p}else f&&(u.z=f.z+e(u._,f._));u.parent.A=s(u,f,u.parent.A||h[0])}function a(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,h){if(c){for(var f=u,p=u,d=c,g=f.parent.children[0],m=f.m,b=p.m,y=d.m,x=g.m,$;d=Gh(d),f=Oh(f),d&&f;)g=Oh(g),p=Gh(p),p.a=u,$=d.z+y-f.z-m+e(d._,f._),$>0&&(h7(d7(d,u,h),u,$),m+=$,b+=$),y+=d.m,m+=f.m,x+=g.m,b+=p.m;d&&!Gh(p)&&(p.t=d,p.m+=y-b),f&&!Oh(g)&&(g.t=f,g.m+=m-x,h=u)}return h}function l(u){u.x*=t,u.y=u.depth*n}return i.separation=function(u){return arguments.length?(e=u,i):e},i.size=function(u){return arguments.length?(r=!1,t=+u[0],n=+u[1],i):r?null:[t,n]},i.nodeSize=function(u){return arguments.length?(r=!0,t=+u[0],n=+u[1],i):r?[t,n]:null},i}function zl(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,u=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var Vb=(1+Math.sqrt(5))/2;function jb(e,t,n,r,i,o){for(var a=[],s=t.children,l,u,c=0,h=0,f=s.length,p,d,g=t.value,m,b,y,x,$,S,A;c<f;){p=i-n,d=o-r;do m=s[h++].value;while(!m&&h<f);for(b=y=m,S=Math.max(d/p,p/d)/(g*e),A=m*m*S,$=Math.max(y/A,A/b);h<f;++h){if(m+=u=s[h].value,u<b&&(b=u),u>y&&(y=u),A=m*m*S,x=Math.max(y/A,A/b),x>$){m-=u;break}$=x}a.push(l={value:m,dice:p<d,children:s.slice(c,h)}),l.dice?ta(l,n,r,i,g?r+=d*m/g:o):zl(l,n,r,g?n+=p*m/g:i,o),g-=m,c=h}return a}const Wh=function e(t){function n(r,i,o,a,s){jb(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Vb);function Xb(){var e=Wh,t=!1,n=1,r=1,i=[0],o=vr,a=vr,s=vr,l=vr,u=vr;function c(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(h),i=[0],t&&f.eachBefore(Gb),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,m=f.x1-p,b=f.y1-p;m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),f.x0=d,f.y0=g,f.x1=m,f.y1=b,f.children&&(p=i[f.depth+1]=o(f)/2,d+=u(f)-p,g+=a(f)-p,m-=s(f)-p,b-=l(f)-p,m<d&&(d=m=(d+m)/2),b<g&&(g=b=(g+b)/2),e(f,d,g,m,b))}return c.round=function(f){return arguments.length?(t=!!f,c):t},c.size=function(f){return arguments.length?(n=+f[0],r=+f[1],c):[n,r]},c.tile=function(f){return arguments.length?(e=Mb(f),c):e},c.padding=function(f){return arguments.length?c.paddingInner(f).paddingOuter(f):c.paddingInner()},c.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:wi(+f),c):o},c.paddingOuter=function(f){return arguments.length?c.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):c.paddingTop()},c.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:wi(+f),c):a},c.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:wi(+f),c):s},c.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:wi(+f),c):l},c.paddingLeft=function(f){return arguments.length?(u=typeof f=="function"?f:wi(+f),c):u},c}function y7(e,t,n,r,i){var o=e.children,a,s=o.length,l,u=new Array(s+1);for(u[0]=l=a=0;a<s;++a)u[a+1]=l+=o[a].value;c(0,s,e.value,t,n,r,i);function c(h,f,p,d,g,m,b){if(h>=f-1){var y=o[h];y.x0=d,y.y0=g,y.x1=m,y.y1=b;return}for(var x=u[h],$=p/2+x,S=h+1,A=f-1;S<A;){var _=S+A>>>1;u[_]<$?S=_+1:A=_}$-u[S-1]<u[S]-$&&h+1<S&&--S;var P=u[S]-x,M=p-P;if(m-d>b-g){var R=p?(d*M+m*P)/p:m;c(h,S,P,d,g,R,b),c(S,f,M,R,g,m,b)}else{var v=p?(g*M+b*P)/p:b;c(h,S,P,d,g,m,v),c(S,f,M,d,v,m,b)}}}function b7(e,t,n,r,i){(e.depth&1?zl:ta)(e,t,n,r,i)}const x7=function e(t){function n(r,i,o,a,s){if((l=r._squarify)&&l.ratio===t)for(var l,u,c,h,f=-1,p,d=l.length,g=r.value;++f<d;){for(u=l[f],c=u.children,h=u.value=0,p=c.length;h<p;++h)u.value+=c[h].value;u.dice?ta(u,i,o,a,g?o+=(s-o)*u.value/g:s):zl(u,i,o,g?i+=(a-i)*u.value/g:a,s),g-=u.value}else r._squarify=l=jb(t,r,i,o,a,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Vb);function $7(e){for(var t=-1,n=e.length,r,i=e[n-1],o=0;++t<n;)r=i,i=e[t],o+=r[1]*i[0]-r[0]*i[1];return o/2}function v7(e){for(var t=-1,n=e.length,r=0,i=0,o,a=e[n-1],s,l=0;++t<n;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],r+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[r/l,i/l]}function S7(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function _7(e,t){return e[0]-t[0]||e[1]-t[1]}function Ub(e){const t=e.length,n=[0,1];let r=2,i;for(i=2;i<t;++i){for(;r>1&&S7(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function w7(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(_7),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=Ub(r),a=Ub(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],u=[];for(t=o.length-1;t>=0;--t)u.push(e[r[o[t]][2]]);for(t=+s;t<a.length-l;++t)u.push(e[r[a[t]][2]]);return u}function T7(e,t){for(var n=e.length,r=e[n-1],i=t[0],o=t[1],a=r[0],s=r[1],l,u,c=!1,h=0;h<n;++h)r=e[h],l=r[0],u=r[1],u>o!=s>o&&i<(a-l)*(o-u)/(s-u)+l&&(c=!c),a=l,s=u;return c}function A7(e){for(var t=-1,n=e.length,r=e[n-1],i,o,a=r[0],s=r[1],l=0;++t<n;)i=a,o=s,r=e[t],a=r[0],s=r[1],i-=a,o-=s,l+=Math.hypot(i,o);return l}const Oe=Math.random,P7=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,arguments.length===1?(i=r,r=0):i-=r,function(){return t()*i+r}}return n.source=e,n}(Oe),C7=function e(t){function n(r,i){return arguments.length<2&&(i=r,r=0),r=Math.floor(r),i=Math.floor(i)-r,function(){return Math.floor(t()*i+r)}}return n.source=e,n}(Oe),Yh=function e(t){function n(r,i){var o,a;return r=r==null?0:+r,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return r+i*s*Math.sqrt(-2*Math.log(a)/a)}}return n.source=e,n}(Oe),D7=function e(t){var n=Yh.source(t);function r(){var i=n.apply(this,arguments);return function(){return Math.exp(i())}}return r.source=e,r}(Oe),Hb=function e(t){function n(r){return(r=+r)<=0?()=>0:function(){for(var i=0,o=r;o>1;--o)i+=t();return i+o*t()}}return n.source=e,n}(Oe),M7=function e(t){var n=Hb.source(t);function r(i){if((i=+i)==0)return t;var o=n(i);return function(){return o()/i}}return r.source=e,r}(Oe),L7=function e(t){function n(r){return function(){return-Math.log1p(-t())/r}}return n.source=e,n}(Oe),k7=function e(t){function n(r){if((r=+r)<0)throw new RangeError("invalid alpha");return r=1/-r,function(){return Math.pow(1-t(),r)}}return n.source=e,n}(Oe),R7=function e(t){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+r)}}return n.source=e,n}(Oe),qb=function e(t){function n(r){if((r=+r)<0||r>1)throw new RangeError("invalid p");return r===0?()=>1/0:r===1?()=>1:(r=Math.log1p(-r),function(){return 1+Math.floor(Math.log1p(-t())/r)})}return n.source=e,n}(Oe),Vh=function e(t){var n=Yh.source(t)();function r(i,o){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(o=o==null?1:+o,i===1)return()=>-Math.log1p(-t())*o;var a=(i<1?i+1:i)-1/3,s=1/(3*Math.sqrt(a)),l=i<1?()=>Math.pow(t(),1/i):()=>1;return function(){do{do var u=n(),c=1+s*u;while(c<=0);c*=c*c;var h=1-t()}while(h>=1-.0331*u*u*u*u&&Math.log(h)>=.5*u*u+a*(1-c+Math.log(c)));return a*c*l()*o}}return r.source=e,r}(Oe),Zb=function e(t){var n=Vh.source(t);function r(i,o){var a=n(i),s=n(o);return function(){var l=a();return l===0?0:l/(l+s())}}return r.source=e,r}(Oe),Kb=function e(t){var n=qb.source(t),r=Zb.source(t);function i(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,l=o,u=a;l*u>16&&l*(1-u)>16;){var c=Math.floor((l+1)*u),h=r(c,l-c+1)();h<=u?(s+=c,l-=c,u=(u-h)/(1-h)):(l=c-1,u/=h)}for(var f=u<.5,p=f?u:1-u,d=n(p),g=d(),m=0;g<=l;++m)g+=d();return s+(f?m:l-m)}}return i.source=e,i}(Oe),E7=function e(t){function n(r,i,o){var a;return(r=+r)==0?a=s=>-Math.log(s):(r=1/r,a=s=>Math.pow(s,r)),i=i==null?0:+i,o=o==null?1:+o,function(){return i+o*a(-Math.log1p(-t()))}}return n.source=e,n}(Oe),I7=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){return r+i*Math.tan(Math.PI*t())}}return n.source=e,n}(Oe),B7=function e(t){function n(r,i){return r=r==null?0:+r,i=i==null?1:+i,function(){var o=t();return r+i*Math.log(o/(1-o))}}return n.source=e,n}(Oe),N7=function e(t){var n=Vh.source(t),r=Kb.source(t);function i(o){return function(){for(var a=0,s=o;s>16;){var l=Math.floor(.875*s),u=n(l)();if(u>s)return a+r(l-1,s/u)();a+=l,s-=u}for(var c=-Math.log1p(-t()),h=0;c<=s;++h)c-=Math.log1p(-t());return a+h}}return i.source=e,i}(Oe),F7=1664525,z7=1013904223,Qb=1/4294967296;function O7(e=Math.random()){let t=(0<=e&&e<1?e/Qb:Math.abs(e))|0;return()=>(t=F7*t+z7|0,Qb*(t>>>0))}function wt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function gn(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const jh=Symbol("implicit");function Xh(){var e=new ao,t=[],n=[],r=jh;function i(o){let a=e.get(o);if(a===void 0){if(r!==jh)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new ao;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Xh(t,n).unknown(r)},wt.apply(i,arguments),i}function Uh(){var e=Xh().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,u=0,c=.5;delete e.unknown;function h(){var f=t().length,p=i<r,d=p?i:r,g=p?r:i;o=(g-d)/Math.max(1,f-l+u*2),s&&(o=Math.floor(o)),d+=(g-d-o*(f-l))*c,a=o*(1-l),s&&(d=Math.round(d),a=Math.round(a));var m=Pn(f).map(function(b){return d+o*b});return n(p?m.reverse():m)}return e.domain=function(f){return arguments.length?(t(f),h()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,h()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,h()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),h()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),h()):l},e.paddingOuter=function(f){return arguments.length?(u=+f,h()):u},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),h()):c},e.copy=function(){return Uh(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(c)},wt.apply(h(),arguments)}function Jb(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Jb(t())},e}function Hh(){return Jb(Uh.apply(null,arguments).paddingInner(1))}function G7(e){return function(){return e}}function Ol(e){return+e}var ex=[0,1];function rt(e){return e}function qh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:G7(isNaN(t)?NaN:.5)}function W7(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Y7(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=qh(i,r),o=n(a,o)):(r=qh(r,i),o=n(o,a)),function(s){return o(r(s))}}function V7(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]=qh(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=Kn(e,s,1,r)-1;return o[l](i[l](s))}}function na(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Gl(){var e=ex,t=ex,n=sn,r,i,o,a=rt,s,l,u;function c(){var f=Math.min(e.length,t.length);return a!==rt&&(a=W7(e[0],e[f-1])),s=f>2?V7:Y7,l=u=null,h}function h(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return h.invert=function(f){return a(i((u||(u=s(t,e.map(r),bt)))(f)))},h.domain=function(f){return arguments.length?(e=Array.from(f,Ol),c()):e.slice()},h.range=function(f){return arguments.length?(t=Array.from(f),c()):t.slice()},h.rangeRound=function(f){return t=Array.from(f),n=xo,c()},h.clamp=function(f){return arguments.length?(a=f?!0:rt,c()):a!==rt},h.interpolate=function(f){return arguments.length?(n=f,c()):n},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return r=f,i=p,c()}}function Zh(){return Gl()(rt,rt)}function tx(e,t,n,r){var i=os(e,t,n),o;switch(r=mi(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=h1(i,a))&&(r.precision=o),Wf(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=p1(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=f1(i))&&(r.precision=o-(r.type==="%")*2);break}}return Ro(r)}function En(e){var t=e.domain;return e.ticks=function(n){var r=t();return Jn(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return tx(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,c=10;for(s<a&&(u=a,a=s,s=u,u=i,i=o,o=u);c-- >0;){if(u=er(a,s,n),u===l)return r[i]=a,r[o]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function Sr(){var e=Zh();return e.copy=function(){return na(e,Sr())},wt.apply(e,arguments),En(e)}function nx(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Ol),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return nx(e).unknown(t)},e=arguments.length?Array.from(e,Ol):[0,1],En(n)}function rx(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function ix(e){return Math.log(e)}function ox(e){return Math.exp(e)}function j7(e){return-Math.log(-e)}function X7(e){return-Math.exp(-e)}function U7(e){return isFinite(e)?+("1e"+e):e<0?0:e}function H7(e){return e===10?U7:e===Math.E?Math.exp:t=>Math.pow(e,t)}function q7(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ax(e){return(t,n)=>-e(-t,n)}function Kh(e){const t=e(ix,ox),n=t.domain;let r=10,i,o;function a(){return i=q7(r),o=H7(r),n()[0]<0?(i=ax(i),o=ax(o),e(j7,X7)):e(ix,ox),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],c=l[l.length-1];const h=c<u;h&&([u,c]=[c,u]);let f=i(u),p=i(c),d,g;const m=s==null?10:+s;let b=[];if(!(r%1)&&p-f<m){if(f=Math.floor(f),p=Math.ceil(p),u>0){for(;f<=p;++f)for(d=1;d<r;++d)if(g=f<0?d/o(-f):d*o(f),!(g<u)){if(g>c)break;b.push(g)}}else for(;f<=p;++f)for(d=r-1;d>=1;--d)if(g=f>0?d/o(-f):d*o(f),!(g<u)){if(g>c)break;b.push(g)}b.length*2<m&&(b=Jn(u,c,m))}else b=Jn(f,p,Math.min(p-f,m)).map(o);return h?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=mi(l)).precision==null&&(l.trim=!0),l=Ro(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return c=>{let h=c/o(Math.round(i(c)));return h*r<r-.5&&(h*=r),h<=u?l(c):""}},t.nice=()=>n(rx(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function sx(){const e=Kh(Gl()).domain([1,10]);return e.copy=()=>na(e,sx()).base(e.base()),wt.apply(e,arguments),e}function lx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ux(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Qh(e){var t=1,n=e(lx(t),ux(t));return n.constant=function(r){return arguments.length?e(lx(t=+r),ux(t)):t},En(n)}function cx(){var e=Qh(Gl());return e.copy=function(){return na(e,cx()).constant(e.constant())},wt.apply(e,arguments)}function fx(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Z7(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function K7(e){return e<0?-e*e:e*e}function Jh(e){var t=e(rt,rt),n=1;function r(){return n===1?e(rt,rt):n===.5?e(Z7,K7):e(fx(n),fx(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},En(t)}function In(){var e=Jh(Gl());return e.copy=function(){return na(e,In()).exponent(e.exponent())},wt.apply(e,arguments),e}function Q7(){return In.apply(null,arguments).exponent(.5)}function hx(e){return Math.sign(e)*e*e}function J7(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function px(){var e=Zh(),t=[0,1],n=!1,r;function i(o){var a=J7(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(hx(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Ol)).map(hx)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return px(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wt.apply(i,arguments),En(i)}function dx(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=K0(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[Kn(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(we),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return dx().domain(e).range(t).unknown(r)},wt.apply(o,arguments)}function gx(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[Kn(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return gx().domain([e,t]).range(i).unknown(o)},wt.apply(En(a),arguments)}function mx(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Kn(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return mx().domain(e).range(t).unknown(n)},wt.apply(i,arguments)}const ep=new Date,tp=new Date;function Me(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let u;do l.push(u=new Date(+o)),t(o,s),e(o);while(u<o&&o<a);return l},i.filter=o=>Me(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ep.setTime(+o),tp.setTime(+a),e(ep),e(tp),Math.floor(n(ep,tp))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Ti=Me(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ti.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Me(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ti);const yx=Ti.range,mn=1e3,Tt=mn*60,yn=Tt*60,bn=yn*24,np=bn*7,bx=bn*30,rp=bn*365,xn=Me(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*mn)},(e,t)=>(t-e)/mn,e=>e.getUTCSeconds()),xx=xn.range,Wl=Me(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mn)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getMinutes()),eR=Wl.range,Yl=Me(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tt)},(e,t)=>(t-e)/Tt,e=>e.getUTCMinutes()),tR=Yl.range,Vl=Me(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mn-e.getMinutes()*Tt)},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getHours()),nR=Vl.range,jl=Me(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getUTCHours()),rR=jl.range,Ai=Me(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/bn,e=>e.getDate()-1),iR=Ai.range,ra=Me(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bn,e=>e.getUTCDate()-1),oR=ra.range,ip=Me(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/bn,e=>Math.floor(e/bn)),aR=ip.range;function _r(e){return Me(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Tt)/np)}const Pi=_r(0),ia=_r(1),$x=_r(2),vx=_r(3),wr=_r(4),Sx=_r(5),_x=_r(6),wx=Pi.range,sR=ia.range,lR=$x.range,uR=vx.range,cR=wr.range,fR=Sx.range,hR=_x.range;function Tr(e){return Me(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/np)}const Ci=Tr(0),oa=Tr(1),Tx=Tr(2),Ax=Tr(3),Ar=Tr(4),Px=Tr(5),Cx=Tr(6),Dx=Ci.range,pR=oa.range,dR=Tx.range,gR=Ax.range,mR=Ar.range,yR=Px.range,bR=Cx.range,Xl=Me(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),xR=Xl.range,Ul=Me(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),$R=Ul.range,tn=Me(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());tn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Me(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)});const vR=tn.range,nn=Me(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());nn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Me(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)});const SR=nn.range;function Mx(e,t,n,r,i,o){const a=[[xn,1,mn],[xn,5,5*mn],[xn,15,15*mn],[xn,30,30*mn],[o,1,Tt],[o,5,5*Tt],[o,15,15*Tt],[o,30,30*Tt],[i,1,yn],[i,3,3*yn],[i,6,6*yn],[i,12,12*yn],[r,1,bn],[r,2,2*bn],[n,1,np],[t,1,bx],[t,3,3*bx],[e,1,rp]];function s(u,c,h){const f=c<u;f&&([u,c]=[c,u]);const p=h&&typeof h.range=="function"?h:l(u,c,h),d=p?p.range(u,+c+1):[];return f?d.reverse():d}function l(u,c,h){const f=Math.abs(c-u)/h,p=ts(([,,m])=>m).right(a,f);if(p===a.length)return e.every(os(u/rp,c/rp,h));if(p===0)return Ti.every(Math.max(os(u,c,h),1));const[d,g]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return d.every(g)}return[s,l]}const[Lx,kx]=Mx(nn,Ul,Ci,ip,jl,Yl),[Rx,Ex]=Mx(tn,Xl,Pi,Ai,Vl,Wl);function op(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 ap(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 aa(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Ix(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=sa(i),c=la(i),h=sa(o),f=la(o),p=sa(a),d=la(a),g=sa(s),m=la(s),b=sa(l),y=la(l),x={a:F,A:O,b:B,B:N,c:null,d:Gx,e:Gx,f:jR,g:t9,G:r9,H:WR,I:YR,j:VR,L:Wx,m:XR,M:UR,p:I,q:W,Q:Hx,s:qx,S:HR,u:qR,U:ZR,V:KR,w:QR,W:JR,x:null,X:null,y:e9,Y:n9,Z:i9,"%":Ux},$={a:H,A:ie,b:Y,B:ee,c:null,d:Vx,e:Vx,f:l9,g:b9,G:$9,H:o9,I:a9,j:s9,L:jx,m:u9,M:c9,p:V,q:J,Q:Hx,s:qx,S:f9,u:h9,U:p9,V:d9,w:g9,W:m9,x:null,X:null,y:y9,Y:x9,Z:v9,"%":Ux},S={a:R,A:v,b:E,B:k,c:T,d:zx,e:zx,f:FR,g:Fx,G:Nx,H:Ox,I:Ox,j:ER,L:NR,m:RR,M:IR,p:M,q:kR,Q:OR,s:GR,S:BR,u:PR,U:CR,V:DR,w:AR,W:MR,x:w,X:C,y:Fx,Y:Nx,Z:LR,"%":zR};x.x=A(n,x),x.X=A(r,x),x.c=A(t,x),$.x=A(n,$),$.X=A(r,$),$.c=A(t,$);function A(Z,ne){return function(le){var U=[],me=-1,he=0,Ee=Z.length,ot,ue,De;for(le instanceof Date||(le=new Date(+le));++me<Ee;)Z.charCodeAt(me)===37&&(U.push(Z.slice(he,me)),(ue=Bx[ot=Z.charAt(++me)])!=null?ot=Z.charAt(++me):ue=ot==="e"?" ":"0",(De=ne[ot])&&(ot=De(le,ue)),U.push(ot),he=me+1);return U.push(Z.slice(he,me)),U.join("")}}function _(Z,ne){return function(le){var U=aa(1900,void 0,1),me=P(U,Z,le+="",0),he,Ee;if(me!=le.length)return null;if("Q"in U)return new Date(U.Q);if("s"in U)return new Date(U.s*1e3+("L"in U?U.L:0));if(ne&&!("Z"in U)&&(U.Z=0),"p"in U&&(U.H=U.H%12+U.p*12),U.m===void 0&&(U.m="q"in U?U.q:0),"V"in U){if(U.V<1||U.V>53)return null;"w"in U||(U.w=1),"Z"in U?(he=ap(aa(U.y,0,1)),Ee=he.getUTCDay(),he=Ee>4||Ee===0?oa.ceil(he):oa(he),he=ra.offset(he,(U.V-1)*7),U.y=he.getUTCFullYear(),U.m=he.getUTCMonth(),U.d=he.getUTCDate()+(U.w+6)%7):(he=op(aa(U.y,0,1)),Ee=he.getDay(),he=Ee>4||Ee===0?ia.ceil(he):ia(he),he=Ai.offset(he,(U.V-1)*7),U.y=he.getFullYear(),U.m=he.getMonth(),U.d=he.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),Ee="Z"in U?ap(aa(U.y,0,1)).getUTCDay():op(aa(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(Ee+5)%7:U.w+U.U*7-(Ee+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,ap(U)):op(U)}}function P(Z,ne,le,U){for(var me=0,he=ne.length,Ee=le.length,ot,ue;me<he;){if(U>=Ee)return-1;if(ot=ne.charCodeAt(me++),ot===37){if(ot=ne.charAt(me++),ue=S[ot in Bx?ne.charAt(me++):ot],!ue||(U=ue(Z,le,U))<0)return-1}else if(ot!=le.charCodeAt(U++))return-1}return U}function M(Z,ne,le){var U=u.exec(ne.slice(le));return U?(Z.p=c.get(U[0].toLowerCase()),le+U[0].length):-1}function R(Z,ne,le){var U=p.exec(ne.slice(le));return U?(Z.w=d.get(U[0].toLowerCase()),le+U[0].length):-1}function v(Z,ne,le){var U=h.exec(ne.slice(le));return U?(Z.w=f.get(U[0].toLowerCase()),le+U[0].length):-1}function E(Z,ne,le){var U=b.exec(ne.slice(le));return U?(Z.m=y.get(U[0].toLowerCase()),le+U[0].length):-1}function k(Z,ne,le){var U=g.exec(ne.slice(le));return U?(Z.m=m.get(U[0].toLowerCase()),le+U[0].length):-1}function T(Z,ne,le){return P(Z,t,ne,le)}function w(Z,ne,le){return P(Z,n,ne,le)}function C(Z,ne,le){return P(Z,r,ne,le)}function F(Z){return a[Z.getDay()]}function O(Z){return o[Z.getDay()]}function B(Z){return l[Z.getMonth()]}function N(Z){return s[Z.getMonth()]}function I(Z){return i[+(Z.getHours()>=12)]}function W(Z){return 1+~~(Z.getMonth()/3)}function H(Z){return a[Z.getUTCDay()]}function ie(Z){return o[Z.getUTCDay()]}function Y(Z){return l[Z.getUTCMonth()]}function ee(Z){return s[Z.getUTCMonth()]}function V(Z){return i[+(Z.getUTCHours()>=12)]}function J(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var ne=A(Z+="",x);return ne.toString=function(){return Z},ne},parse:function(Z){var ne=_(Z+="",!1);return ne.toString=function(){return Z},ne},utcFormat:function(Z){var ne=A(Z+="",$);return ne.toString=function(){return Z},ne},utcParse:function(Z){var ne=_(Z+="",!0);return ne.toString=function(){return Z},ne}}}var Bx={"-":"",_:" ",0:"0"},Fe=/^\s*\d+/,_R=/^%/,wR=/[\\^$*+?|[\]().{}]/g;function ye(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 TR(e){return e.replace(wR,"\\$&")}function sa(e){return new RegExp("^(?:"+e.map(TR).join("|")+")","i")}function la(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function AR(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function PR(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function CR(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function DR(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function MR(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Nx(e,t,n){var r=Fe.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Fx(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function LR(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 kR(e,t,n){var r=Fe.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function RR(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function zx(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ER(e,t,n){var r=Fe.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ox(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function IR(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function BR(e,t,n){var r=Fe.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function NR(e,t,n){var r=Fe.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FR(e,t,n){var r=Fe.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zR(e,t,n){var r=_R.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function OR(e,t,n){var r=Fe.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function GR(e,t,n){var r=Fe.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Gx(e,t){return ye(e.getDate(),t,2)}function WR(e,t){return ye(e.getHours(),t,2)}function YR(e,t){return ye(e.getHours()%12||12,t,2)}function VR(e,t){return ye(1+Ai.count(tn(e),e),t,3)}function Wx(e,t){return ye(e.getMilliseconds(),t,3)}function jR(e,t){return Wx(e,t)+"000"}function XR(e,t){return ye(e.getMonth()+1,t,2)}function UR(e,t){return ye(e.getMinutes(),t,2)}function HR(e,t){return ye(e.getSeconds(),t,2)}function qR(e){var t=e.getDay();return t===0?7:t}function ZR(e,t){return ye(Pi.count(tn(e)-1,e),t,2)}function Yx(e){var t=e.getDay();return t>=4||t===0?wr(e):wr.ceil(e)}function KR(e,t){return e=Yx(e),ye(wr.count(tn(e),e)+(tn(e).getDay()===4),t,2)}function QR(e){return e.getDay()}function JR(e,t){return ye(ia.count(tn(e)-1,e),t,2)}function e9(e,t){return ye(e.getFullYear()%100,t,2)}function t9(e,t){return e=Yx(e),ye(e.getFullYear()%100,t,2)}function n9(e,t){return ye(e.getFullYear()%1e4,t,4)}function r9(e,t){var n=e.getDay();return e=n>=4||n===0?wr(e):wr.ceil(e),ye(e.getFullYear()%1e4,t,4)}function i9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ye(t/60|0,"0",2)+ye(t%60,"0",2)}function Vx(e,t){return ye(e.getUTCDate(),t,2)}function o9(e,t){return ye(e.getUTCHours(),t,2)}function a9(e,t){return ye(e.getUTCHours()%12||12,t,2)}function s9(e,t){return ye(1+ra.count(nn(e),e),t,3)}function jx(e,t){return ye(e.getUTCMilliseconds(),t,3)}function l9(e,t){return jx(e,t)+"000"}function u9(e,t){return ye(e.getUTCMonth()+1,t,2)}function c9(e,t){return ye(e.getUTCMinutes(),t,2)}function f9(e,t){return ye(e.getUTCSeconds(),t,2)}function h9(e){var t=e.getUTCDay();return t===0?7:t}function p9(e,t){return ye(Ci.count(nn(e)-1,e),t,2)}function Xx(e){var t=e.getUTCDay();return t>=4||t===0?Ar(e):Ar.ceil(e)}function d9(e,t){return e=Xx(e),ye(Ar.count(nn(e),e)+(nn(e).getUTCDay()===4),t,2)}function g9(e){return e.getUTCDay()}function m9(e,t){return ye(oa.count(nn(e)-1,e),t,2)}function y9(e,t){return ye(e.getUTCFullYear()%100,t,2)}function b9(e,t){return e=Xx(e),ye(e.getUTCFullYear()%100,t,2)}function x9(e,t){return ye(e.getUTCFullYear()%1e4,t,4)}function $9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ar(e):Ar.ceil(e),ye(e.getUTCFullYear()%1e4,t,4)}function v9(){return"+0000"}function Ux(){return"%"}function Hx(e){return+e}function qx(e){return Math.floor(+e/1e3)}var Di,sp,Zx,Hl,lp;Kx({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"]});function Kx(e){return Di=Ix(e),sp=Di.format,Zx=Di.parse,Hl=Di.utcFormat,lp=Di.utcParse,Di}var Qx="%Y-%m-%dT%H:%M:%S.%LZ";function S9(e){return e.toISOString()}var _9=Date.prototype.toISOString?S9:Hl(Qx);const w9=_9;function T9(e){var t=new Date(e);return isNaN(t)?null:t}var A9=+new Date("2000-01-01T00:00:00.000Z")?T9:lp(Qx);const P9=A9;function C9(e){return new Date(e)}function D9(e){return e instanceof Date?+e:+new Date(+e)}function up(e,t,n,r,i,o,a,s,l,u){var c=Zh(),h=c.invert,f=c.domain,p=u(".%L"),d=u(":%S"),g=u("%I:%M"),m=u("%I %p"),b=u("%a %d"),y=u("%b %d"),x=u("%B"),$=u("%Y");function S(A){return(l(A)<A?p:s(A)<A?d:a(A)<A?g:o(A)<A?m:r(A)<A?i(A)<A?b:y:n(A)<A?x:$)(A)}return c.invert=function(A){return new Date(h(A))},c.domain=function(A){return arguments.length?f(Array.from(A,D9)):f().map(C9)},c.ticks=function(A){var _=f();return e(_[0],_[_.length-1],A??10)},c.tickFormat=function(A,_){return _==null?S:u(_)},c.nice=function(A){var _=f();return(!A||typeof A.range!="function")&&(A=t(_[0],_[_.length-1],A??10)),A?f(rx(_,A)):c},c.copy=function(){return na(c,up(e,t,n,r,i,o,a,s,l,u))},c}function M9(){return wt.apply(up(Rx,Ex,tn,Xl,Pi,Ai,Vl,Wl,xn,sp).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function L9(){return wt.apply(up(Lx,kx,nn,Ul,Ci,ra,jl,Yl,xn,Hl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ql(){var e=0,t=1,n,r,i,o,a=rt,s=!1,l;function u(h){return h==null||isNaN(h=+h)?l:a(i===0?.5:(h=(o(h)-n)*i,s?Math.max(0,Math.min(1,h)):h))}u.domain=function(h){return arguments.length?([e,t]=h,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(h){return arguments.length?(s=!!h,u):s},u.interpolator=function(h){return arguments.length?(a=h,u):a};function c(h){return function(f){var p,d;return arguments.length?([p,d]=f,a=h(p,d),u):[a(0),a(1)]}}return u.range=c(sn),u.rangeRound=c(xo),u.unknown=function(h){return arguments.length?(l=h,u):l},function(h){return o=h,n=h(e),r=h(t),i=n===r?0:1/(r-n),u}}function Bn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Jx(){var e=En(ql()(rt));return e.copy=function(){return Bn(e,Jx())},gn.apply(e,arguments)}function e$(){var e=Kh(ql()).domain([1,10]);return e.copy=function(){return Bn(e,e$()).base(e.base())},gn.apply(e,arguments)}function t$(){var e=Qh(ql());return e.copy=function(){return Bn(e,t$()).constant(e.constant())},gn.apply(e,arguments)}function cp(){var e=Jh(ql());return e.copy=function(){return Bn(e,cp()).exponent(e.exponent())},gn.apply(e,arguments)}function k9(){return cp.apply(null,arguments).exponent(.5)}function n$(){var e=[],t=rt;function n(r){if(r!=null&&!isNaN(r=+r))return t((Kn(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(we),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>uo(e,o/r))},n.copy=function(){return n$(t).domain(e)},gn.apply(n,arguments)}function Zl(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,u=rt,c,h=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+c(g))-o)*(r*g<r*o?s:l),u(h?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([e,t,n]=g,i=c(e=+e),o=c(t=+t),a=c(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(g){return arguments.length?(h=!!g,p):h},p.interpolator=function(g){return arguments.length?(u=g,p):u};function d(g){return function(m){var b,y,x;return arguments.length?([b,y,x]=m,u=ay(g,[b,y,x]),p):[u(0),u(.5),u(1)]}}return p.range=d(sn),p.rangeRound=d(xo),p.unknown=function(g){return arguments.length?(f=g,p):f},function(g){return c=g,i=g(e),o=g(t),a=g(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function r$(){var e=En(Zl()(rt));return e.copy=function(){return Bn(e,r$())},gn.apply(e,arguments)}function i$(){var e=Kh(Zl()).domain([.1,1,10]);return e.copy=function(){return Bn(e,i$()).base(e.base())},gn.apply(e,arguments)}function o$(){var e=Qh(Zl());return e.copy=function(){return Bn(e,o$()).constant(e.constant())},gn.apply(e,arguments)}function fp(){var e=Jh(Zl());return e.copy=function(){return Bn(e,fp()).exponent(e.exponent())},gn.apply(e,arguments)}function R9(){return fp.apply(null,arguments).exponent(.5)}function fe(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const E9=fe("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),I9=fe("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),B9=fe("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),N9=fe("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),F9=fe("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),z9=fe("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),O9=fe("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),G9=fe("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),W9=fe("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Y9=fe("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),V9=fe("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),ve=e=>jm(e[e.length-1]);var a$=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(fe);const j9=ve(a$);var s$=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(fe);const X9=ve(s$);var l$=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(fe);const U9=ve(l$);var u$=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(fe);const H9=ve(u$);var c$=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(fe);const q9=ve(c$);var f$=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(fe);const Z9=ve(f$);var h$=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(fe);const K9=ve(h$);var p$=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(fe);const Q9=ve(p$);var d$=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(fe);const J9=ve(d$);var g$=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(fe);const eE=ve(g$);var m$=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(fe);const tE=ve(m$);var y$=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(fe);const nE=ve(y$);var b$=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(fe);const rE=ve(b$);var x$=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(fe);const iE=ve(x$);var $$=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(fe);const oE=ve($$);var v$=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(fe);const aE=ve(v$);var S$=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(fe);const sE=ve(S$);var _$=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(fe);const lE=ve(_$);var w$=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(fe);const uE=ve(w$);var T$=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(fe);const cE=ve(T$);var A$=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(fe);const fE=ve(A$);var P$=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(fe);const hE=ve(P$);var C$=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(fe);const pE=ve(C$);var D$=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(fe);const dE=ve(D$);var M$=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(fe);const gE=ve(M$);var L$=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(fe);const mE=ve(L$);var k$=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(fe);const yE=ve(k$);function bE(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const xE=Ds(It(300,.5,0),It(-240,.5,1));var $E=Ds(It(-100,.75,.35),It(80,1.5,.8)),vE=Ds(It(260,.75,.35),It(80,1.5,.8)),Kl=It();function SE(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Kl.h=360*e-100,Kl.s=1.5-1.5*t,Kl.l=.8-.9*t,Kl+""}var Ql=ii(),_E=Math.PI/3,wE=Math.PI*2/3;function TE(e){var t;return e=(.5-e)*Math.PI,Ql.r=255*(t=Math.sin(e))*t,Ql.g=255*(t=Math.sin(e+_E))*t,Ql.b=255*(t=Math.sin(e+wE))*t,Ql+""}function AE(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Jl(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const PE=Jl(fe("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var CE=Jl(fe("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),DE=Jl(fe("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ME=Jl(fe("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ce(e){return function(){return e}}const R$=Math.abs,Ve=Math.atan2,$n=Math.cos,LE=Math.max,Mi=Math.min,ft=Math.sin,_e=Math.sqrt,je=1e-12,Nn=Math.PI,eu=Nn/2,Fn=2*Nn;function kE(e){return e>1?0:e<-1?Nn:Math.acos(e)}function E$(e){return e>=1?eu:e<=-1?-eu:Math.asin(e)}function ua(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Do(t)}function RE(e){return e.innerRadius}function EE(e){return e.outerRadius}function IE(e){return e.startAngle}function BE(e){return e.endAngle}function NE(e){return e&&e.padAngle}function FE(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,h=s-o,f=h*l-c*u;if(!(f*f<je))return f=(c*(t-o)-h*(e-i))/f,[e+f*l,t+f*u]}function tu(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/_e(s*s+l*l),c=u*l,h=-u*s,f=e+c,p=t+h,d=n+c,g=r+h,m=(f+d)/2,b=(p+g)/2,y=d-f,x=g-p,$=y*y+x*x,S=i-o,A=f*g-d*p,_=(x<0?-1:1)*_e(LE(0,S*S*$-A*A)),P=(A*x-y*_)/$,M=(-A*y-x*_)/$,R=(A*x+y*_)/$,v=(-A*y+x*_)/$,E=P-m,k=M-b,T=R-m,w=v-b;return E*E+k*k>T*T+w*w&&(P=R,M=v),{cx:P,cy:M,x01:-c,y01:-h,x11:P*(i/S-1),y11:M*(i/S-1)}}function nu(){var e=RE,t=EE,n=ce(0),r=null,i=IE,o=BE,a=NE,s=null,l=ua(u);function u(){var c,h,f=+e.apply(this,arguments),p=+t.apply(this,arguments),d=i.apply(this,arguments)-eu,g=o.apply(this,arguments)-eu,m=R$(g-d),b=g>d;if(s||(s=c=l()),p<f&&(h=p,p=f,f=h),!(p>je))s.moveTo(0,0);else if(m>Fn-je)s.moveTo(p*$n(d),p*ft(d)),s.arc(0,0,p,d,g,!b),f>je&&(s.moveTo(f*$n(g),f*ft(g)),s.arc(0,0,f,g,d,b));else{var y=d,x=g,$=d,S=g,A=m,_=m,P=a.apply(this,arguments)/2,M=P>je&&(r?+r.apply(this,arguments):_e(f*f+p*p)),R=Mi(R$(p-f)/2,+n.apply(this,arguments)),v=R,E=R,k,T;if(M>je){var w=E$(M/f*ft(P)),C=E$(M/p*ft(P));(A-=w*2)>je?(w*=b?1:-1,$+=w,S-=w):(A=0,$=S=(d+g)/2),(_-=C*2)>je?(C*=b?1:-1,y+=C,x-=C):(_=0,y=x=(d+g)/2)}var F=p*$n(y),O=p*ft(y),B=f*$n(S),N=f*ft(S);if(R>je){var I=p*$n(x),W=p*ft(x),H=f*$n($),ie=f*ft($),Y;if(m<Nn)if(Y=FE(F,O,H,ie,I,W,B,N)){var ee=F-Y[0],V=O-Y[1],J=I-Y[0],Z=W-Y[1],ne=1/ft(kE((ee*J+V*Z)/(_e(ee*ee+V*V)*_e(J*J+Z*Z)))/2),le=_e(Y[0]*Y[0]+Y[1]*Y[1]);v=Mi(R,(f-le)/(ne-1)),E=Mi(R,(p-le)/(ne+1))}else v=E=0}_>je?E>je?(k=tu(H,ie,F,O,p,E,b),T=tu(I,W,B,N,p,E,b),s.moveTo(k.cx+k.x01,k.cy+k.y01),E<R?s.arc(k.cx,k.cy,E,Ve(k.y01,k.x01),Ve(T.y01,T.x01),!b):(s.arc(k.cx,k.cy,E,Ve(k.y01,k.x01),Ve(k.y11,k.x11),!b),s.arc(0,0,p,Ve(k.cy+k.y11,k.cx+k.x11),Ve(T.cy+T.y11,T.cx+T.x11),!b),s.arc(T.cx,T.cy,E,Ve(T.y11,T.x11),Ve(T.y01,T.x01),!b))):(s.moveTo(F,O),s.arc(0,0,p,y,x,!b)):s.moveTo(F,O),!(f>je)||!(A>je)?s.lineTo(B,N):v>je?(k=tu(B,N,I,W,f,-v,b),T=tu(F,O,H,ie,f,-v,b),s.lineTo(k.cx+k.x01,k.cy+k.y01),v<R?s.arc(k.cx,k.cy,v,Ve(k.y01,k.x01),Ve(T.y01,T.x01),!b):(s.arc(k.cx,k.cy,v,Ve(k.y01,k.x01),Ve(k.y11,k.x11),!b),s.arc(0,0,f,Ve(k.cy+k.y11,k.cx+k.x11),Ve(T.cy+T.y11,T.cx+T.x11),b),s.arc(T.cx,T.cy,v,Ve(T.y11,T.x11),Ve(T.y01,T.x01),!b))):s.arc(0,0,f,S,$,b)}if(s.closePath(),c)return s=null,c+""||null}return u.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Nn/2;return[$n(h)*c,ft(h)*c]},u.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:ce(+c),u):e},u.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:ce(+c),u):t},u.cornerRadius=function(c){return arguments.length?(n=typeof c=="function"?c:ce(+c),u):n},u.padRadius=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:ce(+c),u):r},u.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:ce(+c),u):i},u.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:ce(+c),u):o},u.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:ce(+c),u):a},u.context=function(c){return arguments.length?(s=c??null,u):s},u}var zE=Array.prototype.slice;function ru(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function I$(e){this._context=e}I$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function iu(e){return new I$(e)}function hp(e){return e[0]}function pp(e){return e[1]}function ou(e,t){var n=ce(!0),r=null,i=iu,o=null,a=ua(s);e=typeof e=="function"?e:e===void 0?hp:ce(e),t=typeof t=="function"?t:t===void 0?pp:ce(t);function s(l){var u,c=(l=ru(l)).length,h,f=!1,p;for(r==null&&(o=i(p=a())),u=0;u<=c;++u)!(u<c&&n(h=l[u],u,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(h,u,l),+t(h,u,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:ce(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:ce(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:ce(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function dp(e,t,n){var r=null,i=ce(!0),o=null,a=iu,s=null,l=ua(u);e=typeof e=="function"?e:e===void 0?hp:ce(+e),t=typeof t=="function"?t:ce(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?pp:ce(+n);function u(h){var f,p,d,g=(h=ru(h)).length,m,b=!1,y,x=new Array(g),$=new Array(g);for(o==null&&(s=a(y=l())),f=0;f<=g;++f){if(!(f<g&&i(m=h[f],f,h))===b)if(b=!b)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=f-1;d>=p;--d)s.point(x[d],$[d]);s.lineEnd(),s.areaEnd()}b&&(x[f]=+e(m,f,h),$[f]=+t(m,f,h),s.point(r?+r(m,f,h):x[f],n?+n(m,f,h):$[f]))}if(y)return s=null,y+""||null}function c(){return ou().defined(i).curve(a).context(o)}return u.x=function(h){return arguments.length?(e=typeof h=="function"?h:ce(+h),r=null,u):e},u.x0=function(h){return arguments.length?(e=typeof h=="function"?h:ce(+h),u):e},u.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:ce(+h),u):r},u.y=function(h){return arguments.length?(t=typeof h=="function"?h:ce(+h),n=null,u):t},u.y0=function(h){return arguments.length?(t=typeof h=="function"?h:ce(+h),u):t},u.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:ce(+h),u):n},u.lineX0=u.lineY0=function(){return c().x(e).y(t)},u.lineY1=function(){return c().x(e).y(n)},u.lineX1=function(){return c().x(r).y(t)},u.defined=function(h){return arguments.length?(i=typeof h=="function"?h:ce(!!h),u):i},u.curve=function(h){return arguments.length?(a=h,o!=null&&(s=a(o)),u):a},u.context=function(h){return arguments.length?(h==null?o=s=null:s=a(o=h),u):o},u}function OE(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function GE(e){return e}function B$(){var e=GE,t=OE,n=null,r=ce(0),i=ce(Fn),o=ce(0);function a(s){var l,u=(s=ru(s)).length,c,h,f=0,p=new Array(u),d=new Array(u),g=+r.apply(this,arguments),m=Math.min(Fn,Math.max(-Fn,i.apply(this,arguments)-g)),b,y=Math.min(Math.abs(m)/u,o.apply(this,arguments)),x=y*(m<0?-1:1),$;for(l=0;l<u;++l)($=d[p[l]=l]=+e(s[l],l,s))>0&&(f+=$);for(t!=null?p.sort(function(S,A){return t(d[S],d[A])}):n!=null&&p.sort(function(S,A){return n(s[S],s[A])}),l=0,h=f?(m-u*x)/f:0;l<u;++l,g=b)c=p[l],$=d[c],b=g+($>0?$*h:0)+x,d[c]={data:s[c],index:l,value:$,startAngle:g,endAngle:b,padAngle:y};return d}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:ce(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:ce(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ce(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ce(+s),a):o},a}var N$=gp(iu);function F$(e){this._curve=e}F$.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function gp(e){function t(n){return new F$(e(n))}return t._curve=e,t}function ca(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(gp(n)):t()._curve},e}function z$(){return ca(ou().curve(N$))}function O$(){var e=dp().curve(N$),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return ca(n())},delete e.lineX0,e.lineEndAngle=function(){return ca(r())},delete e.lineX1,e.lineInnerRadius=function(){return ca(i())},delete e.lineY0,e.lineOuterRadius=function(){return ca(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(gp(a)):t()._curve},e}function fa(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}class G${constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}class WE{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,this._point===0)this._point=1;else{const r=fa(this._x0,this._y0),i=fa(this._x0,this._y0=(this._y0+n)/2),o=fa(t,this._y0),a=fa(t,n);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...o,...a)}this._x0=t,this._y0=n}}function W$(e){return new G$(e,!0)}function Y$(e){return new G$(e,!1)}function YE(e){return new WE(e)}function VE(e){return e.source}function jE(e){return e.target}function au(e){let t=VE,n=jE,r=hp,i=pp,o=null,a=null,s=ua(l);function l(){let u;const c=zE.call(arguments),h=t.apply(this,c),f=n.apply(this,c);if(o==null&&(a=e(u=s())),a.lineStart(),c[0]=h,a.point(+r.apply(this,c),+i.apply(this,c)),c[0]=f,a.point(+r.apply(this,c),+i.apply(this,c)),a.lineEnd(),u)return a=null,u+""||null}return l.source=function(u){return arguments.length?(t=u,l):t},l.target=function(u){return arguments.length?(n=u,l):n},l.x=function(u){return arguments.length?(r=typeof u=="function"?u:ce(+u),l):r},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:ce(+u),l):i},l.context=function(u){return arguments.length?(u==null?o=a=null:a=e(o=u),l):o},l}function XE(){return au(W$)}function UE(){return au(Y$)}function HE(){const e=au(YE);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const qE=_e(3),V$={draw(e,t){const n=_e(t+Mi(t/28,.75))*.59436,r=n/2,i=r*qE;e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-i,-r),e.lineTo(i,r),e.moveTo(-i,r),e.lineTo(i,-r)}},su={draw(e,t){const n=_e(t/Nn);e.moveTo(n,0),e.arc(0,0,n,0,Fn)}},j$={draw(e,t){const n=_e(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},X$=_e(1/3),ZE=X$*2,U$={draw(e,t){const n=_e(t/ZE),r=n*X$;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},H$={draw(e,t){const n=_e(t)*.62625;e.moveTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.lineTo(-n,0),e.closePath()}},q$={draw(e,t){const n=_e(t-Mi(t/7,2))*.87559;e.moveTo(-n,0),e.lineTo(n,0),e.moveTo(0,n),e.lineTo(0,-n)}},Z$={draw(e,t){const n=_e(t),r=-n/2;e.rect(r,r,n,n)}},K$={draw(e,t){const n=_e(t)*.4431;e.moveTo(n,n),e.lineTo(n,-n),e.lineTo(-n,-n),e.lineTo(-n,n),e.closePath()}},KE=.8908130915292852,Q$=ft(Nn/10)/ft(7*Nn/10),QE=ft(Fn/10)*Q$,JE=-$n(Fn/10)*Q$,J$={draw(e,t){const n=_e(t*KE),r=QE*n,i=JE*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Fn*o/5,s=$n(a),l=ft(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},mp=_e(3),ev={draw(e,t){const n=-_e(t/(mp*3));e.moveTo(0,n*2),e.lineTo(-mp*n,-n),e.lineTo(mp*n,-n),e.closePath()}},eI=_e(3),tv={draw(e,t){const n=_e(t)*.6824,r=n/2,i=n*eI/2;e.moveTo(0,-n),e.lineTo(i,r),e.lineTo(-i,r),e.closePath()}},At=-.5,Pt=_e(3)/2,yp=1/_e(12),tI=(yp/2+1)*3,nv={draw(e,t){const n=_e(t/tI),r=n/2,i=n*yp,o=r,a=n*yp+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(At*r-Pt*i,Pt*r+At*i),e.lineTo(At*o-Pt*a,Pt*o+At*a),e.lineTo(At*s-Pt*l,Pt*s+At*l),e.lineTo(At*r+Pt*i,At*i-Pt*r),e.lineTo(At*o+Pt*a,At*a-Pt*o),e.lineTo(At*s+Pt*l,At*l-Pt*s),e.closePath()}},bp={draw(e,t){const n=_e(t-Mi(t/6,1.7))*.6189;e.moveTo(-n,-n),e.lineTo(n,n),e.moveTo(-n,n),e.lineTo(n,-n)}},rv=[su,j$,U$,Z$,J$,ev,nv],nI=[su,q$,bp,tv,V$,K$,H$];function rI(e,t){let n=null,r=ua(i);e=typeof e=="function"?e:ce(e||su),t=typeof t=="function"?t:ce(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ce(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ce(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function zn(){}function lu(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function uu(e){this._context=e}uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iI(e){return new uu(e)}function iv(e){this._context=e}iv.prototype={areaStart:zn,areaEnd:zn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:lu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oI(e){return new iv(e)}function ov(e){this._context=e}ov.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:lu(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aI(e){return new ov(e)}function av(e,t){this._basis=new uu(e),this._beta=t}av.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],o=e[n]-r,a=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const sI=function e(t){function n(r){return t===1?new uu(r):new av(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function cu(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function xp(e,t){this._context=e,this._k=(1-t)/6}xp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:cu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:cu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const lI=function e(t){function n(r){return new xp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function $p(e,t){this._context=e,this._k=(1-t)/6}$p.prototype={areaStart:zn,areaEnd:zn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const uI=function e(t){function n(r){return new $p(r,t)}return n.tension=function(r){return e(+r)},n}(0);function vp(e,t){this._context=e,this._k=(1-t)/6}vp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const cI=function e(t){function n(r){return new vp(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Sp(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>je){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>je){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*u+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function sv(e,t){this._context=e,this._alpha=t}sv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Sp(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fI=function e(t){function n(r){return t?new sv(r,t):new xp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function lv(e,t){this._context=e,this._alpha=t}lv.prototype={areaStart:zn,areaEnd:zn,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Sp(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hI=function e(t){function n(r){return t?new lv(r,t):new $p(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function uv(e,t){this._context=e,this._alpha=t}uv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Sp(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pI=function e(t){function n(r){return t?new uv(r,t):new vp(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function cv(e){this._context=e}cv.prototype={areaStart:zn,areaEnd:zn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function dI(e){return new cv(e)}function fv(e){return e<0?-1:1}function hv(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(fv(o)+fv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function pv(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function _p(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function fu(e){this._context=e}fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_p(this,this._t0,pv(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_p(this,pv(this,n=hv(this,e,t)),n);break;default:_p(this,this._t0,n=hv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function dv(e){this._context=new gv(e)}(dv.prototype=Object.create(fu.prototype)).point=function(e,t){fu.prototype.point.call(this,t,e)};function gv(e){this._context=e}gv.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function gI(e){return new fu(e)}function mI(e){return new dv(e)}function mv(e){this._context=e}mv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=yv(e),i=yv(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function yv(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function yI(e){return new mv(e)}function hu(e,t){this._context=e,this._t=t}hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function bI(e){return new hu(e,.5)}function xI(e){return new hu(e,0)}function $I(e){return new hu(e,1)}function Li(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ki(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function vI(e,t){return e[t]}function SI(e){const t=[];return t.key=e,t}function _I(){var e=ce([]),t=ki,n=Li,r=vI;function i(o){var a=Array.from(e.apply(this,arguments),SI),s,l=a.length,u=-1,c;for(const h of o)for(s=0,++u;s<l;++s)(a[s][u]=[0,+r(h,a[s].key,u,o)]).data=h;for(s=0,c=ru(t(a));s<l;++s)a[c[s]].index=s;return n(a,c),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ce(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ce(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?ki:typeof o=="function"?o:ce(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Li,i):n},i}function wI(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Li(e,t)}}function TI(e,t){if((l=e.length)>0)for(var n,r=0,i,o,a,s,l,u=e[t[0]].length;r<u;++r)for(a=s=0,n=0;n<l;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function AI(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Li(e,t)}}function PI(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,u=0;s<a;++s){for(var c=e[t[s]],h=c[r][1]||0,f=c[r-1][1]||0,p=(h-f)/2,d=0;d<s;++d){var g=e[t[d]],m=g[r][1]||0,b=g[r-1][1]||0;p+=m-b}l+=h,u+=p*h}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,Li(e,t)}}function bv(e){var t=e.map(CI);return ki(e).sort(function(n,r){return t[n]-t[r]})}function CI(e){for(var t=-1,n=0,r=e.length,i,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function xv(e){var t=e.map($v);return ki(e).sort(function(n,r){return t[n]-t[r]})}function $v(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function DI(e){return xv(e).reverse()}function MI(e){var t=e.length,n,r,i=e.map($v),o=bv(e),a=0,s=0,l=[],u=[];for(n=0;n<t;++n)r=o[n],a<s?(a+=i[r],l.push(r)):(s+=i[r],u.push(r));return u.reverse().concat(l)}function LI(e){return ki(e).reverse()}const pu=e=>()=>e;function kI(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function rn(e,t,n){this.k=e,this.x=t,this.y=n}rn.prototype={constructor:rn,scale:function(e){return e===1?this:new rn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ri=new rn(1,0,0);vv.prototype=rn.prototype;function vv(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ri;return e.__zoom}function wp(e){e.stopImmediatePropagation()}function ha(e){e.preventDefault(),e.stopImmediatePropagation()}function RI(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function EI(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Sv(){return this.__zoom||Ri}function II(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function BI(){return navigator.maxTouchPoints||"ontouchstart"in this}function NI(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function vn(){var e=RI,t=EI,n=NI,r=II,i=BI,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=ny,u=tr("start","zoom","end"),c,h,f,p=500,d=150,g=0,m=10;function b(T){T.property("__zoom",Sv).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",R).filter(i).on("touchstart.zoom",v).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(T,w,C,F){var O=T.selection?T.selection():T;O.property("__zoom",Sv),T!==O?S(T,w,C,F):O.interrupt().each(function(){A(this,arguments).event(F).start().zoom(null,typeof w=="function"?w.apply(this,arguments):w).end()})},b.scaleBy=function(T,w,C,F){b.scaleTo(T,function(){var O=this.__zoom.k,B=typeof w=="function"?w.apply(this,arguments):w;return O*B},C,F)},b.scaleTo=function(T,w,C,F){b.transform(T,function(){var O=t.apply(this,arguments),B=this.__zoom,N=C==null?$(O):typeof C=="function"?C.apply(this,arguments):C,I=B.invert(N),W=typeof w=="function"?w.apply(this,arguments):w;return n(x(y(B,W),N,I),O,a)},C,F)},b.translateBy=function(T,w,C,F){b.transform(T,function(){return n(this.__zoom.translate(typeof w=="function"?w.apply(this,arguments):w,typeof C=="function"?C.apply(this,arguments):C),t.apply(this,arguments),a)},null,F)},b.translateTo=function(T,w,C,F,O){b.transform(T,function(){var B=t.apply(this,arguments),N=this.__zoom,I=F==null?$(B):typeof F=="function"?F.apply(this,arguments):F;return n(Ri.translate(I[0],I[1]).scale(N.k).translate(typeof w=="function"?-w.apply(this,arguments):-w,typeof C=="function"?-C.apply(this,arguments):-C),B,a)},F,O)};function y(T,w){return w=Math.max(o[0],Math.min(o[1],w)),w===T.k?T:new rn(w,T.x,T.y)}function x(T,w,C){var F=w[0]-C[0]*T.k,O=w[1]-C[1]*T.k;return F===T.x&&O===T.y?T:new rn(T.k,F,O)}function $(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function S(T,w,C,F){T.on("start.zoom",function(){A(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(F).end()}).tween("zoom",function(){var O=this,B=arguments,N=A(O,B).event(F),I=t.apply(O,B),W=C==null?$(I):typeof C=="function"?C.apply(O,B):C,H=Math.max(I[1][0]-I[0][0],I[1][1]-I[0][1]),ie=O.__zoom,Y=typeof w=="function"?w.apply(O,B):w,ee=l(ie.invert(W).concat(H/ie.k),Y.invert(W).concat(H/Y.k));return function(V){if(V===1)V=Y;else{var J=ee(V),Z=H/J[2];V=new rn(Z,W[0]-J[0]*Z,W[1]-J[1]*Z)}N.zoom(null,V)}})}function A(T,w,C){return!C&&T.__zooming||new _(T,w)}function _(T,w){this.that=T,this.args=w,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,w),this.taps=0}_.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,w){return this.mouse&&T!=="mouse"&&(this.mouse[1]=w.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=w.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=w.invert(this.touch1[0])),this.that.__zoom=w,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var w=j(this.that).datum();u.call(T,this.that,new kI(T,{sourceEvent:this.sourceEvent,target:b,type:T,transform:this.that.__zoom,dispatch:u}),w)}};function P(T,...w){if(!e.apply(this,arguments))return;var C=A(this,w).event(T),F=this.__zoom,O=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,r.apply(this,arguments)))),B=yt(T);if(C.wheel)(C.mouse[0][0]!==B[0]||C.mouse[0][1]!==B[1])&&(C.mouse[1]=F.invert(C.mouse[0]=B)),clearTimeout(C.wheel);else{if(F.k===O)return;C.mouse=[B,F.invert(B)],ur(this),C.start()}ha(T),C.wheel=setTimeout(N,d),C.zoom("mouse",n(x(y(F,O),C.mouse[0],C.mouse[1]),C.extent,a));function N(){C.wheel=null,C.end()}}function M(T,...w){if(f||!e.apply(this,arguments))return;var C=T.currentTarget,F=A(this,w,!0).event(T),O=j(T.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",H,!0),B=yt(T,C),N=T.clientX,I=T.clientY;gs(T.view),wp(T),F.mouse=[B,this.__zoom.invert(B)],ur(this),F.start();function W(ie){if(ha(ie),!F.moved){var Y=ie.clientX-N,ee=ie.clientY-I;F.moved=Y*Y+ee*ee>g}F.event(ie).zoom("mouse",n(x(F.that.__zoom,F.mouse[0]=yt(ie,C),F.mouse[1]),F.extent,a))}function H(ie){O.on("mousemove.zoom mouseup.zoom",null),ms(ie.view,F.moved),ha(ie),F.event(ie).end()}}function R(T,...w){if(e.apply(this,arguments)){var C=this.__zoom,F=yt(T.changedTouches?T.changedTouches[0]:T,this),O=C.invert(F),B=C.k*(T.shiftKey?.5:2),N=n(x(y(C,B),F,O),t.apply(this,w),a);ha(T),s>0?j(this).transition().duration(s).call(S,N,F,T):j(this).call(b.transform,N,F,T)}}function v(T,...w){if(e.apply(this,arguments)){var C=T.touches,F=C.length,O=A(this,w,T.changedTouches.length===F).event(T),B,N,I,W;for(wp(T),N=0;N<F;++N)I=C[N],W=yt(I,this),W=[W,this.__zoom.invert(W),I.identifier],O.touch0?!O.touch1&&O.touch0[2]!==W[2]&&(O.touch1=W,O.taps=0):(O.touch0=W,B=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),B&&(O.taps<2&&(h=W[0],c=setTimeout(function(){c=null},p)),ur(this),O.start())}}function E(T,...w){if(this.__zooming){var C=A(this,w).event(T),F=T.changedTouches,O=F.length,B,N,I,W;for(ha(T),B=0;B<O;++B)N=F[B],I=yt(N,this),C.touch0&&C.touch0[2]===N.identifier?C.touch0[0]=I:C.touch1&&C.touch1[2]===N.identifier&&(C.touch1[0]=I);if(N=C.that.__zoom,C.touch1){var H=C.touch0[0],ie=C.touch0[1],Y=C.touch1[0],ee=C.touch1[1],V=(V=Y[0]-H[0])*V+(V=Y[1]-H[1])*V,J=(J=ee[0]-ie[0])*J+(J=ee[1]-ie[1])*J;N=y(N,Math.sqrt(V/J)),I=[(H[0]+Y[0])/2,(H[1]+Y[1])/2],W=[(ie[0]+ee[0])/2,(ie[1]+ee[1])/2]}else if(C.touch0)I=C.touch0[0],W=C.touch0[1];else return;C.zoom("touch",n(x(N,I,W),C.extent,a))}}function k(T,...w){if(this.__zooming){var C=A(this,w).event(T),F=T.changedTouches,O=F.length,B,N;for(wp(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),B=0;B<O;++B)N=F[B],C.touch0&&C.touch0[2]===N.identifier?delete C.touch0:C.touch1&&C.touch1[2]===N.identifier&&delete C.touch1;if(C.touch1&&!C.touch0&&(C.touch0=C.touch1,delete C.touch1),C.touch0)C.touch0[1]=this.__zoom.invert(C.touch0[0]);else if(C.end(),C.taps===2&&(N=yt(N,this),Math.hypot(h[0]-N[0],h[1]-N[1])<m)){var I=j(this).on("dblclick.zoom");I&&I.apply(this,arguments)}}}return b.wheelDelta=function(T){return arguments.length?(r=typeof T=="function"?T:pu(+T),b):r},b.filter=function(T){return arguments.length?(e=typeof T=="function"?T:pu(!!T),b):e},b.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:pu(!!T),b):i},b.extent=function(T){return arguments.length?(t=typeof T=="function"?T:pu([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),b):t},b.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],b):[o[0],o[1]]},b.translateExtent=function(T){return arguments.length?(a[0][0]=+T[0][0],a[1][0]=+T[1][0],a[0][1]=+T[0][1],a[1][1]=+T[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(T){return arguments.length?(n=T,b):n},b.duration=function(T){return arguments.length?(s=+T,b):s},b.interpolate=function(T){return arguments.length?(l=T,b):l},b.on=function(){var T=u.on.apply(u,arguments);return T===u?b:T},b.clickDistance=function(T){return arguments.length?(g=(T=+T)*T,b):Math.sqrt(g)},b.tapDistance=function(T){return arguments.length?(m=+T,b):m},b}const Tp=Object.freeze(Object.defineProperty({__proto__:null,Adder:ke,Delaunay:Ef,FormatSpecifier:Ks,InternMap:ao,InternSet:Qn,Node:$r,Path:Do,Voronoi:Vy,ZoomTransform:rn,active:Y5,arc:nu,area:dp,areaRadial:O$,ascending:we,autoType:p8,axisBottom:om,axisLeft:Ec,axisRight:BD,axisTop:Rc,bin:q0,bisect:Kn,bisectCenter:RC,bisectLeft:kC,bisectRight:E0,bisector:ts,blob:m8,blur:EC,blur2:I0,blurImage:IC,brush:n6,brushSelection:J5,brushX:e6,brushY:t6,buffer:b8,chord:i6,chordDirected:a6,chordTranspose:o6,cluster:Ck,color:Dn,contourDensity:k6,contours:Df,count:rs,create:yL,creator:hs,cross:WC,csv:v8,csvFormat:n8,csvFormatBody:r8,csvFormatRow:o8,csvFormatRows:i8,csvFormatValue:a8,csvParse:Hy,csvParseRows:t8,cubehelix:It,cumsum:YC,curveBasis:iI,curveBasisClosed:oI,curveBasisOpen:aI,curveBumpX:W$,curveBumpY:Y$,curveBundle:sI,curveCardinal:lI,curveCardinalClosed:uI,curveCardinalOpen:cI,curveCatmullRom:fI,curveCatmullRomClosed:hI,curveCatmullRomOpen:pI,curveLinear:iu,curveLinearClosed:dI,curveMonotoneX:gI,curveMonotoneY:mI,curveNatural:yI,curveStep:bI,curveStepAfter:$I,curveStepBefore:xI,descending:k0,deviation:F0,difference:wD,disjoint:TD,dispatch:tr,drag:bs,dragDisable:gs,dragEnable:ms,dsv:$8,dsvFormat:Vs,easeBack:wy,easeBackIn:I5,easeBackInOut:wy,easeBackOut:B5,easeBounce:Po,easeBounceIn:R5,easeBounceInOut:E5,easeBounceOut:Po,easeCircle:_y,easeCircleIn:_5,easeCircleInOut:_y,easeCircleOut:w5,easeCubic:Ao,easeCubicIn:g5,easeCubicInOut:Ao,easeCubicOut:m5,easeElastic:cr,easeElasticIn:N5,easeElasticInOut:F5,easeElasticOut:cr,easeExp:Sy,easeExpIn:v5,easeExpInOut:Sy,easeExpOut:S5,easeLinear:Zt,easePoly:by,easePolyIn:y5,easePolyInOut:by,easePolyOut:b5,easeQuad:yy,easeQuadIn:p5,easeQuadInOut:yy,easeQuadOut:d5,easeSin:vy,easeSinIn:x5,easeSinInOut:vy,easeSinOut:$5,every:bD,extent:oo,fcumsum:jC,filter:$D,flatGroup:XC,flatRollup:UC,forceCenter:zf,forceCollide:Us,forceLink:Gf,forceManyBody:qs,forceRadial:t4,forceSimulation:Hs,forceX:t1,forceY:n1,get format(){return Ro},formatDefaultLocale:c1,formatLocale:u1,get formatPrefix(){return Wf},formatSpecifier:mi,fsum:VC,geoAlbers:wb,geoAlbersUsa:ak,geoArea:f4,geoAzimuthalEqualArea:sk,geoAzimuthalEqualAreaRaw:Ph,geoAzimuthalEquidistant:lk,geoAzimuthalEquidistantRaw:Ch,geoBounds:g4,geoCentroid:v4,geoCircle:S4,geoClipAntimeridian:ah,geoClipCircle:X1,geoClipExtent:D4,geoClipRectangle:xl,geoConicConformal:ck,geoConicConformalRaw:Pb,geoConicEqualArea:Ll,geoConicEqualAreaRaw:_b,geoConicEquidistant:hk,geoConicEquidistantRaw:Cb,geoContains:B4,geoDistance:Sl,geoEqualEarth:dk,geoEqualEarthRaw:Dh,geoEquirectangular:fk,geoEquirectangularRaw:qo,geoGnomonic:gk,geoGnomonicRaw:Mh,geoGraticule:nb,geoGraticule10:N4,geoIdentity:mk,geoInterpolate:F4,geoLength:U1,geoMercator:uk,geoMercatorRaw:Ho,geoNaturalEarth1:yk,geoNaturalEarth1Raw:Lh,geoOrthographic:bk,geoOrthographicRaw:kh,geoPath:Z4,geoProjection:en,geoProjectionMutator:Th,geoRotation:F1,geoStereographic:xk,geoStereographicRaw:Rh,geoStream:Nt,geoTransform:K4,geoTransverseMercator:$k,geoTransverseMercatorRaw:Eh,gray:NL,greatest:Z0,greatestIndex:pD,group:W0,groupSort:ZC,groups:Y0,hcl:ws,hierarchy:El,histogram:q0,hsl:vs,html:P8,image:_8,index:HC,indexes:qC,interpolate:sn,interpolateArray:YL,interpolateBasis:Gm,interpolateBasisClosed:Wm,interpolateBlues:hE,interpolateBrBG:j9,interpolateBuGn:eE,interpolateBuPu:tE,interpolateCividis:bE,interpolateCool:vE,interpolateCubehelix:i3,interpolateCubehelixDefault:xE,interpolateCubehelixLong:Ds,interpolateDate:Hm,interpolateDiscrete:XL,interpolateGnBu:nE,interpolateGreens:pE,interpolateGreys:dE,interpolateHcl:n3,interpolateHclLong:r3,interpolateHsl:JL,interpolateHslLong:e3,interpolateHue:UL,interpolateInferno:DE,interpolateLab:t3,interpolateMagma:CE,interpolateNumber:bt,interpolateNumberArray:Jc,interpolateObject:qm,interpolateOrRd:rE,interpolateOranges:yE,interpolatePRGn:X9,interpolatePiYG:U9,interpolatePlasma:ME,interpolatePuBu:oE,interpolatePuBuGn:iE,interpolatePuOr:H9,interpolatePuRd:aE,interpolatePurples:gE,interpolateRainbow:SE,interpolateRdBu:q9,interpolateRdGy:Z9,interpolateRdPu:sE,interpolateRdYlBu:K9,interpolateRdYlGn:Q9,interpolateReds:mE,interpolateRgb:bo,interpolateRgbBasis:jm,interpolateRgbBasisClosed:WL,interpolateRound:xo,interpolateSinebow:TE,interpolateSpectral:J9,interpolateString:nf,interpolateTransformCss:Jm,interpolateTransformSvg:ey,interpolateTurbo:AE,interpolateViridis:PE,interpolateWarm:$E,interpolateYlGn:uE,interpolateYlGnBu:lE,interpolateYlOrBr:cE,interpolateYlOrRd:fE,interpolateZoom:ny,interrupt:ur,intersection:AD,interval:u3,isoFormat:w9,isoParse:P9,json:T8,lab:mo,lch:FL,least:hD,leastIndex:J0,line:ou,lineRadial:z$,link:au,linkHorizontal:XE,linkRadial:HE,linkVertical:UE,local:gm,map:vD,matcher:Fc,max:so,maxIndex:Cc,mean:iD,median:oD,medianIndex:aD,merge:Mc,min:as,minIndex:Dc,mode:lD,namespace:fo,namespaces:Bc,nice:Ac,now:wo,pack:i7,packEnclose:Qk,packSiblings:n7,pairs:uD,partition:o7,path:Cf,pathRound:u6,permute:H0,pie:B$,piecewise:ay,pointRadial:fa,pointer:yt,pointers:xL,polygonArea:$7,polygonCentroid:v7,polygonContains:T7,polygonHull:w7,polygonLength:A7,precisionFixed:f1,precisionPrefix:h1,precisionRound:p1,quadtree:Xs,quantile:uo,quantileIndex:Q0,quantileSorted:K0,quantize:o3,quickselect:ss,radialArea:O$,radialLine:z$,randomBates:M7,randomBernoulli:R7,randomBeta:Zb,randomBinomial:Kb,randomCauchy:I7,randomExponential:L7,randomGamma:Vh,randomGeometric:qb,randomInt:C7,randomIrwinHall:Hb,randomLcg:O7,randomLogNormal:D7,randomLogistic:B7,randomNormal:Yh,randomPareto:k7,randomPoisson:N7,randomUniform:P7,randomWeibull:E7,range:Pn,rank:fD,reduce:SD,reverse:_D,rgb:ii,ribbon:y6,ribbonArrow:b6,rollup:j0,rollups:X0,scaleBand:Uh,scaleDiverging:r$,scaleDivergingLog:i$,scaleDivergingPow:fp,scaleDivergingSqrt:R9,scaleDivergingSymlog:o$,scaleIdentity:nx,scaleImplicit:jh,scaleLinear:Sr,scaleLog:sx,scaleOrdinal:Xh,scalePoint:Hh,scalePow:In,scaleQuantile:dx,scaleQuantize:gx,scaleRadial:px,scaleSequential:Jx,scaleSequentialLog:e$,scaleSequentialPow:cp,scaleSequentialQuantile:n$,scaleSequentialSqrt:k9,scaleSequentialSymlog:t$,scaleSqrt:Q7,scaleSymlog:cx,scaleThreshold:mx,scaleTime:M9,scaleUtc:L9,scan:dD,schemeAccent:I9,schemeBlues:P$,schemeBrBG:a$,schemeBuGn:g$,schemeBuPu:m$,schemeCategory10:E9,schemeDark2:B9,schemeGnBu:y$,schemeGreens:C$,schemeGreys:D$,schemeObservable10:N9,schemeOrRd:b$,schemeOranges:k$,schemePRGn:s$,schemePaired:F9,schemePastel1:z9,schemePastel2:O9,schemePiYG:l$,schemePuBu:$$,schemePuBuGn:x$,schemePuOr:u$,schemePuRd:v$,schemePurples:M$,schemeRdBu:c$,schemeRdGy:f$,schemeRdPu:S$,schemeRdYlBu:h$,schemeRdYlGn:p$,schemeReds:L$,schemeSet1:G9,schemeSet2:W9,schemeSet3:Y9,schemeSpectral:d$,schemeTableau10:V9,schemeYlGn:w$,schemeYlGnBu:_$,schemeYlOrBr:T$,schemeYlOrRd:A$,select:j,selectAll:$L,selection:rr,selector:ps,selectorAll:Nc,shuffle:gD,shuffler:em,some:xD,sort:_c,stack:_I,stackOffsetDiverging:TI,stackOffsetExpand:wI,stackOffsetNone:Li,stackOffsetSilhouette:AI,stackOffsetWiggle:PI,stackOrderAppearance:bv,stackOrderAscending:xv,stackOrderDescending:DI,stackOrderInsideOut:MI,stackOrderNone:ki,stackOrderReverse:LI,stratify:u7,style:nr,subset:CD,sum:Lc,superset:nm,svg:C8,symbol:rI,symbolAsterisk:V$,symbolCircle:su,symbolCross:j$,symbolDiamond:U$,symbolDiamond2:H$,symbolPlus:q$,symbolSquare:Z$,symbolSquare2:K$,symbolStar:J$,symbolTimes:bp,symbolTriangle:ev,symbolTriangle2:tv,symbolWye:nv,symbolX:bp,symbols:rv,symbolsFill:rv,symbolsStroke:nI,text:js,thresholdFreedmanDiaconis:nD,thresholdScott:rD,thresholdSturges:Pc,tickFormat:tx,tickIncrement:er,tickStep:os,ticks:Jn,timeDay:Ai,timeDays:iR,get timeFormat(){return sp},timeFormatDefaultLocale:Kx,timeFormatLocale:Ix,timeFriday:Sx,timeFridays:fR,timeHour:Vl,timeHours:nR,timeInterval:Me,timeMillisecond:Ti,timeMilliseconds:yx,timeMinute:Wl,timeMinutes:eR,timeMonday:ia,timeMondays:sR,timeMonth:Xl,timeMonths:xR,get timeParse(){return Zx},timeSaturday:_x,timeSaturdays:hR,timeSecond:xn,timeSeconds:xx,timeSunday:Pi,timeSundays:wx,timeThursday:wr,timeThursdays:cR,timeTickInterval:Ex,timeTicks:Rx,timeTuesday:$x,timeTuesdays:lR,timeWednesday:vx,timeWednesdays:uR,timeWeek:Pi,timeWeeks:wx,timeYear:tn,timeYears:vR,timeout:af,timer:Rs,timerFlush:uy,transition:gy,transpose:tm,tree:m7,treemap:Xb,treemapBinary:y7,treemapDice:ta,treemapResquarify:x7,treemapSlice:zl,treemapSliceDice:b7,treemapSquarify:Wh,tsv:S8,tsvFormat:l8,tsvFormatBody:u8,tsvFormatRow:f8,tsvFormatRows:c8,tsvFormatValue:h8,tsvParse:qy,tsvParseRows:s8,union:DD,unixDay:ip,unixDays:aR,utcDay:ra,utcDays:oR,get utcFormat(){return Hl},utcFriday:Px,utcFridays:yR,utcHour:jl,utcHours:rR,utcMillisecond:Ti,utcMilliseconds:yx,utcMinute:Yl,utcMinutes:tR,utcMonday:oa,utcMondays:pR,utcMonth:Ul,utcMonths:$R,get utcParse(){return lp},utcSaturday:Cx,utcSaturdays:bR,utcSecond:xn,utcSeconds:xx,utcSunday:Ci,utcSundays:Dx,utcThursday:Ar,utcThursdays:mR,utcTickInterval:kx,utcTicks:Lx,utcTuesday:Tx,utcTuesdays:dR,utcWednesday:Ax,utcWednesdays:gR,utcWeek:Ci,utcWeeks:Dx,utcYear:nn,utcYears:SR,variance:N0,window:zc,xml:A8,zip:yD,zoom:vn,zoomIdentity:Ri,zoomTransform:vv},Symbol.toStringTag,{value:"Module"}));function _v(e){try{return e.node().getBBox()}catch(t){throw new Error(t)}}function FI(e,t){function n(i){var s;const o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>";const a=document.createDocumentFragment();for(;a&&((s=o==null?void 0:o.firstChild)!=null&&s.firstChild);)a.appendChild(o.firstChild.firstChild);return a}const r=e.node();for(;r.hasChildNodes();)r.removeChild(r.firstChild);e.node().appendChild(n(t))}function pa(e){return e.substring(0,4)!=="ease"?Ao:Tp[e]??Ao}function du({axisWidth:e,innerRadius:t,outerRadius:n,padAngle:r,cornerRadius:i}){const o=Sr().domain([0,1]).range([0,e/2]),a=o(n);return nu().innerRadius(o(t)).outerRadius(a).padAngle(r).padRadius(a).cornerRadius(i)}const On=(e,t)=>{if(t instanceof Function){const n=t(e);return String(n??"")}return Ro(t)(e)};function Ap(e){return!(mo(e).l<=60)}function da(e,t=10){var i;const n=document.createElement("canvas").getContext("2d");return(((i=n==null?void 0:n.measureText(e))==null?void 0:i.width)??0)*t/10}function zI(e){if(e===null||Number.isNaN(e)==!0)return String(e||0);var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")}function be(e,t){const n=t.colors[t.colorScheme];return e==="label"?n.label[0]:e==="labelContrast"?Ap(n.label[0])?n.labelContrast[1]:n.labelContrast[0]:e=="none"?"none":n[e]!=null?n[e]:n.primary}function Se({datum:e,colorType:t,fullChartParams:n}){const r=n.colors[n.colorScheme];if(t==="label"){const i=e.color;return i||r.label[0]}else if(t==="labelContrast"){const i=e.color;return i?Ap(i)?r.labelContrast[1]:r.labelContrast[0]:Ap(r.label[0])?r.labelContrast[1]:r.labelContrast[0]}return t=="none"?"none":r[t]!=null?r[t]:r.primary}function q(e,t,n){const r=n?`--${n}`:"";return`orbcharts-${e}__${t}${r}`}function it(e,t){const r=Math.random().toString(36).substr(2,5);return q(e,t,r)}function ga(e,t){let n=new ge(()=>{});return e.each(function(){const r=zu(this,t);n=Ou(n,r)}),n}const Pr=({selection:e,pluginName:t,clipPathID:n,seriesLabels$:r,gridContainerPosition$:i,gridAxesTransform$:o,gridGraphicTransform$:a})=>{const s=q(t,"series"),l=q(t,"axes"),u=q(t,"graphic"),c=r.pipe(L((d,g)=>e.selectAll(`g.${s}`).data(d,m=>m).join(m=>m.append("g").classed(s,!0).each((b,y,x)=>{j(x[y]).selectAll(`g.${l}`).data([y]).join($=>$.append("g").classed(l,!0).attr("clip-path",`url(#${n})`).each((S,A,_)=>{j(_[A]).selectAll("defs").data([A]).join("defs"),j(_[A]).selectAll("g").data([A]).join("g").classed(u,!0)}),$=>$,$=>$.remove())}),m=>m,m=>m.remove())),se(1));G({seriesSelection:c,gridContainerPosition:i}).pipe(z(async d=>d)).subscribe(d=>{d.seriesSelection.transition().attr("transform",(g,m)=>{const b=d.gridContainerPosition[m]??d.gridContainerPosition[0],y=b.translate,x=b.scale;return`translate(${y[0]}, ${y[1]}) scale(${x[0]}, ${x[1]})`})});const h=G({seriesSelection:c,gridAxesTransform:o}).pipe(z(async d=>d),L(d=>d.seriesSelection.select(`g.${l}`).style("transform",d.gridAxesTransform.value)),se(1)),f=h.pipe(L(d=>d.select("defs")),se(1)),p=G({axesSelection:h,gridGraphicTransform:a}).pipe(z(async d=>d),L(d=>{const g=d.axesSelection.select(`g.${u}`);return g.transition().duration(50).style("transform",d.gridGraphicTransform.value),g}),se(1));return{seriesSelection$:c,axesSelection$:h,defsSelection$:f,graphicGSelection$:p}},OI=({selection:e,pluginName:t,computedData$:n,gridContainerPosition$:r,isSeriesSeprate$:i})=>{const o=q(t,"container"),a=G({computedData:n.pipe(K((s,l)=>s.length===l.length)),isSeriesSeprate:i}).pipe(z(async s=>s),L(s=>s.isSeriesSeprate?s.computedData:[s.computedData[0]]),L((s,l)=>e.selectAll(`g.${o}`).data(s,u=>u[0]?u[0].seriesIndex:l).join("g").classed(o,!0)),se(1));return G({containerSelection:a,gridContainerPosition:r}).pipe(z(async s=>s)).subscribe(s=>{s.containerSelection.attr("transform",(l,u)=>{const c=s.gridContainerPosition[u]??s.gridContainerPosition[0],h=c.translate,f=c.scale;return`translate(${h[0]}, ${h[1]}) scale(${f[0]}, ${f[1]})`})}),a},wv=({fullDataFormatter$:e,gridAxesSize$:t,computedData$:n,fullChartParams$:r,gridContainerPosition$:i,layout$:o})=>{const a=new Q,s=G({fullDataFormatter:e,gridAxesSize:t,computedData:n}).pipe(z(async f=>f),L(f=>{const p=f.computedData[0]?f.computedData[0].length-1:0,d=f.fullDataFormatter.groupAxis.scaleDomain[0]-f.fullDataFormatter.groupAxis.scalePadding,g=f.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?p+f.fullDataFormatter.groupAxis.scalePadding:f.fullDataFormatter.groupAxis.scaleDomain[1]+f.fullDataFormatter.groupAxis.scalePadding;return[d,g]}),se(1)),l=G({fullDataFormatter:e,computedData:n}).pipe(z(async f=>f),L(f=>f.fullDataFormatter.seriesDirection==="row"?(f.computedData[0]??[]).map(p=>p.groupLabel):f.computedData.map(p=>p[0].groupLabel))),u=G({groupScaleDomain:s,groupLabels:l}).pipe(z(async f=>f),L(f=>f.groupLabels.filter((p,d)=>d>=f.groupScaleDomain[0]&&d<=f.groupScaleDomain[1]))),c=i.pipe(L(f=>f.reduce((d,g)=>g.columnIndex>d?g.columnIndex:d,0)+1),K()),h=i.pipe(L(f=>f.reduce((d,g)=>g.rowIndex>d?g.rowIndex:d,0)+1),K());return new ge(f=>{G({dataFormatter:e,axisSize:t,fullChartParams:r,scaleRangeGroupLabels:u,groupLabels:l,groupScaleDomain:s,columnAmount:c,rowAmount:h,layout:o}).pipe(D(a),z(async p=>p)).subscribe(p=>{const d=p.dataFormatter.valueAxis.position==="right"||p.dataFormatter.valueAxis.position==="bottom",g=C0({axisLabels:p.scaleRangeGroupLabels,axisWidth:p.axisSize.width,padding:p.dataFormatter.groupAxis.scalePadding,reverse:d}),m=y=>p.dataFormatter.groupAxis.position==="bottom"||p.dataFormatter.groupAxis.position==="top"?y.offsetX-p.fullChartParams.padding.left:y.offsetY-p.fullChartParams.padding.top,b=y=>{const x={offsetX:y.offsetX*p.columnAmount%p.layout.rootWidth,offsetY:y.offsetY*p.rowAmount%p.layout.rootHeight},$=m(x),S=g($),A=Math.ceil(p.groupScaleDomain[0]),_=S+A;return{groupIndex:_,groupLabel:p.groupLabels[_]??""}};return f.next(b),function(){a.next(void 0)}})})},GI=({rootSelection:e,fullDataFormatter$:t,gridAxesSize$:n,computedData$:r,fullChartParams$:i,gridContainerPosition$:o,layout$:a})=>{const s=ga(e,"mousemove"),l=G({fullDataFormatter:t,gridAxesSize:n,computedData:r}).pipe(z(async y=>y),L(y=>{const x=y.computedData[0]?y.computedData[0].length-1:0,$=y.fullDataFormatter.groupAxis.scaleDomain[0]-y.fullDataFormatter.groupAxis.scalePadding,S=y.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?x+y.fullDataFormatter.groupAxis.scalePadding:y.fullDataFormatter.groupAxis.scaleDomain[1]+y.fullDataFormatter.groupAxis.scalePadding;return[$,S]}),se(1)),u=G({fullDataFormatter:t,computedData:r}).pipe(z(async y=>y),L(y=>y.fullDataFormatter.seriesDirection==="row"?(y.computedData[0]??[]).map(x=>x.groupLabel):y.computedData.map(x=>x[0].groupLabel))),c=G({groupScaleDomain:l,groupLabels:u}).pipe(z(async y=>y),L(y=>y.groupLabels.filter((x,$)=>$>=y.groupScaleDomain[0]&&$<=y.groupScaleDomain[1]))),h=t.pipe(L(y=>y.valueAxis.position==="right"||y.valueAxis.position==="bottom")),f=G({reverse:h,gridAxesSize:n,scaleRangeGroupLabels:c,fullDataFormatter:t}).pipe(z(async y=>y),L(y=>C0({axisLabels:y.scaleRangeGroupLabels,axisWidth:y.gridAxesSize.width,padding:y.fullDataFormatter.groupAxis.scalePadding,reverse:y.reverse}))),p=o.pipe(L(y=>y.reduce(($,S)=>S.columnIndex>$?S.columnIndex:$,0)+1),K()),d=o.pipe(L(y=>y.reduce(($,S)=>S.rowIndex>$?S.rowIndex:$,0)+1),K()),g=G({fullDataFormatter:t,fullChartParams:i,rootMousemove:s,columnAmount:p,rowAmount:d,layout:a}).pipe(z(async y=>y),L(y=>{const x={offsetX:y.rootMousemove.offsetX*y.columnAmount%y.layout.rootWidth,offsetY:y.rootMousemove.offsetY*y.rowAmount%y.layout.rootHeight};return y.fullDataFormatter.groupAxis.position==="bottom"||y.fullDataFormatter.groupAxis.position==="top"?x.offsetX-y.fullChartParams.padding.left:x.offsetY-y.fullChartParams.padding.top})),m=G({xIndexScale:f,axisValue:g,groupScaleDomain:l}).pipe(z(async y=>y),L(y=>{const x=y.xIndexScale(y.axisValue),$=Math.ceil(y.groupScaleDomain[0]);return x+$})),b=G({groupIndex:m,groupLabels:u}).pipe(z(async y=>y),L(y=>y.groupLabels[y.groupIndex]??""));return G({groupIndex:m,groupLabel:b}).pipe(z(async y=>y),L(y=>({groupIndex:y.groupIndex,groupLabel:y.groupLabel})))};function WI(e="curveLinear"){return ou().x(t=>t.axisX).y(t=>t.axisY).curve(Tp[e])}function YI(e){let t=[[]],n=0;for(let r in e){if(e[r].visible==!1||e[r].value===void 0||e[r].value===null){t[n].length&&(n++,t[n]=[]);continue}t[n].push(e[r])}return t}function VI({selection:e,pathClassName:t,segmentData:n,linePath:r,params:i}){return e.selectAll("path").data(n,(a,s)=>a.length?`${a[0].id}_${a[a.length-1].id}`:s).join(a=>a.append("path").classed(t,!0).attr("fill","none").attr("pointer-events","visibleStroke").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),a=>a,a=>a.remove()).attr("stroke-width",i.lineWidth).attr("stroke",(a,s)=>a[0]&&a[0].color).attr("d",a=>r(a))}function jI({selection:e,seriesLabel:t,fullChartParams:n}){if(e.interrupt("highlight"),!t){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{r===t?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function XI({defsSelection:e,clipPathData:t,transitionDuration:n,transitionEase:r}){e.selectAll("clipPath").data(t).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{j(a[o]).selectAll("rect").data([i]).join(s=>{const l=s.append("rect");return l.transition().duration(n).ease(pa(r)).tween("tween",(u,c,h)=>f=>{const p=u.width*f;l.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),l},s=>s.attr("x",0).attr("y",0).attr("width",l=>l.width).attr("height",l=>l.height),s=>s.remove())})}const Tv=(e,{selection:t,computedData$:n,computedAxesData$:r,visibleComputedData$:i,visibleComputedAxesData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,allContainerPosition$:b,layout$:y,event$:x})=>{const $=new Q,S=it(e,"clipPath-box"),A=q(e,"path"),{seriesSelection$:_,axesSelection$:P,defsSelection$:M,graphicGSelection$:R}=Pr({selection:t,pluginName:e,clipPathID:S,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),v=new ge(O=>{const B=u.pipe(D($)).subscribe(N=>{if(!N)return;const I=WI(N.lineCurve);O.next(I)});return()=>{B.unsubscribe()}}),E=h.pipe(L(O=>O.transitionDuration),K()),k=h.pipe(L(O=>O.transitionEase),K());G({defsSelection:M,seriesLabels:a,axisSize:d,transitionDuration:E,transitionEase:k}).pipe(D($),z(async O=>O)).subscribe(O=>{const N=[{id:S,width:O.axisSize.width,height:O.axisSize.height}].concat(O.seriesLabels.map(I=>({id:`orbcharts__clipPath_${I}`,width:O.axisSize.width,height:O.axisSize.height})));XI({defsSelection:O.defsSelection,clipPathData:N,transitionDuration:O.transitionDuration,transitionEase:O.transitionEase})});const T=n.pipe(L(O=>{const B=new Map;return O.flat().forEach(N=>B.set(N.id,N)),B})),w=wv({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:h,gridContainerPosition$:b,layout$:y}),C=h.pipe(D($),L(O=>O.highlightTarget),K()),F=G({graphicGSelection:R,visibleComputedAxesData:o,linePath:v,params:u}).pipe(D($),z(async O=>O),L(O=>{let B=[];return O.graphicGSelection.each((N,I,W)=>{const H=YI(O.visibleComputedAxesData[I]??[]);B[I]=VI({selection:j(W[I]),pathClassName:A,linePath:O.linePath,segmentData:H,params:O.params})}),B}));return G({pathSelectionArr:F,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:C,gridGroupPositionFn:w}).pipe(D($),z(async O=>O)).subscribe(O=>{O.pathSelectionArr.forEach(B=>{B.on("mouseover",(N,I)=>{N.stopPropagation();const W=I[0]?I[0].seriesLabel:"",{groupIndex:H,groupLabel:ie}=O.gridGroupPositionFn(N),V=O.GroupDataMap.get(ie).find(J=>J.seriesLabel===W)??I[0];x.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:O.highlightTarget,datum:V,gridIndex:V.gridIndex,series:O.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:O.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:N,data:O.computedData})}).on("mousemove",(N,I)=>{N.stopPropagation();const W=I[0]?I[0].seriesLabel:"",{groupIndex:H,groupLabel:ie}=O.gridGroupPositionFn(N),V=O.GroupDataMap.get(ie).find(J=>J.seriesLabel===W)??I[0];x.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:O.highlightTarget,datum:V,gridIndex:V.gridIndex,series:O.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:O.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:N,data:O.computedData})}).on("mouseout",(N,I)=>{N.stopPropagation();const W=I[0]?I[0].seriesLabel:"",{groupIndex:H,groupLabel:ie}=O.gridGroupPositionFn(N),V=O.GroupDataMap.get(ie).find(J=>J.seriesLabel===W)??I[0];x.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:O.highlightTarget,datum:V,gridIndex:V.gridIndex,series:O.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:O.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:N,data:O.computedData})}).on("click",(N,I)=>{N.stopPropagation();const W=I[0]?I[0].seriesLabel:"",{groupIndex:H,groupLabel:ie}=O.gridGroupPositionFn(N),V=O.GroupDataMap.get(ie).find(J=>J.seriesLabel===W)??I[0];x.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:O.highlightTarget,datum:V,gridIndex:V.gridIndex,series:O.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:O.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:N,data:O.computedData})})})}),h.pipe(D($),Ir(O=>O.highlightTarget==="series"),z(O=>G({graphicGSelection:R,gridHighlight:g,DataMap:T,fullChartParams:h}).pipe(D($),z(async B=>B)))).subscribe(O=>{const B=O.gridHighlight[0]?O.gridHighlight[0].seriesLabel:null;jI({selection:O.graphicGSelection,seriesLabel:B,fullChartParams:O.fullChartParams})}),()=>{$.next(void 0)}},Av=0,zt=2,Pv=3,Cv=4,ht=5,gu=6,mu=7,Ei=8,Ii=9,Dv="Lines",UI=lt({name:Dv,defaultParams:Mr,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:e,rootSelection:t,name:n,observer:r,subject:i})=>{const o=new Q,a=Tv(Dv,{selection:e,computedData$:r.computedData$,computedAxesData$:r.computedAxesData$,visibleComputedData$:r.visibleComputedData$,visibleComputedAxesData$:r.visibleComputedAxesData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,allContainerPosition$:r.gridContainerPosition$,layout$:r.layout$,event$:i.event$});return()=>{o.next(void 0),a()}});function HI(e="curveLinear",t){return dp().x(n=>n.axisX).y0(n=>t).y1(n=>n.axisY).curve(Tp[e])}function qI(e){let t=[[]],n=0;for(let r in e){if(e[r].visible==!1||e[r].value===void 0||e[r].value===null){t[n].length&&(n++,t[n]=[]);continue}t[n].push(e[r])}return t}function ZI({selection:e,pathClassName:t,segmentData:n,areaPath:r,linearGradientIds:i,params:o}){return e.selectAll("path").data(n,(s,l)=>s.length?`${s[0].id}_${s[s.length-1].id}`:l).join(s=>s.append("path").classed(t,!0).attr("fill","none").style("vector-effect","non-scaling-stroke").style("cursor","pointer"),s=>s,s=>s.remove()).attr("fill",(s,l)=>s[0]?`url(#${i[s[0].seriesIndex]})`:"").attr("d",s=>r(s))}function KI({selection:e,seriesLabel:t,fullChartParams:n}){if(e.interrupt("highlight"),!t){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{r===t?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}function QI({defsSelection:e,computedData:t,linearGradientIds:n,params:r}){e.selectAll("linearGradient").data(t??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
49
56
|
<stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
|
50
57
|
<stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
|
51
|
-
`})}function PI({defsSelection:t,clipPathData:e,transitionDuration:n,transitionEase:r}){t.selectAll("clipPath").data(e).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{V(a[o]).selectAll("rect").data([i]).join(s=>{const l=s.append("rect");return l.transition().duration(n).ease(fa(r)).tween("tween",(u,c,f)=>h=>{const p=u.width*h;l.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),l},s=>s.attr("x",0).attr("y",0).attr("width",l=>l.width).attr("height",l=>l.height),s=>s.remove())})}const p$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,layout$:y,event$:b})=>{const v=new J,x=Pe(t,"clipPath-box"),_=Z(t,"path"),{seriesSelection$:A,axesSelection$:S,defsSelection$:P,graphicGSelection$:C}=Tr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p}),B=p.pipe(L(v),R(I=>-I.translate[1]/I.scale[1])),$=new dt(I=>{const N=W({fullParams:u,valueAxisStart:B}).pipe(L(v)).subscribe(E=>{const O=_I(E.fullParams.lineCurve,E.valueAxisStart);I.next(O)});return()=>{N.unsubscribe()}}),k=f.pipe(R(I=>I.transitionDuration),tt()),M=f.pipe(R(I=>I.transitionEase),tt());W({defsSelection:P,seriesLabels:a,axisSize:d,transitionDuration:k,transitionEase:M}).pipe(L(v),G(async I=>I)).subscribe(I=>{const E=[{id:x,width:I.axisSize.width,height:I.axisSize.height}].concat(I.seriesLabels.map(O=>({id:`orbcharts__clipPath_${O}`,width:I.axisSize.width,height:I.axisSize.height})));PI({defsSelection:I.defsSelection,clipPathData:E,transitionDuration:I.transitionDuration,transitionEase:I.transitionEase})});const T=n.pipe(R(I=>{const N=new Map;return I.flat().forEach(E=>N.set(E.id,E)),N})),w=s$({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:f,gridContainerPosition$:g,layout$:y}),D=f.pipe(L(v),R(I=>I.highlightTarget),tt()),F=a.pipe(L(v),R(I=>I.map((N,E)=>Pe(t,`lineargradient-${N}`)))),z=W({graphicGSelection:C,defsSelection:P,visibleComputedLayoutData:o,linearGradientIds:F,areaPath:$,params:u}).pipe(L(v),G(async I=>I),R(I=>{let N=[];return I.graphicGSelection.each((E,O,j)=>{const it=SI(I.visibleComputedLayoutData[O]??[]);N[O]=wI({selection:V(j[O]),pathClassName:_,areaPath:I.areaPath,segmentData:it,linearGradientIds:I.linearGradientIds,params:I.params}),AI({defsSelection:I.defsSelection,computedData:I.visibleComputedLayoutData,linearGradientIds:I.linearGradientIds,params:I.params})}),N}));return W({pathSelectionArr:z,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:D,gridGroupPositionFn:w}).pipe(L(v),G(async I=>I)).subscribe(I=>{I.pathSelectionArr.forEach(N=>{N.on("mouseover",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:Y}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(Y).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})}).on("mousemove",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:Y}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(Y).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})}).on("mouseout",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:Y}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(Y).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})}).on("click",(E,O)=>{const j=O[0]?O[0].seriesLabel:"",{groupIndex:it,groupLabel:Y}=I.gridGroupPositionFn(E),K=I.GroupDataMap.get(Y).find(q=>q.seriesLabel===j)??O[0];b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:I.highlightTarget,datum:K,gridIndex:K.gridIndex,series:I.SeriesDataMap.get(K.seriesLabel),seriesIndex:K.seriesIndex,seriesLabel:K.seriesLabel,group:I.GroupDataMap.get(K.groupLabel),groupIndex:K.groupIndex,groupLabel:K.groupLabel,event:E,data:I.computedData})})})}),f.pipe(L(v),Rr(I=>I.highlightTarget==="series"),G(I=>W({graphicGSelection:C,gridHighlight:m,DataMap:T,fullChartParams:f}).pipe(L(v),G(async N=>N)))).subscribe(I=>{const N=I.gridHighlight[0]?I.gridHighlight[0].seriesLabel:null;TI({selection:I.graphicGSelection,seriesLabel:N,fullChartParams:I.fullChartParams})}),()=>{v.next(void 0)}},d$="LineAreas",DI=se({name:d$,defaultParams:ed,layerIndex:f$,validator:(t,{validateColumns:e})=>e(t,{lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=p$(d$,{selection:t,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedLayoutData$:n.computedLayoutData$,visibleComputedLayoutData$:n.visibleComputedLayoutData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,allContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),g$=.3;function m$({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function CI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yh().domain(e).range([-i/2+r,i/2-r])}function MI(t,e){return t<=1?0:e/(t-1)*g$}function LI(t,e){return t<=1?e:e*(1-g$)}function kI({graphicGSelection:t,rectClassName:e,visibleComputedLayoutData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:l,transformedBarRadius:u,delayGroup:c,transitionItem:f,isSeriesSeprate:h}){const p=l/2;return t.each((m,g,y)=>{V(y[g]).selectAll(`rect.${e}`).data(n[g]??[],b=>b.id).join(b=>b.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",v=>1),b=>b,b=>b.remove()).attr("transform",(b,v)=>`translate(${(b?b.axisX:0)-p}, 0)`).attr("fill",b=>b.color).attr("y",b=>b.axisY<r[g]?b.axisY:r[g]).attr("x",b=>h?0:o(b.seriesLabel)).attr("width",l).attr("rx",u[g][0]??1).attr("ry",u[g][1]??1).transition().duration(f).ease(fa(s.transitionEase)).delay((b,v)=>b.groupIndex*c).attr("height",b=>Math.abs(b.axisYFromZero)||1)}),t.selectAll(`rect.${e}`)}function RI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function EI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Sp=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,isSeriesSeprate$:y,event$:b})=>{const v=new J,x=Pe(t,"clipPath-box"),_=Z(t,"rect"),{seriesSelection$:A,axesSelection$:S,defsSelection$:P,graphicGSelection$:C}=Tr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:f,gridGraphicTransform$:h}),B=o.pipe(L(v),R(N=>N.map(E=>E[0]?E[0].axisY-E[0].axisYFromZero:0)),tt()),$=W({computedData:n,visibleComputedData:i,params:u,gridAxesSize:d,isSeriesSeprate:y}).pipe(L(v),G(async N=>N),R(N=>N.params.barWidth?N.params.barWidth:N.isSeriesSeprate?m$({axisWidth:N.gridAxesSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barAmountOfGroup:1,barPadding:N.params.barPadding,barGroupPadding:N.params.barGroupPadding}):m$({axisWidth:N.gridAxesSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barAmountOfGroup:N.visibleComputedData.length,barPadding:N.params.barPadding,barGroupPadding:N.params.barGroupPadding})),tt()),k=W({computedData:n,barWidth:$,params:u,gridGraphicReverseScale:p}).pipe(L(v),G(async N=>N),R(N=>{const E=N.barWidth/2,O=N.params.barRadius===!0?E:N.params.barRadius===!1?0:typeof N.params.barRadius=="number"?N.params.barRadius:0;return N.computedData.map((j,it)=>{const Y=N.gridGraphicReverseScale[it]??N.gridGraphicReverseScale[0];let Q=O*Y[0],X=O*Y[1];if(Q>E){const K=E/Q;Q=Q*K,X=X*K}return[Q,X]})})),M=i.pipe(L(v),R(N=>{const E=new Set;return N.forEach(O=>{O.forEach(j=>{E.add(j.groupLabel)})}),Array.from(E)})),T=W({seriesLabels:a,barWidth:$,params:u}).pipe(L(v),G(async N=>N),R(N=>CI(N.barWidth,N.seriesLabels,N.params))),w=c.pipe(L(v),R(N=>N.transitionDuration),tt()),D=new dt(N=>{W({groupLabels:M,transitionDuration:w}).pipe(G(async E=>E)).subscribe(E=>{const O=MI(E.groupLabels.length,E.transitionDuration);N.next(O)})}).pipe(L(v),tt()),F=new dt(N=>{W({groupLabels:M,transitionDuration:w}).pipe(G(async E=>E)).subscribe(E=>{const O=LI(E.groupLabels.length,E.transitionDuration);N.next(O)})}).pipe(L(v),tt());W({defsSelection:P,gridAxesSize:d}).pipe(L(v),G(async N=>N)).subscribe(N=>{const E=[{id:x,width:N.gridAxesSize.width,height:N.gridAxesSize.height}];RI({defsSelection:N.defsSelection,clipPathData:E})});const z=c.pipe(L(v),R(N=>N.highlightTarget),tt()),I=W({graphicGSelection:C,visibleComputedLayoutData:o,zeroYArr:B,groupLabels:M,barScale:T,params:u,chartParams:c,highlightTarget:z,barWidth:$,transformedBarRadius:k,delayGroup:D,transitionItem:F,isSeriesSeprate:y}).pipe(L(v),G(async N=>N),R(N=>kI({graphicGSelection:N.graphicGSelection,rectClassName:_,visibleComputedLayoutData:N.visibleComputedLayoutData,zeroYArr:N.zeroYArr,groupLabels:N.groupLabels,barScale:N.barScale,params:N.params,chartParams:N.chartParams,barWidth:N.barWidth,transformedBarRadius:N.transformedBarRadius,delayGroup:N.delayGroup,transitionItem:N.transitionItem,isSeriesSeprate:N.isSeriesSeprate})));return W({barSelection:I,computedData:n,highlightTarget:z,SeriesDataMap:s,GroupDataMap:l}).pipe(L(v),G(async N=>N)).subscribe(N=>{N.barSelection.on("mouseover",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})}).on("mousemove",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})}).on("mouseout",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})}).on("click",(E,O)=>{E.stopPropagation(),b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:N.highlightTarget,datum:O,gridIndex:O.gridIndex,series:N.SeriesDataMap.get(O.seriesLabel),seriesIndex:O.seriesIndex,seriesLabel:O.seriesLabel,group:N.GroupDataMap.get(O.groupLabel),groupIndex:O.groupIndex,groupLabel:O.groupLabel,event:E,data:N.computedData})})}),W({barSelection:I,highlight:m.pipe(R(N=>N.map(E=>E.id))),fullChartParams:c}).pipe(L(v),G(async N=>N)).subscribe(N=>{EI({selection:N.barSelection,ids:N.highlight,fullChartParams:N.fullChartParams})}),()=>{v.next(void 0)}},y$="Bars",II=se({name:y$,defaultParams:ma,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=Sp(y$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),b$="BarsPN",BI=se({name:b$,defaultParams:ma,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=Sp(b$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Sa(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),x$=.3;function NI({axisWidth:t,groupAmount:e,barGroupPadding:n=0}){const i=(e>1?t/(e-1):t)-n;return i>1?i:1}function FI(t,e){return t<=1?0:e/(t-1)*x$}function zI(t,e){return t<=1?e:e*(1-x$)}function OI({graphicGSelection:t,rectClassName:e,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:l,delayGroup:u,transitionItem:c,isSeriesSeprate:f}){const h=s/2;return t.each((d,m,g)=>{V(g[m]).selectAll(`rect.${e}`).data(n[m]??[],y=>y.id).join(y=>y.append("rect").classed(e,!0).attr("cursor","pointer").attr("height",b=>1),y=>y,y=>y.remove()).attr("transform",(y,b)=>`translate(${(y?y.axisX:0)-h}, 0)`).attr("fill",y=>y.color).attr("y",y=>r).attr("x",y=>0).attr("width",s).attr("rx",l[m][0]??1).attr("ry",l[m][1]??1).transition().duration(c).ease(fa(a.transitionEase)).delay((y,b)=>y.groupIndex*u).attr("y",y=>y._barStartY).attr("height",y=>Math.abs(y._barHeight)||1)}),t.selectAll(`rect.${e}`)}function GI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function WI({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1):V(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const v$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:m,gridHighlight$:g,gridContainerPosition$:y,isSeriesSeprate$:b,event$:v})=>{const x=new J,_=Pe(t,"clipPath-box"),A=Z(t,"rect"),{seriesSelection$:S,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:e,pluginName:t,clipPathID:_,seriesLabels$:a,gridContainerPosition$:y,gridAxesTransform$:h,gridGraphicTransform$:p}),$=o.pipe(L(x),R(Y=>Y[0]&&Y[0][0]?Y[0][0].axisY-Y[0][0].axisYFromZero:0),tt()),k=W({computedData:n,params:u,axisSize:m,isSeriesSeprate:b}).pipe(L(x),G(async Y=>Y),R(Y=>Y.params.barWidth?Y.params.barWidth:NI({axisWidth:Y.axisSize.width,groupAmount:Y.computedData[0]?Y.computedData[0].length:0,barGroupPadding:Y.params.barGroupPadding})),tt()),M=W({computedData:n,barWidth:k,params:u,gridGraphicReverseScale:d}).pipe(L(x),G(async Y=>Y),R(Y=>{const Q=Y.barWidth/2,X=Y.params.barRadius===!0?Q:Y.params.barRadius===!1?0:typeof Y.params.barRadius=="number"?Y.params.barRadius:0;return Y.computedData.map((K,q)=>{const nt=Y.gridGraphicReverseScale[q]??Y.gridGraphicReverseScale[0],st=X*nt[0],U=X*nt[1];return[st,U]})})),T=i.pipe(L(x),R(Y=>{const Q=new Set;return Y.forEach(X=>{X.forEach(K=>{Q.add(K.groupLabel)})}),Array.from(Q)}),pt(1)),w=f.pipe(L(x),R(Y=>Y.transitionDuration),tt()),D=new dt(Y=>{W({groupLabels:T,transitionDuration:w}).pipe(G(async Q=>Q)).subscribe(Q=>{const X=FI(Q.groupLabels.length,Q.transitionDuration);Y.next(X)})}).pipe(L(x),tt()),F=new dt(Y=>{W({groupLabels:T,transitionDuration:w}).pipe(G(async Q=>Q)).subscribe(Q=>{const X=zI(Q.groupLabels.length,Q.transitionDuration);Y.next(X)})}).pipe(L(x),tt()),z=W({computedData:n,dataFormatter:c}).pipe(L(x),G(async Y=>Y),R(Y=>{const Q=Y.computedData[0]?Y.computedData[0].length-1:0,X=Y.dataFormatter.groupAxis.scaleDomain[0],K=Y.dataFormatter.groupAxis.scaleDomain[1]==="max"?Q:Y.dataFormatter.groupAxis.scaleDomain[1];return[X,K]})),I=W({visibleComputedLayoutData:o,groupScaleDomain:z}).pipe(L(x),G(async Y=>Y),R(Y=>{const Q=Y.groupScaleDomain[0],X=Y.groupScaleDomain[1],q=Y.visibleComputedLayoutData.map(mt=>mt.filter((ft,Et)=>ft.groupIndex>=Q&&ft.groupIndex<=X)).flat();if(q.length<=1)return 1;const nt=q.reduce((mt,ft)=>ft.value>mt.value?ft:mt,q[0]),st=nt.groupIndex,U=q.filter(mt=>mt.groupIndex===st).reduce((mt,ft)=>mt+ft.value,0);return nt.value/U})),N=W({computedLayoutData:r,yRatio:I,zeroY:$}).pipe(L(x),R(Y=>{let Q=Y.computedLayoutData[0]?Y.computedLayoutData[0].map(()=>Y.zeroY):[];return Y.computedLayoutData.map((X,K)=>X.map((q,nt)=>{const st=Q[nt];let U=0;return q.visible&&(U=q.axisYFromZero*Y.yRatio,Q[nt]=Q[nt]+U),{...q,_barStartY:st,_barHeight:U}}))})),E=W({computedLayoutData:r,zeroY:$}).pipe(L(x),R(Y=>Y.computedLayoutData.map((Q,X)=>Q.map((K,q)=>({...K,_barStartY:Y.zeroY,_barHeight:K.axisYFromZero}))))),O=b.pipe(G(Y=>Yi(()=>Y,E,N)));W({defsSelection:C,gridAxesSize:m}).pipe(L(x),G(async Y=>Y)).subscribe(Y=>{const Q=[{id:_,width:Y.gridAxesSize.width,height:Y.gridAxesSize.height}];GI({defsSelection:Y.defsSelection,clipPathData:Q})});const j=f.pipe(L(x),R(Y=>Y.highlightTarget),tt()),it=W({graphicGSelection:B,graphicData:O,zeroY:$,groupLabels:T,params:u,chartParams:f,highlightTarget:j,barWidth:k,transformedBarRadius:M,delayGroup:D,transitionItem:F,isSeriesSeprate:b}).pipe(L(x),G(async Y=>Y),R(Y=>OI({graphicGSelection:Y.graphicGSelection,rectClassName:A,barData:Y.graphicData,zeroY:Y.zeroY,groupLabels:Y.groupLabels,params:Y.params,chartParams:Y.chartParams,barWidth:Y.barWidth,transformedBarRadius:Y.transformedBarRadius,delayGroup:Y.delayGroup,transitionItem:Y.transitionItem,isSeriesSeprate:Y.isSeriesSeprate})));return W({barSelection:it,computedData:n,highlightTarget:j,SeriesDataMap:s,GroupDataMap:l}).subscribe(Y=>{Y.barSelection.on("mouseover",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:Y.highlightTarget,datum:X,gridIndex:X.gridIndex,series:Y.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:Y.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:Y.computedData})}).on("mousemove",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:Y.highlightTarget,datum:X,gridIndex:X.gridIndex,series:Y.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:Y.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:Y.computedData})}).on("mouseout",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:Y.highlightTarget,datum:X,gridIndex:X.gridIndex,series:Y.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:Y.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:Y.computedData})}).on("click",(Q,X)=>{Q.stopPropagation(),v.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:Y.highlightTarget,datum:X,gridIndex:X.gridIndex,series:Y.SeriesDataMap.get(X.seriesLabel),seriesIndex:X.seriesIndex,seriesLabel:X.seriesLabel,group:Y.GroupDataMap.get(X.groupLabel),groupIndex:X.groupIndex,groupLabel:X.groupLabel,event:Q,data:Y.computedData})})}),W({barSelection:it,highlight:g.pipe(R(Y=>Y.map(Q=>Q.id))),fullChartParams:f}).pipe(L(x),G(async Y=>Y)).subscribe(Y=>{WI({selection:Y.barSelection,ids:Y.highlight,fullChartParams:Y.fullChartParams})}),()=>{x.next(void 0)}},$$="StackedBar",YI=se({name:$$,defaultParams:rd,layerIndex:5,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=v$($$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),_$=.3;function S$({axisWidth:t,groupAmount:e,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((e>1?t/(e-1):t)-i)/n-r;return a>1?a:1}function XI(t,e,n){const r=t/2,i=t*e.length+n.barPadding*e.length;return Yh().domain(e).range([-i/2+r,i/2-r])}function VI(t,e){return t<=1?0:e/(t-1)*_$}function UI(t,e){return t<=1?e:e*(1-_$)}function HI({graphicGSelection:t,pathGClassName:e,pathClassName:n,visibleComputedLayoutData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:l,chartParams:u,barWidth:c,delayGroup:f,transitionItem:h,isSeriesSeprate:p}){const d=c/2;return t.each((g,y,b)=>{V(b[y]).selectAll(`g.${e}`).data(r[y]??[]).join(x=>{const _=x.append("g").classed(e,!0).attr("cursor","pointer");return _.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",A=>{const S=-d,P=o[y],C=o[y];return`M${S},${P} L${S+c/2},${C} ${S+c},${P}`}),_},x=>x,x=>x.remove()).attr("transform",x=>`translate(${p?0:s(x.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",x=>Math.abs(x.axisYFromZero)||1).attr("y",x=>x.axisY<o[y]?x.axisY:o[y]).attr("x",x=>p?0:s(x.seriesLabel)).style("fill",x=>`url(#${i[x.seriesIndex]})`).attr("stroke",x=>x.color).attr("transform",x=>`translate(${x?x.axisX:0}, 0)`).transition().duration(h).ease(fa(u.transitionEase)).delay((x,_)=>x.groupIndex*f).attr("d",x=>{const _=-d,A=o[y],S=x.axisY;return`M${_},${A} L${_+c/2},${S} ${_+c},${A}`})}),t.selectAll(`path.${n}`)}function jI({defsSelection:t,computedData:e,linearGradientIds:n,params:r}){t.selectAll("linearGradient").data(e??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
58
|
+
`})}function JI({defsSelection:e,clipPathData:t,transitionDuration:n,transitionEase:r}){e.selectAll("clipPath").data(t).join(i=>i.append("clipPath"),i=>i,i=>i.remove()).attr("id",i=>i.id).each((i,o,a)=>{j(a[o]).selectAll("rect").data([i]).join(s=>{const l=s.append("rect");return l.transition().duration(n).ease(pa(r)).tween("tween",(u,c,h)=>f=>{const p=u.width*f;l.attr("x",0).attr("y",0).attr("width",d=>p).attr("height",d=>d.height)}),l},s=>s.attr("x",0).attr("y",0).attr("width",l=>l.width).attr("height",l=>l.height),s=>s.remove())})}const Mv=(e,{selection:t,computedData$:n,computedAxesData$:r,visibleComputedData$:i,visibleComputedAxesData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,layout$:b,event$:y})=>{const x=new Q,$=it(e,"clipPath-box"),S=q(e,"path"),{seriesSelection$:A,axesSelection$:_,defsSelection$:P,graphicGSelection$:M}=Pr({selection:t,pluginName:e,clipPathID:$,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p}),R=p.pipe(D(x),L(B=>-B.translate[1]/B.scale[1])),v=new ge(B=>{const N=G({fullParams:u,valueAxisStart:R}).pipe(D(x)).subscribe(I=>{const W=HI(I.fullParams.lineCurve,I.valueAxisStart);B.next(W)});return()=>{N.unsubscribe()}}),E=h.pipe(L(B=>B.transitionDuration),K()),k=h.pipe(L(B=>B.transitionEase),K());G({defsSelection:P,seriesLabels:a,axisSize:d,transitionDuration:E,transitionEase:k}).pipe(D(x),z(async B=>B)).subscribe(B=>{const I=[{id:$,width:B.axisSize.width,height:B.axisSize.height}].concat(B.seriesLabels.map(W=>({id:`orbcharts__clipPath_${W}`,width:B.axisSize.width,height:B.axisSize.height})));JI({defsSelection:B.defsSelection,clipPathData:I,transitionDuration:B.transitionDuration,transitionEase:B.transitionEase})});const T=n.pipe(L(B=>{const N=new Map;return B.flat().forEach(I=>N.set(I.id,I)),N})),w=wv({fullDataFormatter$:c,gridAxesSize$:d,computedData$:n,fullChartParams$:h,gridContainerPosition$:m,layout$:b}),C=h.pipe(D(x),L(B=>B.highlightTarget),K()),F=a.pipe(D(x),L(B=>B.map((N,I)=>it(e,`lineargradient-${N}`)))),O=G({graphicGSelection:M,defsSelection:P,visibleComputedAxesData:o,linearGradientIds:F,areaPath:v,params:u}).pipe(D(x),z(async B=>B),L(B=>{let N=[];return B.graphicGSelection.each((I,W,H)=>{const ie=qI(B.visibleComputedAxesData[W]??[]);N[W]=ZI({selection:j(H[W]),pathClassName:S,areaPath:B.areaPath,segmentData:ie,linearGradientIds:B.linearGradientIds,params:B.params}),QI({defsSelection:B.defsSelection,computedData:B.visibleComputedAxesData,linearGradientIds:B.linearGradientIds,params:B.params})}),N}));return G({pathSelectionArr:O,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:C,gridGroupPositionFn:w}).pipe(D(x),z(async B=>B)).subscribe(B=>{B.pathSelectionArr.forEach(N=>{N.on("mouseover",(I,W)=>{const H=W[0]?W[0].seriesLabel:"",{groupIndex:ie,groupLabel:Y}=B.gridGroupPositionFn(I),J=B.GroupDataMap.get(Y).find(Z=>Z.seriesLabel===H)??W[0];y.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:B.highlightTarget,datum:J,gridIndex:J.gridIndex,series:B.SeriesDataMap.get(J.seriesLabel),seriesIndex:J.seriesIndex,seriesLabel:J.seriesLabel,group:B.GroupDataMap.get(J.groupLabel),groupIndex:J.groupIndex,groupLabel:J.groupLabel,event:I,data:B.computedData})}).on("mousemove",(I,W)=>{const H=W[0]?W[0].seriesLabel:"",{groupIndex:ie,groupLabel:Y}=B.gridGroupPositionFn(I),J=B.GroupDataMap.get(Y).find(Z=>Z.seriesLabel===H)??W[0];y.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:B.highlightTarget,datum:J,gridIndex:J.gridIndex,series:B.SeriesDataMap.get(J.seriesLabel),seriesIndex:J.seriesIndex,seriesLabel:J.seriesLabel,group:B.GroupDataMap.get(J.groupLabel),groupIndex:J.groupIndex,groupLabel:J.groupLabel,event:I,data:B.computedData})}).on("mouseout",(I,W)=>{const H=W[0]?W[0].seriesLabel:"",{groupIndex:ie,groupLabel:Y}=B.gridGroupPositionFn(I),J=B.GroupDataMap.get(Y).find(Z=>Z.seriesLabel===H)??W[0];y.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:B.highlightTarget,datum:J,gridIndex:J.gridIndex,series:B.SeriesDataMap.get(J.seriesLabel),seriesIndex:J.seriesIndex,seriesLabel:J.seriesLabel,group:B.GroupDataMap.get(J.groupLabel),groupIndex:J.groupIndex,groupLabel:J.groupLabel,event:I,data:B.computedData})}).on("click",(I,W)=>{const H=W[0]?W[0].seriesLabel:"",{groupIndex:ie,groupLabel:Y}=B.gridGroupPositionFn(I),J=B.GroupDataMap.get(Y).find(Z=>Z.seriesLabel===H)??W[0];y.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:B.highlightTarget,datum:J,gridIndex:J.gridIndex,series:B.SeriesDataMap.get(J.seriesLabel),seriesIndex:J.seriesIndex,seriesLabel:J.seriesLabel,group:B.GroupDataMap.get(J.groupLabel),groupIndex:J.groupIndex,groupLabel:J.groupLabel,event:I,data:B.computedData})})})}),h.pipe(D(x),Ir(B=>B.highlightTarget==="series"),z(B=>G({graphicGSelection:M,gridHighlight:g,DataMap:T,fullChartParams:h}).pipe(D(x),z(async N=>N)))).subscribe(B=>{const N=B.gridHighlight[0]?B.gridHighlight[0].seriesLabel:null;KI({selection:B.graphicGSelection,seriesLabel:N,fullChartParams:B.fullChartParams})}),()=>{x.next(void 0)}},Lv="LineAreas",eB=lt({name:Lv,defaultParams:hd,layerIndex:Cv,validator:(e,{validateColumns:t})=>t(e,{lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=Mv(Lv,{selection:e,computedData$:n.computedData$,visibleComputedData$:n.visibleComputedData$,computedAxesData$:n.computedAxesData$,visibleComputedAxesData$:n.visibleComputedAxesData$,seriesLabels$:n.seriesLabels$,SeriesDataMap$:n.SeriesDataMap$,GroupDataMap$:n.GroupDataMap$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridGraphicTransform$:n.gridGraphicTransform$,gridAxesSize$:n.gridAxesSize$,gridHighlight$:n.gridHighlight$,gridContainerPosition$:n.gridContainerPosition$,allContainerPosition$:n.gridContainerPosition$,layout$:n.layout$,event$:r.event$});return()=>{i.next(void 0),o()}}),kv=.3;function Rv({axisWidth:e,groupAmount:t,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((t>1?e/(t-1):e)-i)/n-r;return a>1?a:1}function tB(e,t,n){const r=e/2,i=e*t.length+n.barPadding*t.length;return Hh().domain(t).range([-i/2+r,i/2-r])}function nB(e,t){return e<=1?0:t/(e-1)*kv}function rB(e,t){return e<=1?t:t*(1-kv)}function iB({graphicGSelection:e,rectClassName:t,visibleComputedAxesData:n,zeroYArr:r,groupLabels:i,barScale:o,params:a,chartParams:s,barWidth:l,transformedBarRadius:u,delayGroup:c,transitionItem:h,isSeriesSeprate:f}){const p=l/2;return e.each((g,m,b)=>{j(b[m]).selectAll(`rect.${t}`).data(n[m]??[],y=>y.id).join(y=>y.append("rect").classed(t,!0).attr("cursor","pointer").attr("height",x=>1),y=>y,y=>y.remove()).attr("transform",(y,x)=>`translate(${(y?y.axisX:0)-p}, 0)`).attr("fill",y=>y.color).attr("y",y=>y.axisY<r[m]?y.axisY:r[m]).attr("x",y=>f?0:o(y.seriesLabel)).attr("width",l).attr("rx",u[m][0]??1).attr("ry",u[m][1]??1).transition().duration(h).ease(pa(s.transitionEase)).delay((y,x)=>y.groupIndex*c).attr("height",y=>Math.abs(y.axisYFromZero)||1)}),e.selectAll(`rect.${t}`)}function oB({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function aB({selection:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Pp=(e,{selection:t,computedData$:n,computedAxesData$:r,visibleComputedData$:i,visibleComputedAxesData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullChartParams$:c,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:b,event$:y})=>{const x=new Q,$=it(e,"clipPath-box"),S=q(e,"rect"),{seriesSelection$:A,axesSelection$:_,defsSelection$:P,graphicGSelection$:M}=Pr({selection:t,pluginName:e,clipPathID:$,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),R=o.pipe(D(x),L(N=>N.map(I=>I[0]?I[0].axisY-I[0].axisYFromZero:0)),K()),v=G({computedData:n,visibleComputedData:i,params:u,gridAxesSize:d,isSeriesSeprate:b}).pipe(D(x),z(async N=>N),L(N=>N.params.barWidth?N.params.barWidth:N.isSeriesSeprate?Rv({axisWidth:N.gridAxesSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barAmountOfGroup:1,barPadding:N.params.barPadding,barGroupPadding:N.params.barGroupPadding}):Rv({axisWidth:N.gridAxesSize.width,groupAmount:N.computedData[0]?N.computedData[0].length:0,barAmountOfGroup:N.visibleComputedData.length,barPadding:N.params.barPadding,barGroupPadding:N.params.barGroupPadding})),K()),E=G({computedData:n,barWidth:v,params:u,gridGraphicReverseScale:p}).pipe(D(x),z(async N=>N),L(N=>{const I=N.barWidth/2,W=N.params.barRadius===!0?I:N.params.barRadius===!1?0:typeof N.params.barRadius=="number"?N.params.barRadius:0;return N.computedData.map((H,ie)=>{const Y=N.gridGraphicReverseScale[ie]??N.gridGraphicReverseScale[0];let ee=W*Y[0],V=W*Y[1];if(ee>I){const J=I/ee;ee=ee*J,V=V*J}return[ee,V]})})),k=i.pipe(D(x),L(N=>{const I=new Set;return N.forEach(W=>{W.forEach(H=>{I.add(H.groupLabel)})}),Array.from(I)})),T=G({seriesLabels:a,barWidth:v,params:u}).pipe(D(x),z(async N=>N),L(N=>tB(N.barWidth,N.seriesLabels,N.params))),w=c.pipe(D(x),L(N=>N.transitionDuration),K()),C=new ge(N=>{G({groupLabels:k,transitionDuration:w}).pipe(z(async I=>I)).subscribe(I=>{const W=nB(I.groupLabels.length,I.transitionDuration);N.next(W)})}).pipe(D(x),K()),F=new ge(N=>{G({groupLabels:k,transitionDuration:w}).pipe(z(async I=>I)).subscribe(I=>{const W=rB(I.groupLabels.length,I.transitionDuration);N.next(W)})}).pipe(D(x),K());G({defsSelection:P,gridAxesSize:d}).pipe(D(x),z(async N=>N)).subscribe(N=>{const I=[{id:$,width:N.gridAxesSize.width,height:N.gridAxesSize.height}];oB({defsSelection:N.defsSelection,clipPathData:I})});const O=c.pipe(D(x),L(N=>N.highlightTarget),K()),B=G({graphicGSelection:M,visibleComputedAxesData:o,zeroYArr:R,groupLabels:k,barScale:T,params:u,chartParams:c,highlightTarget:O,barWidth:v,transformedBarRadius:E,delayGroup:C,transitionItem:F,isSeriesSeprate:b}).pipe(D(x),z(async N=>N),L(N=>iB({graphicGSelection:N.graphicGSelection,rectClassName:S,visibleComputedAxesData:N.visibleComputedAxesData,zeroYArr:N.zeroYArr,groupLabels:N.groupLabels,barScale:N.barScale,params:N.params,chartParams:N.chartParams,barWidth:N.barWidth,transformedBarRadius:N.transformedBarRadius,delayGroup:N.delayGroup,transitionItem:N.transitionItem,isSeriesSeprate:N.isSeriesSeprate})));return G({barSelection:B,computedData:n,highlightTarget:O,SeriesDataMap:s,GroupDataMap:l}).pipe(D(x),z(async N=>N)).subscribe(N=>{N.barSelection.on("mouseover",(I,W)=>{I.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:N.highlightTarget,datum:W,gridIndex:W.gridIndex,series:N.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,group:N.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:I,data:N.computedData})}).on("mousemove",(I,W)=>{I.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:N.highlightTarget,datum:W,gridIndex:W.gridIndex,series:N.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,group:N.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:I,data:N.computedData})}).on("mouseout",(I,W)=>{I.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:N.highlightTarget,datum:W,gridIndex:W.gridIndex,series:N.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,group:N.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:I,data:N.computedData})}).on("click",(I,W)=>{I.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:N.highlightTarget,datum:W,gridIndex:W.gridIndex,series:N.SeriesDataMap.get(W.seriesLabel),seriesIndex:W.seriesIndex,seriesLabel:W.seriesLabel,group:N.GroupDataMap.get(W.groupLabel),groupIndex:W.groupIndex,groupLabel:W.groupLabel,event:I,data:N.computedData})})}),G({barSelection:B,highlight:g.pipe(L(N=>N.map(I=>I.id))),fullChartParams:c}).pipe(D(x),z(async N=>N)).subscribe(N=>{aB({selection:N.barSelection,ids:N.highlight,fullChartParams:N.fullChartParams})}),()=>{x.next(void 0)}},Ev="Bars",sB=lt({name:Ev,defaultParams:va,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=Pp(Ev,{selection:e,computedData$:r.computedData$,computedAxesData$:r.computedAxesData$,visibleComputedData$:r.visibleComputedData$,visibleComputedAxesData$:r.visibleComputedAxesData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),Iv="BarsPN",lB=lt({name:Iv,defaultParams:va,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=Pp(Iv,{selection:e,computedData$:r.computedData$,computedAxesData$:r.computedAxesData$,visibleComputedData$:r.visibleComputedData$,visibleComputedAxesData$:r.visibleComputedAxesData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:Wt(!0),event$:n.event$});return()=>{i.next(void 0),o()}}),Bv=.3;function uB({axisWidth:e,groupAmount:t,barGroupPadding:n=0}){const i=(t>1?e/(t-1):e)-n;return i>1?i:1}function cB(e,t){return e<=1?0:t/(e-1)*Bv}function fB(e,t){return e<=1?t:t*(1-Bv)}function hB({graphicGSelection:e,rectClassName:t,barData:n,zeroY:r,groupLabels:i,params:o,chartParams:a,barWidth:s,transformedBarRadius:l,delayGroup:u,transitionItem:c,isSeriesSeprate:h}){const f=s/2;return e.each((d,g,m)=>{j(m[g]).selectAll(`rect.${t}`).data(n[g]??[],b=>b.id).join(b=>b.append("rect").classed(t,!0).attr("cursor","pointer").attr("height",y=>1),b=>b,b=>b.remove()).attr("transform",(b,y)=>`translate(${(b?b.axisX:0)-f}, 0)`).attr("fill",b=>b.color).attr("y",b=>r).attr("x",b=>0).attr("width",s).attr("rx",l[g][0]??1).attr("ry",l[g][1]??1).transition().duration(c).ease(pa(a.transitionEase)).delay((b,y)=>b.groupIndex*u).attr("y",b=>b._barStartY).attr("height",b=>Math.abs(b._barHeight)||1)}),e.selectAll(`rect.${t}`)}function pB({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function dB({selection:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const Nv=(e,{selection:t,computedData$:n,computedAxesData$:r,visibleComputedData$:i,visibleComputedAxesData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullDataFormatter$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridGraphicReverseScale$:d,gridAxesSize$:g,gridHighlight$:m,gridContainerPosition$:b,isSeriesSeprate$:y,event$:x})=>{const $=new Q,S=it(e,"clipPath-box"),A=q(e,"rect"),{seriesSelection$:_,axesSelection$:P,defsSelection$:M,graphicGSelection$:R}=Pr({selection:t,pluginName:e,clipPathID:S,seriesLabels$:a,gridContainerPosition$:b,gridAxesTransform$:f,gridGraphicTransform$:p}),v=o.pipe(D($),L(Y=>Y[0]&&Y[0][0]?Y[0][0].axisY-Y[0][0].axisYFromZero:0),K()),E=G({computedData:n,params:u,axisSize:g,isSeriesSeprate:y}).pipe(D($),z(async Y=>Y),L(Y=>Y.params.barWidth?Y.params.barWidth:uB({axisWidth:Y.axisSize.width,groupAmount:Y.computedData[0]?Y.computedData[0].length:0,barGroupPadding:Y.params.barGroupPadding})),K()),k=G({computedData:n,barWidth:E,params:u,gridGraphicReverseScale:d}).pipe(D($),z(async Y=>Y),L(Y=>{const ee=Y.barWidth/2,V=Y.params.barRadius===!0?ee:Y.params.barRadius===!1?0:typeof Y.params.barRadius=="number"?Y.params.barRadius:0;return Y.computedData.map((J,Z)=>{const ne=Y.gridGraphicReverseScale[Z]??Y.gridGraphicReverseScale[0],le=V*ne[0],U=V*ne[1];return[le,U]})})),T=i.pipe(D($),L(Y=>{const ee=new Set;return Y.forEach(V=>{V.forEach(J=>{ee.add(J.groupLabel)})}),Array.from(ee)}),se(1)),w=h.pipe(D($),L(Y=>Y.transitionDuration),K()),C=new ge(Y=>{G({groupLabels:T,transitionDuration:w}).pipe(z(async ee=>ee)).subscribe(ee=>{const V=cB(ee.groupLabels.length,ee.transitionDuration);Y.next(V)})}).pipe(D($),K()),F=new ge(Y=>{G({groupLabels:T,transitionDuration:w}).pipe(z(async ee=>ee)).subscribe(ee=>{const V=fB(ee.groupLabels.length,ee.transitionDuration);Y.next(V)})}).pipe(D($),K()),O=G({computedData:n,dataFormatter:c}).pipe(D($),z(async Y=>Y),L(Y=>{const ee=Y.computedData[0]?Y.computedData[0].length-1:0,V=Y.dataFormatter.groupAxis.scaleDomain[0],J=Y.dataFormatter.groupAxis.scaleDomain[1]==="max"?ee:Y.dataFormatter.groupAxis.scaleDomain[1];return[V,J]})),B=G({visibleComputedAxesData:o,groupScaleDomain:O}).pipe(D($),z(async Y=>Y),L(Y=>{const ee=Y.groupScaleDomain[0],V=Y.groupScaleDomain[1],Z=Y.visibleComputedAxesData.map(me=>me.filter((he,Ee)=>he.groupIndex>=ee&&he.groupIndex<=V)).flat();if(Z.length<=1)return 1;const ne=Z.reduce((me,he)=>he.value>me.value?he:me,Z[0]),le=ne.groupIndex,U=Z.filter(me=>me.groupIndex===le).reduce((me,he)=>me+he.value,0);return ne.value/U})),N=G({computedAxesData:r,yRatio:B,zeroY:v}).pipe(D($),L(Y=>{let ee=Y.computedAxesData[0]?Y.computedAxesData[0].map(()=>Y.zeroY):[];return Y.computedAxesData.map((V,J)=>V.map((Z,ne)=>{const le=ee[ne];let U=0;return Z.visible&&(U=Z.axisYFromZero*Y.yRatio,ee[ne]=ee[ne]+U),{...Z,_barStartY:le,_barHeight:U}}))})),I=G({computedAxesData:r,zeroY:v}).pipe(D($),L(Y=>Y.computedAxesData.map((ee,V)=>ee.map((J,Z)=>({...J,_barStartY:Y.zeroY,_barHeight:J.axisYFromZero}))))),W=y.pipe(z(Y=>Yn(()=>Y,I,N)));G({defsSelection:M,gridAxesSize:g}).pipe(D($),z(async Y=>Y)).subscribe(Y=>{const ee=[{id:S,width:Y.gridAxesSize.width,height:Y.gridAxesSize.height}];pB({defsSelection:Y.defsSelection,clipPathData:ee})});const H=h.pipe(D($),L(Y=>Y.highlightTarget),K()),ie=G({graphicGSelection:R,graphicData:W,zeroY:v,groupLabels:T,params:u,chartParams:h,highlightTarget:H,barWidth:E,transformedBarRadius:k,delayGroup:C,transitionItem:F,isSeriesSeprate:y}).pipe(D($),z(async Y=>Y),L(Y=>hB({graphicGSelection:Y.graphicGSelection,rectClassName:A,barData:Y.graphicData,zeroY:Y.zeroY,groupLabels:Y.groupLabels,params:Y.params,chartParams:Y.chartParams,barWidth:Y.barWidth,transformedBarRadius:Y.transformedBarRadius,delayGroup:Y.delayGroup,transitionItem:Y.transitionItem,isSeriesSeprate:Y.isSeriesSeprate})));return G({barSelection:ie,computedData:n,highlightTarget:H,SeriesDataMap:s,GroupDataMap:l}).subscribe(Y=>{Y.barSelection.on("mouseover",(ee,V)=>{ee.stopPropagation(),x.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:Y.highlightTarget,datum:V,gridIndex:V.gridIndex,series:Y.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:Y.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:ee,data:Y.computedData})}).on("mousemove",(ee,V)=>{ee.stopPropagation(),x.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:Y.highlightTarget,datum:V,gridIndex:V.gridIndex,series:Y.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:Y.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:ee,data:Y.computedData})}).on("mouseout",(ee,V)=>{ee.stopPropagation(),x.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:Y.highlightTarget,datum:V,gridIndex:V.gridIndex,series:Y.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:Y.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:ee,data:Y.computedData})}).on("click",(ee,V)=>{ee.stopPropagation(),x.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:Y.highlightTarget,datum:V,gridIndex:V.gridIndex,series:Y.SeriesDataMap.get(V.seriesLabel),seriesIndex:V.seriesIndex,seriesLabel:V.seriesLabel,group:Y.GroupDataMap.get(V.groupLabel),groupIndex:V.groupIndex,groupLabel:V.groupLabel,event:ee,data:Y.computedData})})}),G({barSelection:ie,highlight:m.pipe(L(Y=>Y.map(ee=>ee.id))),fullChartParams:h}).pipe(D($),z(async Y=>Y)).subscribe(Y=>{dB({selection:Y.barSelection,ids:Y.highlight,fullChartParams:Y.fullChartParams})}),()=>{$.next(void 0)}},Fv="StackedBars",gB=lt({name:Fv,defaultParams:dd,layerIndex:5,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=Nv(Fv,{selection:e,computedData$:r.computedData$,computedAxesData$:r.computedAxesData$,visibleComputedData$:r.visibleComputedData$,visibleComputedAxesData$:r.visibleComputedAxesData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:r.fullDataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}}),zv=.3;function Ov({axisWidth:e,groupAmount:t,barAmountOfGroup:n,barPadding:r=0,barGroupPadding:i=0}){const a=((t>1?e/(t-1):e)-i)/n-r;return a>1?a:1}function mB(e,t,n){const r=e/2,i=e*t.length+n.barPadding*t.length;return Hh().domain(t).range([-i/2+r,i/2-r])}function yB(e,t){return e<=1?0:t/(e-1)*zv}function bB(e,t){return e<=1?t:t*(1-zv)}function xB({graphicGSelection:e,pathGClassName:t,pathClassName:n,visibleComputedAxesData:r,linearGradientIds:i,zeroYArr:o,groupLabels:a,barScale:s,params:l,chartParams:u,barWidth:c,delayGroup:h,transitionItem:f,isSeriesSeprate:p}){const d=c/2;return e.each((m,b,y)=>{j(y[b]).selectAll(`g.${t}`).data(r[b]??[]).join($=>{const S=$.append("g").classed(t,!0).attr("cursor","pointer");return S.append("path").classed(n,!0).style("vector-effect","non-scaling-stroke").attr("d",A=>{const _=-d,P=o[b],M=o[b];return`M${_},${P} L${_+c/2},${M} ${_+c},${P}`}),S},$=>$,$=>$.remove()).attr("transform",$=>`translate(${p?0:s($.seriesLabel)}, 0)`).select(`path.${n}`).attr("height",$=>Math.abs($.axisYFromZero)||1).attr("y",$=>$.axisY<o[b]?$.axisY:o[b]).attr("x",$=>p?0:s($.seriesLabel)).style("fill",$=>`url(#${i[$.seriesIndex]})`).attr("stroke",$=>$.color).attr("transform",$=>`translate(${$?$.axisX:0}, 0)`).transition().duration(f).ease(pa(u.transitionEase)).delay(($,S)=>$.groupIndex*h).attr("d",$=>{const S=-d,A=o[b],_=$.axisY;return`M${S},${A} L${S+c/2},${_} ${S+c},${A}`})}),e.selectAll(`path.${n}`)}function $B({defsSelection:e,computedData:t,linearGradientIds:n,params:r}){e.selectAll("linearGradient").data(t??[]).join(i=>i.append("linearGradient").attr("x1","0%").attr("x2","0%").attr("y1","100%").attr("y2","0%").attr("spreadMethod","pad"),i=>i,i=>i.remove()).attr("id",(i,o)=>i[0]?n[i[0].seriesIndex]:"").html((i,o)=>{const a=i[0]?i[0].color:"";return`
|
52
59
|
<stop offset="0%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[0]}"/>
|
53
60
|
<stop offset="100%" stop-color="${a}" stop-opacity="${r.linearGradientOpacity[1]}"/>
|
54
|
-
`})}function qI({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function ZI({selection:t,ids:e,fullChartParams:n}){t.interrupt("highlight");const r=()=>{t.transition("highlight").duration(200).style("opacity",1)};if(!e.length){r();return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1):V(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const w$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:l,GroupDataMap$:u,fullParams$:c,fullChartParams$:f,gridAxesTransform$:h,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,isSeriesSeprate$:y,event$:b})=>{const v=new J,x=Pe(t,"clipPath-box"),_=Z(t,"pathG"),A=Z(t,"path"),{seriesSelection$:S,axesSelection$:P,defsSelection$:C,graphicGSelection$:B}=Tr({selection:e,pluginName:t,clipPathID:x,seriesLabels$:s,gridContainerPosition$:g,gridAxesTransform$:h,gridGraphicTransform$:p});p.pipe(L(v),R(E=>-E.translate[1]/E.scale[1]));const $=o.pipe(R(E=>E.map(O=>O[0]?O[0].axisY-O[0].axisYFromZero:0)),tt()),k=W({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:y}).pipe(L(v),G(async E=>E),R(E=>E.params.barWidth?E.params.barWidth:E.isSeriesSeprate?S$({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:1,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}):S$({axisWidth:E.gridAxesSize.width,groupAmount:E.computedData[0]?E.computedData[0].length:0,barAmountOfGroup:E.visibleComputedData.length,barPadding:E.params.barPadding,barGroupPadding:E.params.barGroupPadding}))),M=i.pipe(L(v),R(E=>{const O=new Set;return E.forEach(j=>{j.forEach(it=>{O.add(it.groupLabel)})}),Array.from(O)})),T=new dt(E=>{W({seriesLabels:s,barWidth:k,params:c}).pipe(L(v),G(async O=>O)).subscribe(O=>{const j=XI(O.barWidth,O.seriesLabels,O.params);E.next(j)})}),w=f.pipe(L(v),R(E=>E.transitionDuration),tt()),D=new dt(E=>{W({groupLabels:M,transitionDuration:w}).pipe(G(async O=>O)).subscribe(O=>{const j=VI(O.groupLabels.length,O.transitionDuration);E.next(j)})}).pipe(L(v),tt()),F=new dt(E=>{W({groupLabels:M,transitionDuration:w}).pipe(G(async O=>O)).subscribe(O=>{const j=UI(O.groupLabels.length,O.transitionDuration);E.next(j)})}).pipe(L(v),tt());W({defsSelection:C,gridAxesSize:d}).pipe(L(v),G(async E=>E)).subscribe(E=>{const O=[{id:x,width:E.gridAxesSize.width,height:E.gridAxesSize.height}];qI({defsSelection:E.defsSelection,clipPathData:O})});const z=f.pipe(L(v),R(E=>E.highlightTarget),tt()),I=s.pipe(L(v),R(E=>E.map((O,j)=>Pe(t,`lineargradient-${O}`)))),N=W({graphicGSelection:B,defsSelection:C,computedData:n,visibleComputedLayoutData:o,linearGradientIds:I,zeroYArr:$,groupLabels:M,barScale:T,params:c,chartParams:f,barWidth:k,delayGroup:D,transitionItem:F,isSeriesSeprate:y}).pipe(L(v),G(async E=>E),R(E=>(jI({defsSelection:E.defsSelection,computedData:E.computedData,linearGradientIds:E.linearGradientIds,params:E.params}),HI({graphicGSelection:E.graphicGSelection,pathGClassName:_,pathClassName:A,visibleComputedLayoutData:E.visibleComputedLayoutData,linearGradientIds:E.linearGradientIds,zeroYArr:E.zeroYArr,groupLabels:E.groupLabels,barScale:E.barScale,params:E.params,chartParams:E.chartParams,barWidth:E.barWidth,delayGroup:E.delayGroup,transitionItem:E.transitionItem,isSeriesSeprate:E.isSeriesSeprate}))));return W({barSelection:N,computedData:n,highlightTarget:z,SeriesDataMap:l,GroupDataMap:u}).subscribe(E=>{E.barSelection.on("mouseover",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})}).on("mousemove",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})}).on("mouseout",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})}).on("click",(O,j)=>{O.stopPropagation(),b.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:E.highlightTarget,datum:j,gridIndex:j.gridIndex,series:E.SeriesDataMap.get(j.seriesLabel),seriesIndex:j.seriesIndex,seriesLabel:j.seriesLabel,group:E.GroupDataMap.get(j.groupLabel),groupIndex:j.groupIndex,groupLabel:j.groupLabel,event:O,data:E.computedData})})}),W({barSelection:N,highlight:m.pipe(R(E=>E.map(O=>O.id))),fullChartParams:f}).pipe(L(v),G(async E=>E)).subscribe(E=>{ZI({selection:E.barSelection,ids:E.highlight,fullChartParams:E.fullChartParams})}),()=>{v.next(void 0)}},T$="BarsTriangle",KI=se({name:T$,defaultParams:id,layerIndex:5,validator:(t,{validateColumns:e})=>e(t,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=w$(T$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function QI({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let l=0;return t.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,m)=>{V(m[d]).selectAll("circle").data([p]).join(g=>g.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,b)=>d*l).attr("opacity",1),g=>g.transition().duration(50).attr("opacity",1),g=>g.remove()).attr("r",i.radius).attr("fill",(g,y)=>St({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>St({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function JI({selection:t,ids:e,onlyShowHighlighted:n,fullChartParams:r}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}t.each((i,o,a)=>{e.includes(i.id)?V(a[o]).style("opacity",1).transition("highlight").duration(200):V(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function tB({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const A$=(t,{selection:e,computedData$:n,computedLayoutData$:r,visibleComputedData$:i,visibleComputedLayoutData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullChartParams$:c,gridAxesTransform$:f,gridGraphicTransform$:h,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:m,gridContainerPosition$:g,event$:y})=>{const b=new J,v=Pe(t,"clipPath-box"),x=Z(t,"circleG"),_=Z(t,"circle"),{seriesSelection$:A,axesSelection$:S,defsSelection$:P,graphicGSelection$:C}=Tr({selection:e,pluginName:t,clipPathID:v,seriesLabels$:a,gridContainerPosition$:g,gridAxesTransform$:f,gridGraphicTransform$:h}),B=W({computedData:n,gridGraphicReverseScale:p}).pipe(L(b),G(async T=>T),R(T=>T.computedData.map((w,D)=>T.gridGraphicReverseScale[D])));W({defsSelection:P,gridAxesSize:d}).pipe(L(b),G(async T=>T)).subscribe(T=>{const w=[{id:v,width:T.gridAxesSize.width,height:T.gridAxesSize.height}];tB({defsSelection:T.defsSelection,clipPathData:w})});const $=c.pipe(L(b),R(T=>T.highlightTarget),tt()),k=W({graphicGSelection:C,visibleComputedLayoutData:o,graphicReverseScale:B,fullChartParams:c,fullParams:u}).pipe(L(b),G(async T=>T),R(T=>QI({graphicGSelection:T.graphicGSelection,circleGClassName:x,circleClassName:_,visibleComputedLayoutData:T.visibleComputedLayoutData,fullParams:T.fullParams,fullChartParams:T.fullChartParams,graphicReverseScale:T.graphicReverseScale})));W({graphicSelection:k,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:$}).pipe(L(b),G(async T=>T)).subscribe(T=>{T.graphicSelection.on("mouseover",(w,D)=>{y.next({type:"grid",eventName:"mouseover",pluginName:t,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w,data:T.computedData})}).on("mousemove",(w,D)=>{y.next({type:"grid",eventName:"mousemove",pluginName:t,highlightTarget:T.highlightTarget,data:T.computedData,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w})}).on("mouseout",(w,D)=>{y.next({type:"grid",eventName:"mouseout",pluginName:t,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w,data:T.computedData})}).on("click",(w,D)=>{y.next({type:"grid",eventName:"click",pluginName:t,highlightTarget:T.highlightTarget,datum:D,gridIndex:D.gridIndex,series:T.SeriesDataMap.get(D.seriesLabel),seriesIndex:D.seriesIndex,seriesLabel:D.seriesLabel,group:T.GroupDataMap.get(D.groupLabel),groupIndex:D.groupIndex,groupLabel:D.groupLabel,event:w,data:T.computedData})})});const M=u.pipe(L(b),R(T=>T.onlyShowHighlighted),tt());return W({graphicSelection:k,highlight:m.pipe(R(T=>T.map(w=>w.id))),onlyShowHighlighted:M,fullChartParams:c}).pipe(L(b),G(async T=>T)).subscribe(T=>{JI({selection:T.graphicSelection,ids:T.highlight,onlyShowHighlighted:T.onlyShowHighlighted,fullChartParams:T.fullChartParams})}),()=>{b.next(void 0)}},P$="Dots",eB=se({name:P$,defaultParams:nd,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=A$(P$,{selection:t,computedData$:r.computedData$,computedLayoutData$:r.computedLayoutData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),nB=" - ",rB={listRectWidth:14,listRectHeight:14,listRectRadius:0};function D$(t,e){const n=t<e.colors[e.colorScheme].label.length?t:t%e.colors[e.colorScheme].label.length;return e.colors[e.colorScheme].label[n]}const Ei=(t,{rootSelection:e,legendLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=Z(t,"root-position"),l=Z(t,"legend-card"),u=Z(t,"legend-list"),c=Z(t,"legend-item"),f=new J,h=W({legendLabels:n,fullChartParams:o}).pipe(L(f),G(async $=>$),R($=>{const k=new Map;let M=0;return $.legendLabels.forEach((T,w)=>{if(!k.has(T)){const D=D$(M,$.fullChartParams);k.set(T,D),M++}}),k})),p=n.pipe(L(f),R($=>{const k=new Set;let M=[];return $.forEach(T=>{k.has(T)?M.push(!1):M.push(!0),k.add(T)}),M})),d=r.pipe(L(f),R($=>$.placement==="top"||$.placement==="top-start"||$.placement==="top-end"?"top":$.placement==="bottom"||$.placement==="bottom-start"||$.placement==="bottom-end"?"bottom":$.placement==="left"||$.placement==="left-start"||$.placement==="left-end"?"left":"right"),tt(($,k)=>$===k),pt(1)),m=r.pipe(L(f),R($=>$.placement==="top-start"||$.placement==="bottom-start"||$.placement==="left-start"||$.placement==="right-start"?"start":$.placement==="top-end"||$.placement==="bottom-end"||$.placement==="left-end"||$.placement==="right-end"?"end":($.placement==="top"||$.placement==="bottom"||$.placement==="left"||$.placement==="right","center")),tt(($,k)=>$===k),pt(1)),g=d.pipe(L(f),R($=>$==="bottom"||$==="top"?"row":"column"),tt(($,k)=>$===k),pt(1)),y=W({fullParams:r,position:d,layout:i}).pipe(L(f),G(async $=>$),R($=>{const k=$.fullParams.padding*2+$.fullParams.gap*2;return $.position==="bottom"||$.position==="top"?$.layout.rootWidth-k:$.layout.rootHeight-k})),v=W({layout:i,position:d,justify:m}).pipe(L(f),G(async $=>$),R($=>{let k=0,M=0;return $.position==="bottom"?(M=$.layout.rootHeight,$.justify==="start"?k=0:$.justify==="center"?k=$.layout.rootWidth/2:$.justify==="end"&&(k=$.layout.rootWidth)):$.position==="right"?(k=$.layout.rootWidth,$.justify==="start"?M=0:$.justify==="center"?M=$.layout.rootHeight/2:$.justify==="end"&&(M=$.layout.rootHeight)):$.position==="top"?(M=0,$.justify==="start"?k=0:$.justify==="center"?k=$.layout.rootWidth/2:$.justify==="end"&&(k=$.layout.rootWidth)):$.position==="left"&&(k=0,$.justify==="start"?M=0:$.justify==="center"?M=$.layout.rootHeight/2:$.justify==="end"&&(M=$.layout.rootHeight)),{x:k,y:M}})).pipe(L(f),R($=>e.selectAll(`g.${s}`).data([$]).join(k=>k.append("g").classed(s,!0).attr("transform",M=>`translate(${M.x}, ${M.y})`),k=>k.transition().attr("transform",M=>`translate(${M.x}, ${M.y})`),k=>k.remove()))),x=r.pipe(L(f),R($=>$.labelList[0]?$.labelList[0]:rB)),_=W({visibleList:p,fullParams:r,fullChartParams:o,legendLabels:n,lineDirection:g,lineMaxSize:y,defaultListStyle:x,SeriesLabelColorMap:h,textSizePx:a}).pipe(L(f),G(async $=>$),R($=>$.legendLabels.reduce((k,M,T)=>{if(!$.visibleList[T])return k;const w=M!==""?M:nB,D=ha(w,$.textSizePx),F=$.textSizePx*1.5+D,z=$.SeriesLabelColorMap.get(M),I=k[0]&&k[0][0]?k[k.length-1][k[k.length-1].length-1]:null,{translateX:N,translateY:E,lineIndex:O,itemIndex:j}=((Y,Q,X)=>{let K=0,q=0,nt=0,st=0;if(Y.lineDirection==="column"){let U=X?X.translateY+Y.textSizePx+Y.fullParams.gap:0;if(U+Y.textSizePx>Y.lineMaxSize){nt=X.lineIndex+1,st=0,q=0;const mt=Q[Q.length-1].reduce((ft,Et)=>Et.itemWidth>ft?Et.itemWidth:ft,0);K=X.translateX+mt+Y.fullParams.gap}else nt=X?X.lineIndex:0,st=X?X.itemIndex+1:0,q=U,K=X?X.translateX:0}else{let U=X?X.translateX+X.itemWidth+Y.fullParams.gap:0;U+F>Y.lineMaxSize?(nt=X.lineIndex+1,st=0,K=0):(nt=X?X.lineIndex:0,st=X?X.itemIndex+1:0,K=U),q=(Y.textSizePx+Y.fullParams.gap)*nt}return{translateX:K,translateY:q,lineIndex:nt,itemIndex:st}})($,k,I);k[O]||(k[O]=[]);const it=$.fullParams.labelList[j]?$.fullParams.labelList[j]:$.defaultListStyle;return k[O].push({id:w,seriesLabel:w,seriesIndex:T,lineIndex:O,itemIndex:j,text:w,itemWidth:F,translateX:N,translateY:E,color:z,listRectWidth:it.listRectWidth,listRectHeight:it.listRectHeight,listRectRadius:it.listRectRadius}),k},[])),pt(1)),A=W({fullParams:r,fullChartParams:o,lineDirection:g,lengendItems:_,textSizePx:a}).pipe(L(f),G(async $=>$),R($=>{const{width:k,height:M}=((T,w)=>{let D=0,F=0;if(!w.length||!w[0].length)return{width:D,height:F};const z=w[0][w[0].length-1];return T.lineDirection==="column"?(D=w.reduce((I,N)=>{const E=N.reduce((O,j)=>j.itemWidth>O?j.itemWidth:O,0);return I+E},0),D+=T.fullParams.gap*(w.length-1),F=z.translateY+T.textSizePx):(D=z.translateX+z.itemWidth,F=T.textSizePx*w.length+T.fullParams.gap*(w.length-1)),{width:D,height:F}})($,$.lengendItems);return{direction:$.lineDirection,width:k,height:M,translateX:$.fullParams.gap,translateY:$.fullParams.gap}}),pt(1)),S=W({fullParams:r,position:d,justify:m,lengendList:A}).pipe(L(f),G(async $=>$),R($=>{const k=$.lengendList.width+$.fullParams.gap*2,M=$.lengendList.height+$.fullParams.gap*2;let T=0,w=0;return $.position==="left"?$.justify==="start"?(T=$.fullParams.padding,w=$.fullParams.padding):$.justify==="center"?(T=$.fullParams.padding,w=-M/2):$.justify==="end"&&(T=$.fullParams.padding,w=-M-$.fullParams.padding):$.position==="right"?$.justify==="start"?(T=-k-$.fullParams.padding,w=$.fullParams.padding):$.justify==="center"?(T=-k-$.fullParams.padding,w=-M/2):$.justify==="end"&&(T=-k-$.fullParams.padding,w=-M-$.fullParams.padding):$.position==="top"?$.justify==="start"?(T=$.fullParams.padding,w=$.fullParams.padding):$.justify==="center"?(T=-k/2,w=$.fullParams.padding):$.justify==="end"&&(T=-k-$.fullParams.padding,w=$.fullParams.padding):$.justify==="start"?(T=$.fullParams.padding,w=-M-$.fullParams.padding):$.justify==="center"?(T=-k/2,w=-M-$.fullParams.padding):$.justify==="end"&&(T=-k-$.fullParams.padding,w=-M-$.fullParams.padding),{width:k,height:M,translateX:T,translateY:w}})),P=W({rootPositionSelection:v,fullParams:r,fullChartParams:o,legendCard:S}).pipe(L(f),G(async $=>$),R($=>$.rootPositionSelection.selectAll("g").data([$.legendCard]).join(k=>k.append("g").classed(l,!0).attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.transition().attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.remove()).each((k,M,T)=>{V(T[M]).selectAll("rect").data([k]).join("rect").attr("width",w=>w.width).attr("height",w=>w.height).attr("fill",bt($.fullParams.backgroundFill,$.fullChartParams)).attr("stroke",bt($.fullParams.backgroundStroke,$.fullChartParams))}))),C=W({lengendCardSelection:P,fullParams:r,lengendList:A}).pipe(L(f),G(async $=>$),R($=>$.lengendCardSelection.selectAll("g").data([$.lengendList]).join(k=>k.append("g").classed(u,!0).attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.transition().attr("transform",M=>`translate(${M.translateX}, ${M.translateY})`),k=>k.remove())));return W({lengendListSelection:C,fullParams:r,fullChartParams:o,lengendItems:_,textSizePx:a}).pipe(L(f),G(async $=>$),R($=>{const k=$.lengendItems[0]?$.lengendItems.flat():[];return $.lengendListSelection.selectAll(`g.${c}`).data(k).join(M=>M.append("g").classed(c,!0).attr("cursor","default"),M=>M,M=>M.remove()).attr("transform",(M,T)=>`translate(${M.translateX}, ${M.translateY})`).each((M,T,w)=>{const D=$.textSizePx/2,F=-M.listRectWidth/2,z=-M.listRectHeight/2;V(w[T]).selectAll("rect").data([M]).join("rect").attr("x",D).attr("y",D).attr("width",I=>I.listRectWidth).attr("height",I=>I.listRectHeight).attr("transform",I=>`translate(${F}, ${z})`).attr("fill",I=>I.color).attr("rx",I=>I.listRectRadius),V(w[T]).selectAll("text").data([M]).join(I=>I.append("text").attr("dominant-baseline","hanging"),I=>I,I=>I.remove()).attr("x",$.textSizePx*1.5).attr("font-size",$.fullChartParams.styles.textSize).attr("fill",I=>$.fullParams.textColorType==="label"?D$(I.seriesIndex,$.fullChartParams):bt($.fullParams.textColorType,$.fullChartParams)).text(I=>I.text)})})).subscribe(),()=>{e.select(`g.${s}`).remove(),f.next(void 0)}},C$="GridLegend",iB=se({name:C$,defaultParams:sd,layerIndex:ki,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.SeriesDataMap$.pipe(L(i),R(l=>Array.from(l.keys()))),a=n.fullParams$.pipe(L(i),R(l=>{const u=[{listRectWidth:l.listRectWidth,listRectHeight:l.listRectHeight,listRectRadius:l.listRectRadius}];return{...l,labelList:u}})),s=Ei(C$,{rootSelection:e,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}});function M$(t,{text:e,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(t==null||e==null){console.error("selection or text is not defined");return}n==null&&(n=t.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function l(p){var m;const d=document.createElement("canvas").getContext("2d");return((m=d==null?void 0:d.measureText(p))==null?void 0:m.width)??0}function u(p){const d=l(p.trim());return Math.sqrt(d*r)}function c(p,d){let m={width:0,text:""},g=1/0;const y=[];let b=" ";i&&(b="");for(let v=0,x=p.length;v<x;++v){const _=(m.text?m.text+b:"")+p[v],A=l(_);(g+A)/2<d?(m.width=g=A,m.text=_):(g=l(p[v]),m={width:g,text:p[v]},y.push(m))}return y}function f(p){let d=0;for(let m=0,g=p.length;m<g;++m){const y=(Math.abs(m-g/2+.5)+.5)*r,b=p[m].width/2;d=Math.max(d,Math.sqrt(b**2+y**2))}return d}function h(p,d){o>0&&(d=s(d,o));const m=a(d),g=u(d),y=c(m,g),b=f(y);let v=p.select("text");v.size()||(v=p.append("text")),v.attr("transform",`translate(0,0) scale(${n/b})`);const x=v.selectAll("tspan").data(y),_=x.enter().append("tspan").attr("x",0).merge(x).attr("y",(A,S)=>(S-y.length/2+.8)*r).text(A=>A.text);return x.exit().remove(),x.merge(_)}return h(t,e)}function wp(t,{textArr:e,textSizePx:n,groupAxisPosition:r}){t.text(null);const i=Number(t.attr("x"));let o=Number(t.attr("y"));r==="top"&&(o-=(e.length-1)*n),t.selectAll("tspan").data(e).join("tspan").attr("x",i).attr("y",(a,s)=>o+s*n).text(a=>a)}function L$(t,{textArr:e,textSizePx:n,quadrant:r}){t.selectAll("tspan").data(e).join("tspan").attr("x",0).attr("y",(i,o)=>r==1||r==2?-(e.length-1-o)*n:o*n).text(i=>i)}const oB=6;function aB(t,e){return t.map((n,r)=>{const i=wr(n,e),o=typeof i=="string"?i.split(`
|
55
|
-
`):[i];return{text:i,textArr:o}})}function sB({selection:t,groupingLabelClassName:e,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,textReverseTransform:s}){const l=n.tickPadding+n.labelOffset[0],u=n.tickPadding+n.labelOffset[1];let c=0,f=0;o.groupAxis.position==="bottom"?(f=u,o.valueAxis.position==="left"?c=l:o.valueAxis.position==="right"&&(c=-l)):o.groupAxis.position==="top"?(f=-u,o.valueAxis.position==="left"?c=l:o.valueAxis.position==="right"&&(c=-l)):o.groupAxis.position==="left"?(c=-l,o.valueAxis.position==="bottom"?f=-u:o.valueAxis.position==="top"&&(f=u)):o.groupAxis.position==="right"&&(c=l,o.valueAxis.position==="bottom"?f=-u:o.valueAxis.position==="top"&&(f=u)),t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((h,p,d)=>{V(d[p]).selectAll("text").data([h]).join(m=>m.append("text").style("font-weight","bold"),m=>m,m=>m.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",bt(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",f).text(m=>o.groupAxis.label)}).attr("transform",h=>`translate(${i.width}, 0)`)}function lB({selection:t,xAxisClassName:e,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,groupScaleDomain:l,groupLabelData:u,textReverseTransformWithRotate:c,textSizePx:f}){const h=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0),p=Math.floor(l[1])-Math.ceil(l[0])+1;let d=0,m=0;o.groupAxis.position==="left"?(d=0,m=-n.tickPadding):o.groupAxis.position==="right"?(d=0,m=n.tickPadding):o.groupAxis.position==="bottom"?(d=n.tickPadding,m=0):o.groupAxis.position==="top"&&(d=-n.tickPadding,m=-0);const g=Dc(s).scale(s).ticks(n.ticks==="all"||n.ticks>p?p:n.ticks).tickSize(n.tickFullLine==!0?i.height:-oB).tickSizeOuter(0).tickFormat(v=>{var x;return((x=u[v])==null?void 0:x.text)??""}).tickPadding(d),y=h.transition().duration(100).call(g).on("end",(v,x)=>{h.selectAll(".tick text").each((_,A,S)=>{var C;const P=((C=u[_])==null?void 0:C.textArr)??[];wp(V(S[A]),{textArr:P,textSizePx:f,groupAxisPosition:o.groupAxis.position})})});return y.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?bt(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),y.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?bt(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),h.selectAll("text").attr("font-size",a.styles.textSize).attr("fill",bt(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("x",m).style("transform",c).attr("dy",0),h}const k$=(t,{selection:e,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:l,gridContainerPosition$:u,isSeriesSeprate$:c,textSizePx$:f})=>{const h=new J,p=Z(t,"container"),d=Z(t,"xAxisG"),m=Z(t,"xAxis"),g=Z(t,"groupingLabel"),y=W({computedData:n.pipe(tt(($,k)=>$.length===k.length)),isSeriesSeprate:c}).pipe(L(h),G(async $=>$),R($=>$.isSeriesSeprate?$.computedData:[$.computedData[0]]),R(($,k)=>e.selectAll(`g.${p}`).data($,M=>M[0]?M[0].seriesIndex:k).join("g").classed(p,!0))),b=y.pipe(L(h),R(($,k)=>$.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:y,gridContainerPosition:u}).pipe(L(h),G(async $=>$)).subscribe($=>{$.containerSelection.attr("transform",(k,M)=>{const T=$.gridContainerPosition[M]??$.gridContainerPosition[0],w=T.translate,D=T.scale;return`translate(${w[0]}, ${w[1]}) scale(${D[0]}, ${D[1]})`})}),W({axisSelection:b,gridAxesTransform:a}).pipe(L(h),G(async $=>$)).subscribe($=>{$.axisSelection.style("transform",$.gridAxesTransform.value)});const v=W({gridAxesReverseTransform:s,gridContainerPosition:u}).pipe(L(h),G(async $=>$),R($=>{const k=`rotateX(${$.gridAxesReverseTransform.rotateX}deg) rotateY(${$.gridAxesReverseTransform.rotateY}deg)`,M=`rotate(${$.gridAxesReverseTransform.rotate}deg)`,T=`scale(${1/$.gridContainerPosition[0].scale[0]}, ${1/$.gridContainerPosition[0].scale[1]})`;return`${k} ${M} ${T}`}),tt()),x=W({textReverseTransform:v,fullParams:r}).pipe(L(h),G(async $=>$),R($=>`${$.textReverseTransform} rotate(${$.fullParams.tickTextRotate}deg)`)),_=W({fullDataFormatter:i,gridAxesSize:l,computedData:n}).pipe(L(h),G(async $=>$),R($=>{const k=$.computedData[0]?$.computedData[0].length-1:0,M=$.fullDataFormatter.groupAxis.scaleDomain[0]-$.fullDataFormatter.groupAxis.scalePadding,T=$.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?k+$.fullDataFormatter.groupAxis.scalePadding:$.fullDataFormatter.groupAxis.scaleDomain[1]+$.fullDataFormatter.groupAxis.scalePadding;return[M,T]}),pt(1)),A=W({groupScaleDomain:_,gridAxesSize:l}).pipe(L(h),G(async $=>$),R($=>xr().domain($.groupScaleDomain).range([0,$.gridAxesSize.width]))),S=n.pipe(R($=>($[0]??[]).map(k=>k.groupLabel))),P=W({fullDataFormatter:i,fullParams:r}).pipe(L(h),G(async $=>$),R($=>{let k="middle",M="hanging";return $.fullDataFormatter.groupAxis.position==="bottom"?(k=$.fullParams.tickTextRotate?"end":"middle",M="hanging"):$.fullDataFormatter.groupAxis.position==="top"?(k=$.fullParams.tickTextRotate?"start":"middle",M="auto"):$.fullDataFormatter.groupAxis.position==="left"?(k="end",M="middle"):$.fullDataFormatter.groupAxis.position==="right"&&(k="start",M="middle"),{textAnchor:k,dominantBaseline:M}})),C=i.pipe(L(h),R($=>{let k="start",M="hanging";return $.groupAxis.position==="bottom"?M="hanging":$.groupAxis.position==="top"?M="auto":$.groupAxis.position==="left"?k="end":$.groupAxis.position==="right"&&(k="start"),$.valueAxis.position==="left"?k="start":$.valueAxis.position==="right"?k="end":$.valueAxis.position==="bottom"?M="auto":$.valueAxis.position==="top"&&(M="hanging"),{textAnchor:k,dominantBaseline:M}})),B=W({groupLabels:S,fullParams:r}).pipe(L(h),G(async $=>$),R($=>aB($.groupLabels,$.fullParams.tickFormat)));return W({axisSelection:b,fullParams:r,tickTextAlign:P,axisLabelAlign:C,gridAxesSize:l,fullDataFormatter:i,chartParams:o,groupScale:A,groupScaleDomain:_,groupLabelData:B,textReverseTransform:v,textReverseTransformWithRotate:x,textSizePx:f}).pipe(L(h),G(async $=>$)).subscribe($=>{lB({selection:$.axisSelection,xAxisClassName:m,fullParams:$.fullParams,tickTextAlign:$.tickTextAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,groupScale:$.groupScale,groupScaleDomain:$.groupScaleDomain,groupLabelData:$.groupLabelData,textReverseTransformWithRotate:$.textReverseTransformWithRotate,textSizePx:$.textSizePx}),sB({selection:$.axisSelection,groupingLabelClassName:g,fullParams:$.fullParams,axisLabelAlign:$.axisLabelAlign,gridAxesSize:$.gridAxesSize,fullDataFormatter:$.fullDataFormatter,chartParams:$.chartParams,textReverseTransform:$.textReverseTransform})}),()=>{h.next(void 0)}},R$="GroupAxis",uB=se({name:R$,defaultParams:xu,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=k$(R$,{selection:t,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),o()}}),cB=6;function fB({selection:t,textClassName:e,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,textReverseTransform:s}){const l=n.tickPadding-n.labelOffset[0],u=n.tickPadding+n.labelOffset[1];let c=0,f=0;o.groupAxis.position==="bottom"?(f=-u,o.valueAxis.position==="left"?c=-l:o.valueAxis.position==="right"&&(c=l)):o.groupAxis.position==="top"?(f=u,o.valueAxis.position==="left"?c=-l:o.valueAxis.position==="right"&&(c=l)):o.groupAxis.position==="left"?(c=l,o.valueAxis.position==="bottom"?f=u:o.valueAxis.position==="top"&&(f=-u)):o.groupAxis.position==="right"&&(c=-l,o.valueAxis.position==="bottom"?f=u:o.valueAxis.position==="top"&&(f=-u)),t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((h,p,d)=>{V(d[p]).selectAll("text").data([h]).join(m=>m.append("text").style("font-weight","bold"),m=>m,m=>m.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",bt(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",f).text(m=>o.valueAxis.label)}).attr("transform",h=>`translate(0, ${i.height})`)}function hB({selection:t,yAxisClassName:e,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,textReverseTransformWithRotate:l,filteredMinMaxValue:u}){const c=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0);let f=0,h=0;o.valueAxis.position==="left"?(f=n.tickPadding,h=0):o.valueAxis.position==="right"?(f=-n.tickPadding,h=0):o.valueAxis.position==="bottom"?(f=0,h=n.tickPadding):o.valueAxis.position==="top"&&(f=0,h=-n.tickPadding);const p=Cc(s).scale(s).ticks(n.ticks).tickFormat(g=>wr(g,n.tickFormat)).tickSize(n.tickFullLine==!0?-i.width:cB).tickPadding(f),d=c.transition().duration(100).call(p);d.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?bt(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?bt(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges");const m=c.selectAll("text").attr("font-size",a.styles.textSize).style("color",bt(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("y",h).attr("dy",0);return m.style("transform",l),(o.valueAxis.position==="bottom"||o.valueAxis.position==="top")&&m.attr("dy",0),c}const Ii=(t,{selection:e,computedData$:n,filteredMinMaxValue$:r,fullParams$:i,fullDataFormatter$:o,fullChartParams$:a,gridAxesTransform$:s,gridAxesReverseTransform$:l,gridAxesSize$:u,gridContainerPosition$:c,isSeriesSeprate$:f})=>{const h=new J,p=Z(t,"container"),d=Z(t,"yAxisG"),m=Z(t,"yAxis"),g=Z(t,"text"),y=W({computedData:n.pipe(tt((P,C)=>P.length===C.length)),isSeriesSeprate:f}).pipe(L(h),G(async P=>P),R(P=>P.isSeriesSeprate?P.computedData:[P.computedData[0]]),R((P,C)=>e.selectAll(`g.${p}`).data(P,B=>B[0]?B[0].seriesIndex:C).join("g").classed(p,!0))),b=y.pipe(L(h),R((P,C)=>P.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));W({containerSelection:y,gridContainerPosition:c}).pipe(L(h),G(async P=>P)).subscribe(P=>{P.containerSelection.attr("transform",(C,B)=>{const $=P.gridContainerPosition[B]??P.gridContainerPosition[0],k=$.translate,M=$.scale;return`translate(${k[0]}, ${k[1]}) scale(${M[0]}, ${M[1]})`})}),W({axisSelection:b,gridAxesTransform:s}).pipe(L(h),G(async P=>P)).subscribe(P=>{P.axisSelection.style("transform",P.gridAxesTransform.value)});const v=W({gridAxesReverseTransform:l,gridContainerPosition:c}).pipe(L(h),G(async P=>P),R(P=>{const C=`rotateX(${P.gridAxesReverseTransform.rotateX}deg) rotateY(${P.gridAxesReverseTransform.rotateY}deg)`,B=`rotate(${P.gridAxesReverseTransform.rotate}deg)`,$=`scale(${1/P.gridContainerPosition[0].scale[0]}, ${1/P.gridContainerPosition[0].scale[1]})`;return`${C} ${B} ${$}`}),tt()),x=W({textReverseTransform:v,fullParams:i}).pipe(L(h),G(async P=>P),R(P=>`${P.textReverseTransform} rotate(${P.fullParams.tickTextRotate}deg)`)),_=new dt(P=>{W({fullDataFormatter:o,gridAxesSize:u,filteredMinMaxValue:r}).pipe(L(h),G(async C=>C)).subscribe(C=>{let B=C.filteredMinMaxValue[1],$=C.filteredMinMaxValue[0];B===$&&B===0&&(B=1);const k=ro({maxValue:B,minValue:$,axisWidth:C.gridAxesSize.height,scaleDomain:C.fullDataFormatter.valueAxis.scaleDomain,scaleRange:C.fullDataFormatter.valueAxis.scaleRange});P.next(k)})}),A=W({fullDataFormatter:o,fullParams:i}).pipe(L(h),G(async P=>P),R(P=>{let C="start",B="hanging";return P.fullDataFormatter.valueAxis.position==="left"?(C="end",B="middle"):P.fullDataFormatter.valueAxis.position==="right"?(C="start",B="middle"):P.fullDataFormatter.valueAxis.position==="bottom"?(C=P.fullParams.tickTextRotate?"end":"middle",B="hanging"):P.fullDataFormatter.valueAxis.position==="top"&&(C=P.fullParams.tickTextRotate?"start":"middle",B="auto"),{textAnchor:C,dominantBaseline:B}})),S=o.pipe(L(h),R(P=>{let C="start",B="hanging";return P.groupAxis.position==="bottom"?B="auto":P.groupAxis.position==="top"?B="hanging":P.groupAxis.position==="left"?C="start":P.groupAxis.position==="right"&&(C="end"),P.valueAxis.position==="left"?C="end":P.valueAxis.position==="right"?C="start":P.valueAxis.position==="bottom"?B="hanging":P.valueAxis.position==="top"&&(B="auto"),{textAnchor:C,dominantBaseline:B}}));return W({axisSelection:b,fullParams:i,tickTextAlign:A,axisLabelAlign:S,computedData:n,gridAxesSize:u,fullDataFormatter:o,fullChartParams:a,valueScale:_,textReverseTransform:v,textReverseTransformWithRotate:x,filteredMinMaxValue:r}).pipe(L(h),G(async P=>P)).subscribe(P=>{hB({selection:P.axisSelection,yAxisClassName:m,fullParams:P.fullParams,tickTextAlign:P.tickTextAlign,gridAxesSize:P.gridAxesSize,fullDataFormatter:P.fullDataFormatter,fullChartParams:P.fullChartParams,valueScale:P.valueScale,textReverseTransformWithRotate:P.textReverseTransformWithRotate,filteredMinMaxValue:P.filteredMinMaxValue}),fB({selection:P.axisSelection,textClassName:g,fullParams:P.fullParams,axisLabelAlign:P.axisLabelAlign,gridAxesSize:P.gridAxesSize,fullDataFormatter:P.fullDataFormatter,fullChartParams:P.fullChartParams,textReverseTransform:P.textReverseTransform})}),()=>{h.next(void 0)}},E$="ValueAxis",pB=se({name:E$,defaultParams:ya,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=Ii(E$,{selection:t,computedData$:n.computedData$,filteredMinMaxValue$:n.filteredMinMaxValue$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),I$="StackedValueAxis",dB=se({name:I$,defaultParams:od,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=Ii(I$,{selection:t,computedData$:n.computedStackedData$,filteredMinMaxValue$:n.filteredMinMaxValue$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}});function B$(t,e){const n=e.textSizePx*1.5,i=(t==null?[]:Array.isArray(t)?t:typeof t=="string"?t.split(`
|
56
|
-
`):[
|
61
|
+
`})}function vB({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function SB({selection:e,ids:t,fullChartParams:n}){e.interrupt("highlight");const r=()=>{e.transition("highlight").duration(200).style("opacity",1)};if(!t.length){r();return}e.each((i,o,a)=>{t.includes(i.id)?j(a[o]).style("opacity",1):j(a[o]).style("opacity",n.styles.unhighlightedOpacity)})}const Gv=(e,{selection:t,computedData$:n,computedAxesData$:r,visibleComputedData$:i,visibleComputedAxesData$:o,fullDataFormatter$:a,seriesLabels$:s,SeriesDataMap$:l,GroupDataMap$:u,fullParams$:c,fullChartParams$:h,gridAxesTransform$:f,gridGraphicTransform$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,isSeriesSeprate$:b,event$:y})=>{const x=new Q,$=it(e,"clipPath-box"),S=q(e,"pathG"),A=q(e,"path"),{seriesSelection$:_,axesSelection$:P,defsSelection$:M,graphicGSelection$:R}=Pr({selection:t,pluginName:e,clipPathID:$,seriesLabels$:s,gridContainerPosition$:m,gridAxesTransform$:f,gridGraphicTransform$:p});p.pipe(D(x),L(I=>-I.translate[1]/I.scale[1]));const v=o.pipe(L(I=>I.map(W=>W[0]?W[0].axisY-W[0].axisYFromZero:0)),K()),E=G({computedData:n,visibleComputedData:i,params:c,gridAxesSize:d,isSeriesSeprate:b}).pipe(D(x),z(async I=>I),L(I=>I.params.barWidth?I.params.barWidth:I.isSeriesSeprate?Ov({axisWidth:I.gridAxesSize.width,groupAmount:I.computedData[0]?I.computedData[0].length:0,barAmountOfGroup:1,barPadding:I.params.barPadding,barGroupPadding:I.params.barGroupPadding}):Ov({axisWidth:I.gridAxesSize.width,groupAmount:I.computedData[0]?I.computedData[0].length:0,barAmountOfGroup:I.visibleComputedData.length,barPadding:I.params.barPadding,barGroupPadding:I.params.barGroupPadding}))),k=i.pipe(D(x),L(I=>{const W=new Set;return I.forEach(H=>{H.forEach(ie=>{W.add(ie.groupLabel)})}),Array.from(W)})),T=new ge(I=>{G({seriesLabels:s,barWidth:E,params:c}).pipe(D(x),z(async W=>W)).subscribe(W=>{const H=mB(W.barWidth,W.seriesLabels,W.params);I.next(H)})}),w=h.pipe(D(x),L(I=>I.transitionDuration),K()),C=new ge(I=>{G({groupLabels:k,transitionDuration:w}).pipe(z(async W=>W)).subscribe(W=>{const H=yB(W.groupLabels.length,W.transitionDuration);I.next(H)})}).pipe(D(x),K()),F=new ge(I=>{G({groupLabels:k,transitionDuration:w}).pipe(z(async W=>W)).subscribe(W=>{const H=bB(W.groupLabels.length,W.transitionDuration);I.next(H)})}).pipe(D(x),K());G({defsSelection:M,gridAxesSize:d}).pipe(D(x),z(async I=>I)).subscribe(I=>{const W=[{id:$,width:I.gridAxesSize.width,height:I.gridAxesSize.height}];vB({defsSelection:I.defsSelection,clipPathData:W})});const O=h.pipe(D(x),L(I=>I.highlightTarget),K()),B=s.pipe(D(x),L(I=>I.map((W,H)=>it(e,`lineargradient-${W}`)))),N=G({graphicGSelection:R,defsSelection:M,computedData:n,visibleComputedAxesData:o,linearGradientIds:B,zeroYArr:v,groupLabels:k,barScale:T,params:c,chartParams:h,barWidth:E,delayGroup:C,transitionItem:F,isSeriesSeprate:b}).pipe(D(x),z(async I=>I),L(I=>($B({defsSelection:I.defsSelection,computedData:I.computedData,linearGradientIds:I.linearGradientIds,params:I.params}),xB({graphicGSelection:I.graphicGSelection,pathGClassName:S,pathClassName:A,visibleComputedAxesData:I.visibleComputedAxesData,linearGradientIds:I.linearGradientIds,zeroYArr:I.zeroYArr,groupLabels:I.groupLabels,barScale:I.barScale,params:I.params,chartParams:I.chartParams,barWidth:I.barWidth,delayGroup:I.delayGroup,transitionItem:I.transitionItem,isSeriesSeprate:I.isSeriesSeprate}))));return G({barSelection:N,computedData:n,highlightTarget:O,SeriesDataMap:l,GroupDataMap:u}).subscribe(I=>{I.barSelection.on("mouseover",(W,H)=>{W.stopPropagation(),y.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:I.highlightTarget,datum:H,gridIndex:H.gridIndex,series:I.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,group:I.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:W,data:I.computedData})}).on("mousemove",(W,H)=>{W.stopPropagation(),y.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:I.highlightTarget,datum:H,gridIndex:H.gridIndex,series:I.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,group:I.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:W,data:I.computedData})}).on("mouseout",(W,H)=>{W.stopPropagation(),y.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:I.highlightTarget,datum:H,gridIndex:H.gridIndex,series:I.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,group:I.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:W,data:I.computedData})}).on("click",(W,H)=>{W.stopPropagation(),y.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:I.highlightTarget,datum:H,gridIndex:H.gridIndex,series:I.SeriesDataMap.get(H.seriesLabel),seriesIndex:H.seriesIndex,seriesLabel:H.seriesLabel,group:I.GroupDataMap.get(H.groupLabel),groupIndex:H.groupIndex,groupLabel:H.groupLabel,event:W,data:I.computedData})})}),G({barSelection:N,highlight:g.pipe(L(I=>I.map(W=>W.id))),fullChartParams:h}).pipe(D(x),z(async I=>I)).subscribe(I=>{SB({selection:I.barSelection,ids:I.highlight,fullChartParams:I.fullChartParams})}),()=>{x.next(void 0)}},Wv="BarsTriangle",_B=lt({name:Wv,defaultParams:gd,layerIndex:5,validator:(e,{validateColumns:t})=>t(e,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=Gv(Wv,{selection:e,computedData$:r.computedData$,computedAxesData$:r.computedAxesData$,visibleComputedData$:r.visibleComputedData$,visibleComputedAxesData$:r.visibleComputedAxesData$,fullDataFormatter$:r.fullDataFormatter$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,isSeriesSeprate$:r.isSeriesSeprate$,event$:n.event$});return()=>{i.next(void 0),o()}});function wB({graphicGSelection:e,circleGClassName:t,circleClassName:n,visibleComputedAxesData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const h=c.size();return o.transitionDuration/h};let l=0;return e.each((c,h,f)=>{j(f[h]).selectAll("g").data(r[h],p=>p.id).join(p=>(l=s(p),p.append("g").classed(t,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{j(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((b,y)=>d*l).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,b)=>Se({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,b)=>Se({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),e.selectAll(`circle.${n}`)}function TB({selection:e,ids:t,onlyShowHighlighted:n,fullChartParams:r}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",n===!0?0:1);return}e.each((i,o,a)=>{t.includes(i.id)?j(a[o]).style("opacity",1).transition("highlight").duration(200):j(a[o]).style("opacity",n===!0?0:r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function AB({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const Yv=(e,{selection:t,computedData$:n,computedAxesData$:r,visibleComputedData$:i,visibleComputedAxesData$:o,seriesLabels$:a,SeriesDataMap$:s,GroupDataMap$:l,fullParams$:u,fullChartParams$:c,gridAxesTransform$:h,gridGraphicTransform$:f,gridGraphicReverseScale$:p,gridAxesSize$:d,gridHighlight$:g,gridContainerPosition$:m,event$:b})=>{const y=new Q,x=it(e,"clipPath-box"),$=q(e,"circleG"),S=q(e,"circle"),{seriesSelection$:A,axesSelection$:_,defsSelection$:P,graphicGSelection$:M}=Pr({selection:t,pluginName:e,clipPathID:x,seriesLabels$:a,gridContainerPosition$:m,gridAxesTransform$:h,gridGraphicTransform$:f}),R=G({computedData:n,gridGraphicReverseScale:p}).pipe(D(y),z(async T=>T),L(T=>T.computedData.map((w,C)=>T.gridGraphicReverseScale[C])));G({defsSelection:P,gridAxesSize:d}).pipe(D(y),z(async T=>T)).subscribe(T=>{const w=[{id:x,width:T.gridAxesSize.width,height:T.gridAxesSize.height}];AB({defsSelection:T.defsSelection,clipPathData:w})});const v=c.pipe(D(y),L(T=>T.highlightTarget),K()),E=G({graphicGSelection:M,visibleComputedAxesData:o,graphicReverseScale:R,fullChartParams:c,fullParams:u}).pipe(D(y),z(async T=>T),L(T=>wB({graphicGSelection:T.graphicGSelection,circleGClassName:$,circleClassName:S,visibleComputedAxesData:T.visibleComputedAxesData,fullParams:T.fullParams,fullChartParams:T.fullChartParams,graphicReverseScale:T.graphicReverseScale})));G({graphicSelection:E,computedData:n,SeriesDataMap:s,GroupDataMap:l,highlightTarget:v}).pipe(D(y),z(async T=>T)).subscribe(T=>{T.graphicSelection.on("mouseover",(w,C)=>{b.next({type:"grid",eventName:"mouseover",pluginName:e,highlightTarget:T.highlightTarget,datum:C,gridIndex:C.gridIndex,series:T.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,group:T.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:w,data:T.computedData})}).on("mousemove",(w,C)=>{b.next({type:"grid",eventName:"mousemove",pluginName:e,highlightTarget:T.highlightTarget,data:T.computedData,datum:C,gridIndex:C.gridIndex,series:T.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,group:T.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:w})}).on("mouseout",(w,C)=>{b.next({type:"grid",eventName:"mouseout",pluginName:e,highlightTarget:T.highlightTarget,datum:C,gridIndex:C.gridIndex,series:T.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,group:T.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:w,data:T.computedData})}).on("click",(w,C)=>{b.next({type:"grid",eventName:"click",pluginName:e,highlightTarget:T.highlightTarget,datum:C,gridIndex:C.gridIndex,series:T.SeriesDataMap.get(C.seriesLabel),seriesIndex:C.seriesIndex,seriesLabel:C.seriesLabel,group:T.GroupDataMap.get(C.groupLabel),groupIndex:C.groupIndex,groupLabel:C.groupLabel,event:w,data:T.computedData})})});const k=u.pipe(D(y),L(T=>T.onlyShowHighlighted),K());return G({graphicSelection:E,highlight:g.pipe(L(T=>T.map(w=>w.id))),onlyShowHighlighted:k,fullChartParams:c}).pipe(D(y),z(async T=>T)).subscribe(T=>{TB({selection:T.graphicSelection,ids:T.highlight,onlyShowHighlighted:T.onlyShowHighlighted,fullChartParams:T.fullChartParams})}),()=>{y.next(void 0)}},Vv="Dots",PB=lt({name:Vv,defaultParams:pd,layerIndex:gu,validator:(e,{validateColumns:t})=>t(e,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=Yv(Vv,{selection:e,computedData$:r.computedData$,computedAxesData$:r.computedAxesData$,visibleComputedData$:r.visibleComputedData$,visibleComputedAxesData$:r.visibleComputedAxesData$,seriesLabels$:r.seriesLabels$,SeriesDataMap$:r.SeriesDataMap$,GroupDataMap$:r.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:r.gridAxesTransform$,gridGraphicTransform$:r.gridGraphicTransform$,gridGraphicReverseScale$:r.gridGraphicReverseScale$,gridAxesSize$:r.gridAxesSize$,gridHighlight$:r.gridHighlight$,gridContainerPosition$:r.gridContainerPosition$,event$:n.event$});return()=>{i.next(void 0),o()}}),CB=" - ",DB={listRectWidth:14,listRectHeight:14,listRectRadius:0};function jv(e,t){const n=e<t.colors[t.colorScheme].label.length?e:e%t.colors[t.colorScheme].label.length;return t.colors[t.colorScheme].label[n]}const Bi=(e,{rootSelection:t,legendLabels$:n,fullParams$:r,layout$:i,fullChartParams$:o,textSizePx$:a})=>{const s=q(e,"root-position"),l=q(e,"legend-card"),u=q(e,"legend-list"),c=q(e,"legend-item"),h=new Q,f=G({legendLabels:n,fullChartParams:o}).pipe(D(h),z(async v=>v),L(v=>{const E=new Map;let k=0;return v.legendLabels.forEach((T,w)=>{if(!E.has(T)){const C=jv(k,v.fullChartParams);E.set(T,C),k++}}),E})),p=n.pipe(D(h),L(v=>{const E=new Set;let k=[];return v.forEach(T=>{E.has(T)?k.push(!1):k.push(!0),E.add(T)}),k})),d=r.pipe(D(h),L(v=>v.placement==="top"||v.placement==="top-start"||v.placement==="top-end"?"top":v.placement==="bottom"||v.placement==="bottom-start"||v.placement==="bottom-end"?"bottom":v.placement==="left"||v.placement==="left-start"||v.placement==="left-end"?"left":"right"),K((v,E)=>v===E),se(1)),g=r.pipe(D(h),L(v=>v.placement==="top-start"||v.placement==="bottom-start"||v.placement==="left-start"||v.placement==="right-start"?"start":v.placement==="top-end"||v.placement==="bottom-end"||v.placement==="left-end"||v.placement==="right-end"?"end":(v.placement==="top"||v.placement==="bottom"||v.placement==="left"||v.placement==="right","center")),K((v,E)=>v===E),se(1)),m=d.pipe(D(h),L(v=>v==="bottom"||v==="top"?"row":"column"),K((v,E)=>v===E),se(1)),b=G({fullParams:r,position:d,layout:i}).pipe(D(h),z(async v=>v),L(v=>{const E=v.fullParams.padding*2+v.fullParams.gap*2;return v.position==="bottom"||v.position==="top"?v.layout.rootWidth-E:v.layout.rootHeight-E})),x=G({layout:i,position:d,justify:g}).pipe(D(h),z(async v=>v),L(v=>{let E=0,k=0;return v.position==="bottom"?(k=v.layout.rootHeight,v.justify==="start"?E=0:v.justify==="center"?E=v.layout.rootWidth/2:v.justify==="end"&&(E=v.layout.rootWidth)):v.position==="right"?(E=v.layout.rootWidth,v.justify==="start"?k=0:v.justify==="center"?k=v.layout.rootHeight/2:v.justify==="end"&&(k=v.layout.rootHeight)):v.position==="top"?(k=0,v.justify==="start"?E=0:v.justify==="center"?E=v.layout.rootWidth/2:v.justify==="end"&&(E=v.layout.rootWidth)):v.position==="left"&&(E=0,v.justify==="start"?k=0:v.justify==="center"?k=v.layout.rootHeight/2:v.justify==="end"&&(k=v.layout.rootHeight)),{x:E,y:k}})).pipe(D(h),L(v=>t.selectAll(`g.${s}`).data([v]).join(E=>E.append("g").classed(s,!0).attr("transform",k=>`translate(${k.x}, ${k.y})`),E=>E.transition().attr("transform",k=>`translate(${k.x}, ${k.y})`),E=>E.remove()))),$=r.pipe(D(h),L(v=>v.labelList[0]?v.labelList[0]:DB)),S=G({visibleList:p,fullParams:r,fullChartParams:o,legendLabels:n,lineDirection:m,lineMaxSize:b,defaultListStyle:$,SeriesLabelColorMap:f,textSizePx:a}).pipe(D(h),z(async v=>v),L(v=>v.legendLabels.reduce((E,k,T)=>{if(!v.visibleList[T])return E;const w=k!==""?k:CB,C=da(w,v.textSizePx),F=v.textSizePx*1.5+C,O=v.SeriesLabelColorMap.get(k),B=E[0]&&E[0][0]?E[E.length-1][E[E.length-1].length-1]:null,{translateX:N,translateY:I,lineIndex:W,itemIndex:H}=((Y,ee,V)=>{let J=0,Z=0,ne=0,le=0;if(Y.lineDirection==="column"){let U=V?V.translateY+Y.textSizePx+Y.fullParams.gap:0;if(U+Y.textSizePx>Y.lineMaxSize){ne=V.lineIndex+1,le=0,Z=0;const me=ee[ee.length-1].reduce((he,Ee)=>Ee.itemWidth>he?Ee.itemWidth:he,0);J=V.translateX+me+Y.fullParams.gap}else ne=V?V.lineIndex:0,le=V?V.itemIndex+1:0,Z=U,J=V?V.translateX:0}else{let U=V?V.translateX+V.itemWidth+Y.fullParams.gap:0;U+F>Y.lineMaxSize?(ne=V.lineIndex+1,le=0,J=0):(ne=V?V.lineIndex:0,le=V?V.itemIndex+1:0,J=U),Z=(Y.textSizePx+Y.fullParams.gap)*ne}return{translateX:J,translateY:Z,lineIndex:ne,itemIndex:le}})(v,E,B);E[W]||(E[W]=[]);const ie=v.fullParams.labelList[H]?v.fullParams.labelList[H]:v.defaultListStyle;return E[W].push({id:w,seriesLabel:w,seriesIndex:T,lineIndex:W,itemIndex:H,text:w,itemWidth:F,translateX:N,translateY:I,color:O,listRectWidth:ie.listRectWidth,listRectHeight:ie.listRectHeight,listRectRadius:ie.listRectRadius}),E},[])),se(1)),A=G({fullParams:r,fullChartParams:o,lineDirection:m,lengendItems:S,textSizePx:a}).pipe(D(h),z(async v=>v),L(v=>{const{width:E,height:k}=((T,w)=>{let C=0,F=0;if(!w.length||!w[0].length)return{width:C,height:F};const O=w[0][w[0].length-1];return T.lineDirection==="column"?(C=w.reduce((B,N)=>{const I=N.reduce((W,H)=>H.itemWidth>W?H.itemWidth:W,0);return B+I},0),C+=T.fullParams.gap*(w.length-1),F=O.translateY+T.textSizePx):(C=O.translateX+O.itemWidth,F=T.textSizePx*w.length+T.fullParams.gap*(w.length-1)),{width:C,height:F}})(v,v.lengendItems);return{direction:v.lineDirection,width:E,height:k,translateX:v.fullParams.gap,translateY:v.fullParams.gap}}),se(1)),_=G({fullParams:r,position:d,justify:g,lengendList:A}).pipe(D(h),z(async v=>v),L(v=>{const E=v.lengendList.width+v.fullParams.gap*2,k=v.lengendList.height+v.fullParams.gap*2;let T=0,w=0;return v.position==="left"?v.justify==="start"?(T=v.fullParams.padding,w=v.fullParams.padding):v.justify==="center"?(T=v.fullParams.padding,w=-k/2):v.justify==="end"&&(T=v.fullParams.padding,w=-k-v.fullParams.padding):v.position==="right"?v.justify==="start"?(T=-E-v.fullParams.padding,w=v.fullParams.padding):v.justify==="center"?(T=-E-v.fullParams.padding,w=-k/2):v.justify==="end"&&(T=-E-v.fullParams.padding,w=-k-v.fullParams.padding):v.position==="top"?v.justify==="start"?(T=v.fullParams.padding,w=v.fullParams.padding):v.justify==="center"?(T=-E/2,w=v.fullParams.padding):v.justify==="end"&&(T=-E-v.fullParams.padding,w=v.fullParams.padding):v.justify==="start"?(T=v.fullParams.padding,w=-k-v.fullParams.padding):v.justify==="center"?(T=-E/2,w=-k-v.fullParams.padding):v.justify==="end"&&(T=-E-v.fullParams.padding,w=-k-v.fullParams.padding),{width:E,height:k,translateX:T,translateY:w}})),P=G({rootPositionSelection:x,fullParams:r,fullChartParams:o,legendCard:_}).pipe(D(h),z(async v=>v),L(v=>v.rootPositionSelection.selectAll("g").data([v.legendCard]).join(E=>E.append("g").classed(l,!0).attr("transform",k=>`translate(${k.translateX}, ${k.translateY})`),E=>E.transition().attr("transform",k=>`translate(${k.translateX}, ${k.translateY})`),E=>E.remove()).each((E,k,T)=>{j(T[k]).selectAll("rect").data([E]).join("rect").attr("width",w=>w.width).attr("height",w=>w.height).attr("fill",be(v.fullParams.backgroundFill,v.fullChartParams)).attr("stroke",be(v.fullParams.backgroundStroke,v.fullChartParams))}))),M=G({lengendCardSelection:P,fullParams:r,lengendList:A}).pipe(D(h),z(async v=>v),L(v=>v.lengendCardSelection.selectAll("g").data([v.lengendList]).join(E=>E.append("g").classed(u,!0).attr("transform",k=>`translate(${k.translateX}, ${k.translateY})`),E=>E.transition().attr("transform",k=>`translate(${k.translateX}, ${k.translateY})`),E=>E.remove())));return G({lengendListSelection:M,fullParams:r,fullChartParams:o,lengendItems:S,textSizePx:a}).pipe(D(h),z(async v=>v),L(v=>{const E=v.lengendItems[0]?v.lengendItems.flat():[];return v.lengendListSelection.selectAll(`g.${c}`).data(E).join(k=>k.append("g").classed(c,!0).attr("cursor","default"),k=>k,k=>k.remove()).attr("transform",(k,T)=>`translate(${k.translateX}, ${k.translateY})`).each((k,T,w)=>{const C=v.textSizePx/2,F=-k.listRectWidth/2,O=-k.listRectHeight/2;j(w[T]).selectAll("rect").data([k]).join("rect").attr("x",C).attr("y",C).attr("width",B=>B.listRectWidth).attr("height",B=>B.listRectHeight).attr("transform",B=>`translate(${F}, ${O})`).attr("fill",B=>B.color).attr("rx",B=>B.listRectRadius),j(w[T]).selectAll("text").data([k]).join(B=>B.append("text").attr("dominant-baseline","hanging"),B=>B,B=>B.remove()).attr("x",v.textSizePx*1.5).attr("font-size",v.fullChartParams.styles.textSize).attr("fill",B=>v.fullParams.textColorType==="label"?jv(B.seriesIndex,v.fullChartParams):be(v.fullParams.textColorType,v.fullChartParams)).text(B=>B.text)})})).subscribe(),()=>{t.select(`g.${s}`).remove(),h.next(void 0)}},Xv="GridLegend",MB=lt({name:Xv,defaultParams:bd,layerIndex:Ei,validator:(e,{validateColumns:t})=>t(e,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:e,rootSelection:t,observer:n,subject:r})=>{const i=new Q,o=n.fullParams$.pipe(D(i),L(s=>{const l=[{listRectWidth:s.listRectWidth,listRectHeight:s.listRectHeight,listRectRadius:s.listRectRadius}];return{...s,labelList:l}})),a=Bi(Xv,{rootSelection:t,legendLabels$:n.seriesLabels$,fullParams$:o,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),a()}});function Uv(e,{text:t,radius:n,lineHeight:r,isBreakAll:i=!1,limit:o=0}){if(e==null||t==null){console.error("selection or text is not defined");return}n==null&&(n=e.node().getBBox().width/2);function a(p){let d;return i?d=p.split(""):d=p.split(/\s+/g),d[d.length-1]||d.pop(),d[0]||d.shift(),d}function s(p,d){return p&&d&&p.length>d&&(p=p.substring(0,d)+"..."),p}function l(p){var g;const d=document.createElement("canvas").getContext("2d");return((g=d==null?void 0:d.measureText(p))==null?void 0:g.width)??0}function u(p){const d=l(p.trim());return Math.sqrt(d*r)}function c(p,d){let g={width:0,text:""},m=1/0;const b=[];let y=" ";i&&(y="");for(let x=0,$=p.length;x<$;++x){const S=(g.text?g.text+y:"")+p[x],A=l(S);(m+A)/2<d?(g.width=m=A,g.text=S):(m=l(p[x]),g={width:m,text:p[x]},b.push(g))}return b}function h(p){let d=0;for(let g=0,m=p.length;g<m;++g){const b=(Math.abs(g-m/2+.5)+.5)*r,y=p[g].width/2;d=Math.max(d,Math.sqrt(y**2+b**2))}return d}function f(p,d){o>0&&(d=s(d,o));const g=a(d),m=u(d),b=c(g,m),y=h(b);let x=p.select("text");x.size()||(x=p.append("text")),x.attr("transform",`translate(0,0) scale(${n/y})`);const $=x.selectAll("tspan").data(b),S=$.enter().append("tspan").attr("x",0).merge($).attr("y",(A,_)=>(_-b.length/2+.8)*r).text(A=>A.text);return $.exit().remove(),$.merge(S)}return f(e,t)}function Cp(e,{textArr:t,textSizePx:n,groupAxisPosition:r,isContainerRotated:i}){e.text(null);const o=Number(e.attr("x"));let a=Number(e.attr("y"));i&&r==="top"&&(a-=(t.length-1)*n),e.selectAll("tspan").data(t).join("tspan").attr("x",o).attr("y",(s,l)=>a+l*n).text(s=>s)}function Hv(e,{textArr:t,textSizePx:n,quadrant:r}){e.selectAll("tspan").data(t).join("tspan").attr("x",0).attr("y",(i,o)=>r==1||r==2?-(t.length-1-o)*n:o*n).text(i=>i)}const Dp=6;function LB(e,t){return e.map((n,r)=>{const i=On(n,t),o=typeof i=="string"?i.split(`
|
62
|
+
`):[i];return{text:i,textArr:o}})}function kB({selection:e,groupingLabelClassName:t,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,textReverseTransform:s}){const l=n.tickPadding+n.labelOffset[0],u=n.tickPadding+n.labelOffset[1];let c=0,h=0;o.groupAxis.position==="bottom"?(h=u,o.valueAxis.position==="left"?c=l:o.valueAxis.position==="right"&&(c=-l)):o.groupAxis.position==="top"?(h=-u,o.valueAxis.position==="left"?c=l:o.valueAxis.position==="right"&&(c=-l)):o.groupAxis.position==="left"?(c=-l,o.valueAxis.position==="bottom"?h=-u:o.valueAxis.position==="top"&&(h=u)):o.groupAxis.position==="right"&&(c=l,o.valueAxis.position==="bottom"?h=-u:o.valueAxis.position==="top"&&(h=u)),e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!0).each((f,p,d)=>{j(d[p]).selectAll("text").data([f]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",be(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",h).text(g=>o.groupAxis.label)}).attr("transform",f=>`translate(${i.width}, 0)`)}function RB({selection:e,xAxisClassName:t,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,chartParams:a,groupScale:s,groupScaleDomain:l,groupLabelData:u,textReverseTransformWithRotate:c,textSizePx:h}){const f=e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!0),p=Math.floor(l[1])-Math.ceil(l[0])+1;let d=0,g=0;o.groupAxis.position==="left"?(d=0,g=-n.tickPadding):o.groupAxis.position==="right"?(d=0,g=n.tickPadding):o.groupAxis.position==="bottom"?(n.tickFullLine==!0?d=-n.tickPadding:d=-n.tickPadding-Dp,g=0):o.groupAxis.position==="top"&&(n.tickFullLine==!0?d=n.tickPadding:d=n.tickPadding-Dp,g=-0);const m=Rc(s).scale(s).ticks(n.ticks==="all"||n.ticks>p?p:n.ticks).tickSize(n.tickFullLine==!0?-i.height:Dp).tickSizeOuter(0).tickFormat(x=>{var $;return(($=u[x])==null?void 0:$.text)??""}).tickPadding(d),b=f.transition().duration(100).ease(Zt).call(m).on("end",(x,$)=>{f.selectAll(".tick text").each((S,A,_)=>{var M;const P=((M=u[S])==null?void 0:M.textArr)??[];Cp(j(_[A]),{textArr:P,textSizePx:h,groupAxisPosition:o.groupAxis.position,isContainerRotated:!0})})});return b.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?be(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).style("vector-effect","non-scaling-stroke").attr("pointer-events","none"),b.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?be(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges"),f.selectAll("text").attr("font-size",a.styles.textSize).attr("fill",be(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("x",g).style("transform",c).attr("dy",0),f}const qv=(e,{selection:t,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,gridAxesTransform$:a,gridAxesReverseTransform$:s,gridAxesSize$:l,gridContainerPosition$:u,isSeriesSeprate$:c,textSizePx$:h})=>{const f=new Q,p=q(e,"container"),d=q(e,"xAxisG"),g=q(e,"xAxis"),m=q(e,"groupingLabel"),b=G({computedData:n.pipe(K((v,E)=>v.length===E.length)),isSeriesSeprate:c}).pipe(D(f),z(async v=>v),L(v=>v.isSeriesSeprate?v.computedData:[v.computedData[0]]),L((v,E)=>t.selectAll(`g.${p}`).data(v,k=>k[0]?k[0].seriesIndex:E).join("g").classed(p,!0))),y=b.pipe(D(f),L((v,E)=>v.selectAll(`g.${d}`).data([d]).join("g").classed(d,!0)));G({containerSelection:b,gridContainerPosition:u}).pipe(D(f),z(async v=>v)).subscribe(v=>{v.containerSelection.attr("transform",(E,k)=>{const T=v.gridContainerPosition[k]??v.gridContainerPosition[0],w=T.translate,C=T.scale;return`translate(${w[0]}, ${w[1]}) scale(${C[0]}, ${C[1]})`})}),G({axisSelection:y,gridAxesTransform:a}).pipe(D(f),z(async v=>v)).subscribe(v=>{v.axisSelection.style("transform",v.gridAxesTransform.value)});const x=G({gridAxesReverseTransform:s,gridContainerPosition:u}).pipe(D(f),z(async v=>v),L(v=>{const E=`rotateX(${v.gridAxesReverseTransform.rotateX}deg) rotateY(${v.gridAxesReverseTransform.rotateY}deg)`,k=`rotate(${v.gridAxesReverseTransform.rotate}deg)`,T=`scale(${1/v.gridContainerPosition[0].scale[0]}, ${1/v.gridContainerPosition[0].scale[1]})`;return`${E} ${k} ${T}`}),K()),$=G({textReverseTransform:x,fullParams:r}).pipe(D(f),z(async v=>v),L(v=>`${v.textReverseTransform} rotate(${v.fullParams.tickTextRotate}deg)`)),S=G({fullDataFormatter:i,gridAxesSize:l,computedData:n}).pipe(D(f),z(async v=>v),L(v=>{const E=v.computedData[0]?v.computedData[0].length-1:0,k=v.fullDataFormatter.groupAxis.scaleDomain[0]-v.fullDataFormatter.groupAxis.scalePadding,T=v.fullDataFormatter.groupAxis.scaleDomain[1]==="max"?E+v.fullDataFormatter.groupAxis.scalePadding:v.fullDataFormatter.groupAxis.scaleDomain[1]+v.fullDataFormatter.groupAxis.scalePadding;return[k,T]}),se(1)),A=G({groupScaleDomain:S,gridAxesSize:l}).pipe(D(f),z(async v=>v),L(v=>Sr().domain(v.groupScaleDomain).range([0,v.gridAxesSize.width]))),_=n.pipe(L(v=>(v[0]??[]).map(E=>E.groupLabel))),P=G({fullDataFormatter:i,fullParams:r}).pipe(D(f),z(async v=>v),L(v=>{let E="middle",k="hanging";return v.fullDataFormatter.groupAxis.position==="bottom"?(E=v.fullParams.tickTextRotate?"end":"middle",k="hanging"):v.fullDataFormatter.groupAxis.position==="top"?(E=v.fullParams.tickTextRotate?"start":"middle",k="auto"):v.fullDataFormatter.groupAxis.position==="left"?(E="end",k="middle"):v.fullDataFormatter.groupAxis.position==="right"&&(E="start",k="middle"),{textAnchor:E,dominantBaseline:k}})),M=i.pipe(D(f),L(v=>{let E="start",k="hanging";return v.groupAxis.position==="bottom"?k="hanging":v.groupAxis.position==="top"?k="auto":v.groupAxis.position==="left"?E="end":v.groupAxis.position==="right"&&(E="start"),v.valueAxis.position==="left"?E="start":v.valueAxis.position==="right"?E="end":v.valueAxis.position==="bottom"?k="auto":v.valueAxis.position==="top"&&(k="hanging"),{textAnchor:E,dominantBaseline:k}})),R=G({groupLabels:_,fullParams:r}).pipe(D(f),z(async v=>v),L(v=>LB(v.groupLabels,v.fullParams.tickFormat)));return G({axisSelection:y,fullParams:r,tickTextAlign:P,axisLabelAlign:M,gridAxesSize:l,fullDataFormatter:i,chartParams:o,groupScale:A,groupScaleDomain:S,groupLabelData:R,textReverseTransform:x,textReverseTransformWithRotate:$,textSizePx:h}).pipe(D(f),z(async v=>v)).subscribe(v=>{RB({selection:v.axisSelection,xAxisClassName:g,fullParams:v.fullParams,tickTextAlign:v.tickTextAlign,gridAxesSize:v.gridAxesSize,fullDataFormatter:v.fullDataFormatter,chartParams:v.chartParams,groupScale:v.groupScale,groupScaleDomain:v.groupScaleDomain,groupLabelData:v.groupLabelData,textReverseTransformWithRotate:v.textReverseTransformWithRotate,textSizePx:v.textSizePx}),kB({selection:v.axisSelection,groupingLabelClassName:m,fullParams:v.fullParams,axisLabelAlign:v.axisLabelAlign,gridAxesSize:v.gridAxesSize,fullDataFormatter:v.fullDataFormatter,chartParams:v.chartParams,textReverseTransform:v.textReverseTransform})}),()=>{f.next(void 0)}},Zv="GroupAxis",EB=lt({name:Zv,defaultParams:_u,layerIndex:zt,validator:(e,{validateColumns:t})=>t(e,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"}})})(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=qv(Zv,{selection:e,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),o()}}),IB=6;function BB({selection:e,textClassName:t,fullParams:n,axisLabelAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,textReverseTransform:s}){const l=n.tickPadding-n.labelOffset[0],u=n.tickPadding+n.labelOffset[1];let c=0,h=0;o.groupAxis.position==="bottom"?(h=-u,o.valueAxis.position==="left"?c=-l:o.valueAxis.position==="right"&&(c=l)):o.groupAxis.position==="top"?(h=u,o.valueAxis.position==="left"?c=-l:o.valueAxis.position==="right"&&(c=l)):o.groupAxis.position==="left"?(c=l,o.valueAxis.position==="bottom"?h=u:o.valueAxis.position==="top"&&(h=-u)):o.groupAxis.position==="right"&&(c=-l,o.valueAxis.position==="bottom"?h=u:o.valueAxis.position==="top"&&(h=-u)),e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!0).each((f,p,d)=>{j(d[p]).selectAll("text").data([f]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("font-size",a.styles.textSize).style("fill",be(n.labelColorType,a)).style("transform",s).attr("x",c).attr("y",h).text(g=>o.valueAxis.label)}).attr("transform",f=>`translate(0, ${i.height})`)}function NB({selection:e,yAxisClassName:t,fullParams:n,tickTextAlign:r,gridAxesSize:i,fullDataFormatter:o,fullChartParams:a,valueScale:s,textReverseTransformWithRotate:l,filteredMinMaxValue:u}){const c=e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!0);let h=0,f=0;o.valueAxis.position==="left"?(h=n.tickPadding,f=0):o.valueAxis.position==="right"?(h=-n.tickPadding,f=0):o.valueAxis.position==="bottom"?(h=0,f=n.tickPadding):o.valueAxis.position==="top"&&(h=0,f=-n.tickPadding);const p=Ec(s).scale(s).ticks(n.ticks).tickFormat(m=>On(m,n.tickFormat)).tickSize(n.tickFullLine==!0?-i.width:IB).tickPadding(h),d=c.transition().duration(100).ease(Zt).call(p);d.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?be(n.tickColorType,a):"none").style("stroke-dasharray",n.tickFullLineDasharray).style("vector-effect","non-scaling-stroke").attr("pointer-events","none"),d.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?be(n.axisLineColorType,a):"none").style("shape-rendering","crispEdges");const g=c.selectAll("text").attr("font-size",a.styles.textSize).style("color",be(n.tickTextColorType,a)).attr("text-anchor",r.textAnchor).attr("dominant-baseline",r.dominantBaseline).attr("y",f).attr("dy",0);return g.style("transform",l),(o.valueAxis.position==="bottom"||o.valueAxis.position==="top")&&g.attr("dy",0),c}const Ni=(e,{selection:t,computedData$:n,filteredMinMaxValue$:r,fullParams$:i,fullDataFormatter$:o,fullChartParams$:a,gridAxesSize$:s,gridAxesTransform$:l,gridAxesReverseTransform$:u,gridContainerPosition$:c,isSeriesSeprate$:h})=>{const f=new Q,p=q(e,"yAxisG"),d=q(e,"yAxis"),g=q(e,"text"),b=OI({selection:t,pluginName:e,computedData$:n,gridContainerPosition$:c,isSeriesSeprate$:h}).pipe(D(f),L((_,P)=>_.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));G({axisSelection:b,gridAxesTransform:l}).pipe(D(f),z(async _=>_)).subscribe(_=>{_.axisSelection.style("transform",_.gridAxesTransform.value)});const y=G({gridAxesReverseTransform:u,gridContainerPosition:c}).pipe(D(f),z(async _=>_),L(_=>{const P=`rotateX(${_.gridAxesReverseTransform.rotateX}deg) rotateY(${_.gridAxesReverseTransform.rotateY}deg)`,M=`rotate(${_.gridAxesReverseTransform.rotate}deg)`,R=`scale(${1/_.gridContainerPosition[0].scale[0]}, ${1/_.gridContainerPosition[0].scale[1]})`;return`${P} ${M} ${R}`}),K()),x=G({textReverseTransform:y,fullParams:i}).pipe(D(f),z(async _=>_),L(_=>`${_.textReverseTransform} rotate(${_.fullParams.tickTextRotate}deg)`)),$=new ge(_=>{G({fullDataFormatter:o,gridAxesSize:s,filteredMinMaxValue:r}).pipe(D(f),z(async P=>P)).subscribe(P=>{let M=P.filteredMinMaxValue[1],R=P.filteredMinMaxValue[0];M===R&&M===0&&(M=1);const v=xc({maxValue:M,minValue:R,axisWidth:P.gridAxesSize.height,scaleDomain:P.fullDataFormatter.valueAxis.scaleDomain,scaleRange:P.fullDataFormatter.valueAxis.scaleRange});_.next(v)})}),S=G({fullDataFormatter:o,fullParams:i}).pipe(D(f),z(async _=>_),L(_=>{let P="start",M="hanging";return _.fullDataFormatter.valueAxis.position==="left"?(P="end",M="middle"):_.fullDataFormatter.valueAxis.position==="right"?(P="start",M="middle"):_.fullDataFormatter.valueAxis.position==="bottom"?(P=_.fullParams.tickTextRotate?"end":"middle",M="hanging"):_.fullDataFormatter.valueAxis.position==="top"&&(P=_.fullParams.tickTextRotate?"start":"middle",M="auto"),{textAnchor:P,dominantBaseline:M}})),A=o.pipe(D(f),L(_=>{let P="start",M="hanging";return _.groupAxis.position==="bottom"?M="auto":_.groupAxis.position==="top"?M="hanging":_.groupAxis.position==="left"?P="start":_.groupAxis.position==="right"&&(P="end"),_.valueAxis.position==="left"?P="end":_.valueAxis.position==="right"?P="start":_.valueAxis.position==="bottom"?M="hanging":_.valueAxis.position==="top"&&(M="auto"),{textAnchor:P,dominantBaseline:M}}));return G({axisSelection:b,fullParams:i,tickTextAlign:S,axisLabelAlign:A,computedData:n,gridAxesSize:s,fullDataFormatter:o,fullChartParams:a,valueScale:$,textReverseTransform:y,textReverseTransformWithRotate:x,filteredMinMaxValue:r}).pipe(D(f),z(async _=>_)).subscribe(_=>{NB({selection:_.axisSelection,yAxisClassName:d,fullParams:_.fullParams,tickTextAlign:_.tickTextAlign,gridAxesSize:_.gridAxesSize,fullDataFormatter:_.fullDataFormatter,fullChartParams:_.fullChartParams,valueScale:_.valueScale,textReverseTransformWithRotate:_.textReverseTransformWithRotate,filteredMinMaxValue:_.filteredMinMaxValue}),BB({selection:_.axisSelection,textClassName:g,fullParams:_.fullParams,axisLabelAlign:_.axisLabelAlign,gridAxesSize:_.gridAxesSize,fullDataFormatter:_.fullDataFormatter,fullChartParams:_.fullChartParams,textReverseTransform:_.textReverseTransform})}),()=>{f.next(void 0)}},Kv="ValueAxis",FB=lt({name:Kv,defaultParams:Sa,layerIndex:zt,validator:(e,{validateColumns:t})=>t(e,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=Ni(Kv,{selection:e,computedData$:n.computedData$,filteredMinMaxValue$:n.filteredMinMaxValue$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}}),Qv="StackedValueAxis",zB=lt({name:Qv,defaultParams:md,layerIndex:zt,validator:(e,{validateColumns:t})=>t(e,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=Ni(Qv,{selection:e,computedData$:n.computedStackedData$,filteredMinMaxValue$:n.filteredMinMaxValue$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,gridAxesTransform$:n.gridAxesTransform$,gridAxesReverseTransform$:n.gridAxesReverseTransform$,gridAxesSize$:n.gridAxesSize$,gridContainerPosition$:n.gridContainerPosition$,isSeriesSeprate$:n.isSeriesSeprate$});return()=>{i.next(void 0),o()}});function Jv(e,t){const n=t.textSizePx*1.5,i=(e==null?[]:Array.isArray(e)?e:typeof e=="string"?e.split(`
|
63
|
+
`):[e]).filter(o=>o!="").map((o,a)=>`<tspan x="0" y="${a*n}">${o}</tspan>`).join("");return i?`<text font-size="${t.textSize}" fill="${t.textColor}" x="0" y="0" style="dominant-baseline:text-before-edge">
|
57
64
|
${i}
|
58
|
-
</text>`:""}function
|
59
|
-
`);return
|
60
|
-
`),s=a.reduce((c,
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
+
</text>`:""}function OB({rootSelection:e,pluginName:t,gClassName:n,boxClassName:r,rootWidth:i,rootHeight:o,svgString:a,tooltipStyle:s,event:l}){e.interrupt("fadeout");const u=5,c=a?[a]:[],h=a?[s]:[],p=e.selectAll(`g.${n}`).data(c).join(A=>A.append("g").classed(n,!0).attr("pointer-events","none"),A=>A,A=>A.style("opacity",0).remove()).attr("transform",()=>`translate(${l.offsetX}, ${l.offsetY})`).selectAll(`g.${r}`).data(h).join(A=>A.append("g").classed(q(t,"box"),!0)),d=p.selectAll("rect").data(h).join(A=>A.append("rect").attr("rx",u).attr("ry",u)).attr("fill",A=>A.backgroundColor).attr("stroke",A=>A.strokeColor).attr("opacity",A=>A.backgroundOpacity),g=p.selectAll("g").data(c).join(A=>A.append("g").classed(q(t,"content"),!0).attr("transform",()=>`translate(${s.padding}, ${s.padding})`));c.length&&FI(g,c[0]);const m=g!=null&&g.node()?_v(g):{width:0,height:0};d.attr("width",m.width+s.padding*2).attr("height",m.height+s.padding*2);const b=p!=null&&p.node()?_v(p):{width:0,height:0},y=i-b.width,x=o-b.height,$=l.offsetX+s.offset[0]>y?y-l.offsetX:s.offset[0],S=l.offsetY+s.offset[1]>x?x-l.offsetY:s.offset[1];p.attr("transform",A=>`translate(${$}, ${S})`),p.attr("transform",A=>`translate(${$}, ${S})`)}const Fi=(e,{rootSelection:t,fullParams$:n,fullChartParams$:r,layout$:i,event$:o})=>{const a=new Q,s=q(e,"g"),l=q(e,"box"),u=o.pipe(D(a),Ir(y=>y.eventName==="mouseover"||y.eventName==="mousemove")),c=o.pipe(D(a),Ir(y=>y.eventName==="mouseout")),h=wC(r),f=G({fullChartParams:r,fullParams:n,textSizePx:h}).pipe(D(a),z(async y=>y),L(y=>({backgroundColor:be(y.fullParams.backgroundColorType,y.fullChartParams),backgroundOpacity:y.fullParams.backgroundOpacity,strokeColor:be(y.fullParams.strokeColorType,y.fullChartParams),offset:y.fullParams.offset,padding:y.fullParams.padding,textSize:y.fullChartParams.styles.textSize,textSizePx:y.textSizePx,textColor:be(y.fullParams.textColorType,y.fullChartParams),seriesColors:y.fullChartParams.colors[y.fullChartParams.colorScheme].label}))),p=G({fullParams:n,tooltipStyle:f}).pipe(D(a),z(async y=>y),L(y=>x=>{const $=y.fullParams.renderFn(x,{utils:{toCurrency:zI,measureTextWidth:da},styles:y.tooltipStyle});if(typeof $=="string"){const S=$.trim();if(S.slice(0,1)==="<"&&S.slice(S.length-1,S.length)===">")return $;{const _=$.split(`
|
66
|
+
`);return Jv(_,y.tooltipStyle)}}else if(Array.isArray($))return Jv($,y.tooltipStyle);return""})),d=G({event:u,contentRenderFn:p}).pipe(D(a),z(async y=>y),L(y=>y.contentRenderFn(y.event))),g=c.pipe(D(a),L(y=>"")),m=Ou(d,g).pipe(D(a),K((y,x)=>y===x)),b=Ou(u,c).pipe(D(a),L(y=>y.event));return G({svgString:m,eventTooltip:b,layout:i,tooltipStyle:f}).pipe(D(a),z(async y=>y)).subscribe(y=>{OB({rootSelection:t,pluginName:e,gClassName:s,boxClassName:l,rootWidth:y.layout.rootWidth,rootHeight:y.layout.rootHeight,svgString:y.svgString,tooltipStyle:y.tooltipStyle,event:y.eventTooltip})}),()=>{a.next(void 0)}},e2="GridTooltip",GB=lt({name:e2,defaultParams:wu,layerIndex:Ii,validator:(e,{validateColumns:t})=>t(e,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=Fi(e2,{rootSelection:t,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),WB=lt({name:"GroupZoom",defaultParams:yd,layerIndex:Av,validator:(e,{validateColumns:t})=>({status:"success",columnName:"",expectToBe:""})})(({selection:e,rootSelection:t,name:n,observer:r,subject:i})=>{const o=new Q;let a={k:1,x:0,y:0};const s=r.computedData$.pipe(L(c=>c[0]?c[0].length-1:0),K()),l=r.fullDataFormatter$.pipe(L(c=>c.groupAxis),Xi()),u=G({initGroupAxis:l,groupMaxIndex:s,layout:r.layout$,axisSize:r.gridAxesSize$}).pipe(D(o),z(async c=>c),L(c=>{const h=c.initGroupAxis.scaleDomain[0]-c.initGroupAxis.scalePadding,f=c.initGroupAxis.scaleDomain[1]==="max"?c.groupMaxIndex+c.initGroupAxis.scalePadding:c.initGroupAxis.scaleDomain[1]+c.initGroupAxis.scalePadding;return xc({maxValue:c.groupMaxIndex,minValue:0,axisWidth:c.axisSize.width,scaleDomain:[h,f],scaleRange:[0,1]})}));return G({initGroupScale:u,fullDataFormatter:r.fullDataFormatter$,groupMaxIndex:s}).pipe(D(o),z(async c=>c)).subscribe(c=>{const f=c.initGroupScale.copy(),p=vn().on("zoom",function(g){const m=g.transform,b=$=>{const S=Math.round($);return Math.min(c.groupMaxIndex,Math.max(0,S))},y=c.fullDataFormatter.groupAxis.position==="bottom"||c.fullDataFormatter.groupAxis.position==="top"?m.rescaleX(f).domain().map(b):m.rescaleY(f).domain().map(b);y[0]<=0&&y[1]>=c.groupMaxIndex?m.k<a.k&&(m.k=a.k,m.x=a.x,m.y=a.y):y[1]-y[0]<=1&&m.k>a.k&&(m.k=a.k,m.x=a.x,m.y=a.y),a.k=m.k,a.x=m.x,a.y=m.y;const x={...c.fullDataFormatter,groupAxis:{...c.fullDataFormatter.groupAxis,scaleDomain:y}};i.dataFormatter$.next(x)});t.call(p)}),()=>{o.next(void 0),t.call(vn().on("zoom",null))}}),yu="GroupAux",Mp=q(yu,"label-box"),YB={name:yu,defaultParams:Su,layerIndex:Pv,validator:(e,{validateColumns:t})=>t(e,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]},labelRotate:{toBeTypes:["number"]}})};function VB({groupLabel:e,axisX:t,axisHeight:n,fullParams:r}){return r.showLine&&e?[{id:e,x1:t,x2:t,y1:0,y2:n}]:[]}function jB({groupLabel:e,axisX:t,fullParams:n,textSizePx:r,rowAmount:i}){const o=On(e,n.labelTextFormat),a=o.split(`
|
67
|
+
`),s=a.reduce((c,h)=>h.length>c.length?h:c,""),l=da(s,r),u=r*a.length;return n.showLabel&&e?[{id:e,x:t,y:-n.labelPadding*i,text:o,textArr:a,textWidth:l,textHeight:u}]:[]}function XB({selection:e,pluginName:t,lineData:n,fullParams:r,fullChartParams:i}){const o=q(t,"auxline");return e.selectAll(`line.${o}`).data(n).join(s=>s.append("line").classed(o,!0).style("stroke-width",1).style("pointer-events","none").style("vector-effect","non-scaling-stroke").attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),s=>s.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),s=>s.remove()).style("stroke",s=>be(r.lineColorType,i)).style("stroke-dasharray",r.lineDashArray??"none")}function UB(e){e.selectAll("line").data([]).exit().remove()}function HB({selection:e,labelData:t,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransformWithRotate:o,textSizePx:a}){return e.selectAll(`g.${Mp}`).data(t).join(l=>l.append("g").classed(Mp,!0).style("cursor","pointer").attr("transform",(u,c)=>`translate(${u.x}, ${u.y})`),l=>l.transition().duration(50).attr("transform",(c,h)=>`translate(${c.x}, ${c.y})`),l=>l.remove()).each((l,u,c)=>{const h=l.textWidth+12,f=l.textHeight+6;let p=-h/2,d=-2,g=p,m=d-3;r.groupAxis.position==="bottom"?(p=n.labelRotate?-h+f:-h/2,d=2,g=p,m=d-3):r.groupAxis.position==="left"?(p=-h+2,d=-f/2,g=p,m=d-3,n.labelRotate&&(m+=f)):r.groupAxis.position==="right"?(p=-2,d=-f/2,g=p,m=d-3,n.labelRotate&&(m+=f)):r.groupAxis.position==="top"&&(p=n.labelRotate?-h+f:-h/2,d=-f+6,g=-f,m=d-3),j(c[u]).selectAll("rect").data([l]).join(b=>b.append("rect").style("cursor","pointer").attr("rx",5).attr("ry",5),b=>b,b=>b.remove()).attr("width",b=>`${h}px`).attr("height",`${f}px`).attr("fill",b=>be(n.labelColorType,i)).attr("x",g).attr("y",m).style("transform",o),j(c[u]).selectAll("text").data([l]).join(b=>b.append("text").style("dominant-baseline","hanging").style("cursor","pointer"),b=>b,b=>b.remove()).style("transform",o).attr("fill",b=>be(n.labelTextColorType,i)).attr("font-size",i.styles.textSize).attr("x",g+6).attr("y",m+3).each((b,y,x)=>{Cp(j(x[y]),{textArr:l.textArr,textSizePx:a,groupAxisPosition:r.groupAxis.position,isContainerRotated:!1})})})}function qB(e){e.selectAll(`g.${Mp}`).data([]).exit().remove()}const ZB=lt(YB)(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q;let a=!1;const s=t.insert("rect","g").classed(q(yu,"rect"),!0).attr("opacity",0),{seriesSelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:h}=Pr({selection:e,pluginName:yu,clipPathID:"test",seriesLabels$:i.isSeriesSeprate$.pipe(z(S=>Yn(()=>S,i.seriesLabels$,i.seriesLabels$.pipe(L(A=>[A[0]]))))),gridContainerPosition$:i.gridContainerPosition$,gridAxesTransform$:i.gridAxesTransform$,gridGraphicTransform$:i.gridGraphicTransform$});i.layout$.pipe(D(o)).subscribe(S=>{s.attr("width",S.rootWidth).attr("height",S.rootHeight)});const f=G({groupScaleDomainValue:i.groupScaleDomainValue$,gridAxesSize:i.gridAxesSize$}).pipe(D(o),z(async S=>S),L(S=>Sr().domain(S.groupScaleDomainValue).range([0,S.gridAxesSize.width]))),p=i.fullChartParams$.pipe(D(o),L(S=>S.highlightTarget),K()),d=ga(t,"mousemove").pipe(D(o)),g=G({gridAxesReverseTransform:i.gridAxesReverseTransform$,gridContainerPosition:i.gridContainerPosition$}).pipe(D(o),z(async S=>S),L(S=>{const A=`rotateX(${S.gridAxesReverseTransform.rotateX}deg) rotateY(${S.gridAxesReverseTransform.rotateY}deg)`,_=`rotate(${S.gridAxesReverseTransform.rotate}deg)`,P=`scale(${1/S.gridContainerPosition[0].scale[0]}, ${1/S.gridContainerPosition[0].scale[1]})`;return`${A} ${_} ${P}`}),K()),m=G({textReverseTransform:g,fullParams:i.fullParams$}).pipe(D(o),z(async S=>S),L(S=>`${S.textReverseTransform} rotate(${S.fullParams.labelRotate}deg)`)),b=i.gridContainerPosition$.pipe(D(o),L(S=>S.reduce((_,P)=>P.columnIndex>_?P.columnIndex:_,0)+1),K()),y=i.gridContainerPosition$.pipe(D(o),L(S=>S.reduce((_,P)=>P.rowIndex>_?P.rowIndex:_,0)+1),K()),x=GI({rootSelection:t,fullDataFormatter$:i.fullDataFormatter$,gridAxesSize$:i.gridAxesSize$,computedData$:i.computedData$,fullChartParams$:i.fullChartParams$,gridContainerPosition$:i.gridContainerPosition$,layout$:i.layout$}).pipe(D(o));G({axesSelection:u,columnAmount:b,rowAmount:y,layout:i.layout$,rootMousemove:d,gridGroupPosition:x,computedData:i.computedData$,groupScale:f,gridAxesSize:i.gridAxesSize$,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,highlightTarget:p,textReverseTransformWithRotate:m,GroupDataMap:i.GroupDataMap$,textSizePx:i.textSizePx$}).pipe(D(o),z(async S=>S)).subscribe(S=>{const{groupIndex:A,groupLabel:_}=S.gridGroupPosition,P=S.groupScale(A)??0,M=VB({groupLabel:_,axisX:P,axisHeight:S.gridAxesSize.height,fullParams:S.fullParams});XB({selection:S.axesSelection,pluginName:n,lineData:M,fullParams:S.fullParams,fullChartParams:S.fullChartParams});const R=jB({groupLabel:_,axisX:P,fullParams:S.fullParams,textSizePx:S.textSizePx,rowAmount:S.rowAmount});HB({selection:S.axesSelection,labelData:R,fullParams:S.fullParams,fullDataFormatter:S.fullDataFormatter,fullChartParams:S.fullChartParams,textReverseTransformWithRotate:S.textReverseTransformWithRotate,textSizePx:S.textSizePx}).on("mouseover",(E,k)=>{E.stopPropagation(),a=!0,r.event$.next({type:"grid",pluginName:n,eventName:"mouseover",highlightTarget:S.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",group:S.GroupDataMap.get(_)??[],groupIndex:A,groupLabel:_,event:E,data:S.computedData})}).on("mousemove",(E,k)=>{E.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"mousemove",highlightTarget:S.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",group:S.GroupDataMap.get(_)??[],groupIndex:A,groupLabel:_,event:E,data:S.computedData})}).on("mouseout",(E,k)=>{E.stopPropagation(),a=!1,r.event$.next({type:"grid",pluginName:n,eventName:"mouseout",highlightTarget:S.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",group:S.GroupDataMap.get(_)??[],groupIndex:A,groupLabel:_,event:E,data:S.computedData})}).on("click",(E,k)=>{E.stopPropagation(),r.event$.next({type:"grid",pluginName:n,eventName:"click",highlightTarget:S.highlightTarget,datum:null,gridIndex:0,series:[],seriesIndex:-1,seriesLabel:"",group:S.GroupDataMap.get(_)??[],groupIndex:A,groupLabel:_,event:E,data:S.computedData})})});const $=ga(s,"mouseout").pipe(D(o));return G({rootRectMouseout:$,axesSelection:u}).pipe(D(o),z(async S=>S)).subscribe(S=>{setTimeout(()=>{a!=!0&&(UB(S.axesSelection),qB(S.axesSelection))})}),()=>{o.next(void 0),s.remove()}}),t2={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,gridList:[{listRectWidth:14,listRectHeight:14,listRectRadius:0}],textColorType:"primary"},Lp={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!0,axisLineColorType:"primary",ticks:"all",tickFormat:e=>e,tickLineVisible:!0,tickPadding:20,tickFullLine:!1,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:[0]};Lp.tickFormat.toString=()=>"text => text";const ma={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary",gridIndexes:"all"};ma.tickFormat.toString=()=>`num => {
|
68
|
+
if (num === null || Number.isNaN(num) == true) {
|
69
|
+
return num || 0
|
70
|
+
}
|
71
|
+
var parts = num.toString().split('.')
|
72
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
73
|
+
return parts.join('.')
|
74
|
+
}`;const KB={...ma},n2={barWidth:0,barPadding:1,barGroupPadding:40,barRadius:!1,gridIndexes:[0]},r2={barWidth:0,barGroupPadding:10,barRadius:!1,gridIndexes:[0]},i2={barWidth:0,barPadding:1,barGroupPadding:20,linearGradientOpacity:[1,0],gridIndexes:[0]},o2={lineCurve:"curveLinear",lineWidth:2,gridIndexes:[1]},a2={lineCurve:"curveLinear",linearGradientOpacity:[1,0],gridIndexes:[1]},s2={radius:4,fillColorType:"background",strokeColorType:"label",strokeWidth:2,onlyShowHighlighted:!1,gridIndexes:[1]},kp={firstAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},secondAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:4,tickFormat:",.0f",tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextRotate:0,tickTextColorType:"primary"},gridIndexes:[0,1]},l2={...kp},Rp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(e,{styles:t,utils:n})=>{const r=t.textSizePx*.7,i=t.textSizePx/2-r/2,o=`<g><text dominant-baseline="hanging" font-size="${t.textSizePx}" fill="${t.textColor}">${e.groupLabel}</text></g>`,a=n.measureTextWidth(e.groupLabel,t.textSizePx),s=e.group.reduce((h,f)=>{const p=`${f.seriesLabel}${f.value}`,d=n.measureTextWidth(p,t.textSizePx);return d>h?d:h},0),u=Math.max(a,s)+t.textSizePx*3,c=e.group.map((h,f)=>{const p=f*t.textSizePx*1.5,d=h.id===(e.datum&&e.datum.id);return`<g transform="translate(0, ${t.textSizePx*2})">
|
75
|
+
<rect width="${r}" height="${r}" x="${i}" y="${p+i}" rx="${r/2}" fill="${h.color}"></rect>
|
76
|
+
<text x="${t.textSizePx*1.5}" y="${p}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
77
|
+
<tspan font-weight="${d?"bold":""}">${h.seriesLabel}</tspan>
|
78
|
+
<tspan font-weight="bold" text-anchor="end" x="${u}">${n.toCurrency(h.value)}</tspan>
|
65
79
|
</text>
|
66
80
|
</g>`}).join("");return`${o}
|
67
|
-
${c}`}};
|
81
|
+
${c}`}};Rp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
68
82
|
const bulletWidth = styles.textSizePx * 0.7
|
69
83
|
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
70
84
|
|
@@ -85,24 +99,25 @@ ${c}`}};Dp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
|
85
99
|
<rect width="\${bulletWidth}" height="\${bulletWidth}" x="\${offset}" y="\${y + offset}" rx="\${bulletWidth / 2}" fill="\${group.color}"></rect>
|
86
100
|
<text x="\${styles.textSizePx * 1.5}" y="\${y}" font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
87
101
|
<tspan font-weight="\${isHighlight ? 'bold' : ''}">\${group.seriesLabel}</tspan>
|
88
|
-
<tspan font-weight="bold" text-anchor="end" x="\${lineEndX}">\${group.value}</tspan>
|
102
|
+
<tspan font-weight="bold" text-anchor="end" x="\${lineEndX}">\${utils.toCurrency(group.value)}</tspan>
|
89
103
|
</text>
|
90
104
|
</g>\`
|
91
105
|
})
|
92
106
|
.join('')
|
93
107
|
return \`\${titleSvg}
|
94
108
|
\${contentSvg}\`
|
95
|
-
}`;const U$="MultiGridLegend",PB=de({name:U$,defaultParams:F$,layerIndex:ki,validator:(t,{validateColumns:e})=>{const n=e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},gridList:{toBeTypes:["object[]"]},textColorType:{toBeOption:"ColorType"}});if(t.gridList){const i=t.gridList.map((o,a)=>e(o,{listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]}})).find(o=>o.status==="error");if(i)return i}return n}})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.multiGridEachDetail$.pipe(L(i),R(u=>u.map((f,h)=>f.SeriesDataMap$.pipe(R(p=>Array.from(p.keys()))))),G(u=>W(u)),R(u=>u.flat())),a=W({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(L(i),G(async u=>u),R(u=>u.computedData.map((c,f)=>{const h=Fu(u.fullParams.gridList[f]??{},{listRectWidth:u.fullParams.listRectWidth,listRectHeight:u.fullParams.listRectHeight,listRectRadius:u.fullParams.listRectRadius});return c.map(p=>h)}).flat())),s=W({fullParams:n.fullParams$,seriesList:a}).pipe(L(i),G(async u=>u),R(u=>({...u.fullParams,labelList:u.seriesList}))),l=Ei(U$,{rootSelection:e,legendLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),l()}}),Fe=t=>{const e=t.fullParams$.pipe(R(n=>n.gridIndexes),tt(),pt(1));return W({multiGridEachDetail:t.multiGridEachDetail$,gridIndexes:e}).pipe(R(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Cp="MultiBars",H$=Z(Cp,"grid"),DB=de({name:Cp,defaultParams:z$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${H$}`).data(s).join("g").attr("class",H$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=Sp(Cp,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Mp="MultiStackedBar",j$=Z(Mp,"grid"),CB=de({name:Mp,defaultParams:O$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${j$}`).data(s).join("g").attr("class",j$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=v$(Mp,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Lp="MultiBarsTriangle",q$=Z(Lp,"grid"),MB=de({name:Lp,defaultParams:G$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${q$}`).data(s).join("g").attr("class",q$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=w$(Lp,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:l.dataFormatter$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),kp="MultiLines",Z$=Z(kp,"grid"),LB=de({name:kp,defaultParams:W$,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=[],s=i.multiGridContainerPosition$.pipe(L(o),R(u=>u.flat()));return Fe(i).pipe(L(o)).subscribe(u=>{a.forEach(c=>c()),t.selectAll(`g.${Z$}`).data(u).join("g").attr("class",Z$).each((c,f,h)=>{const p=V(h[f]);a[f]=l$(kp,{selection:p,computedData$:c.computedData$,computedLayoutData$:c.computedLayoutData$,visibleComputedData$:c.visibleComputedData$,visibleComputedLayoutData$:c.visibleComputedLayoutData$,seriesLabels$:c.seriesLabels$,SeriesDataMap$:c.SeriesDataMap$,GroupDataMap$:c.GroupDataMap$,fullDataFormatter$:c.dataFormatter$,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,gridAxesTransform$:c.gridAxesTransform$,gridGraphicTransform$:c.gridGraphicTransform$,gridAxesSize$:c.gridAxesSize$,gridHighlight$:c.gridHighlight$,gridContainerPosition$:c.gridContainerPosition$,allContainerPosition$:s,layout$:i.layout$,event$:r.event$})})}),()=>{o.next(void 0),a.forEach(u=>u())}}),Rp="MultiLineAreas",K$=Z(Rp,"grid"),kB=de({name:Rp,defaultParams:Y$,layerIndex:f$,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[],a=r.multiGridContainerPosition$.pipe(L(i),R(l=>l.flat()));return Fe(r).pipe(L(i)).subscribe(l=>{o.forEach(u=>u()),t.selectAll(`g.${K$}`).data(l).join("g").attr("class",K$).each((u,c,f)=>{const h=V(f[c]);o[c]=p$(Rp,{selection:h,computedData$:u.computedData$,computedLayoutData$:u.computedLayoutData$,visibleComputedData$:u.visibleComputedData$,visibleComputedLayoutData$:u.visibleComputedLayoutData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:u.gridHighlight$,gridContainerPosition$:u.gridContainerPosition$,allContainerPosition$:a,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),Ep="MultiDots",Q$=Z(Ep,"grid"),RB=de({name:Ep,defaultParams:X$,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${Q$}`).data(s).join("g").attr("class",Q$).each((l,u,c)=>{const f=V(c[u]);o[u]=A$(Ep,{selection:f,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedLayoutData$:l.computedLayoutData$,visibleComputedLayoutData$:l.visibleComputedLayoutData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:l.gridHighlight$,gridContainerPosition$:l.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ip="MultiGroupAxis",J$=Z(Ip,"grid"),EB=de({name:Ip,defaultParams:Ap,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${J$}`).data(s).join("g").attr("class",J$).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=k$(Ip,{selection:f,computedData$:l.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h,textSizePx$:r.textSizePx$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Bp="MultiValueAxis",t2=Z(Bp,"grid"),IB=de({name:Bp,defaultParams:pu,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${t2}`).data(s).join("g").attr("class",t2).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=Ii(Bp,{selection:f,computedData$:l.computedData$,filteredMinMaxValue$:l.filteredMinMaxValue$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),e2="MultiGridTooltip",BB=de({name:e2,defaultParams:Dp,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(e2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),Np="MultiStackedValueAxis",n2=Z(Np,"grid"),NB=de({name:Np,defaultParams:pu,layerIndex:bn,validator:(t,{validateColumns:e})=>e(t,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[];return Fe(r).pipe(L(i)).subscribe(s=>{o.forEach(l=>l()),t.selectAll(`g.${n2}`).data(s).join("g").attr("class",n2).each((l,u,c)=>{const f=V(c[u]),h=l.dataFormatter$.pipe(L(i),R(p=>p.separateSeries),tt(),pt(1));o[u]=Ii(Np,{selection:f,computedData$:l.computedStackedData$,filteredMinMaxValue$:l.filteredMinMaxValue$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:h})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Fp="OverlappingValueAxes",r2=Z(Fp,"grid"),FB=de({name:Fp,defaultParams:Pp,layerIndex:bn,validator:(t,{validateColumns:e})=>{const n=e(t,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(t.firstAxis){const r=e(t.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.secondAxis){const r=e(t.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[],a=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[1])),l=W({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(L(i),G(async c=>c),R(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h},container:{...c.fullDataFormatter.container}}}));return Sa(r).pipe(L(i),R(c=>({...c,fullParams$:c.fullParams$.pipe(R(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),G(c=>Fe(c)),R(c=>c.map((f,h)=>{if(h===0)return f;const p=d0({fullDataFormatter$:l,layout$:r.layout$}),d=g0({gridAxesTransform$:p}),m=p0({computedData$:f.computedData$,fullDataFormatter$:l,layout$:r.layout$});return{...f,dataFormatter$:l,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:m}}))).pipe(L(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${r2}`).data(c).join("g").attr("class",r2).each((f,h,p)=>{if(h>1)return;const d=V(p[h]);o[h]=Ii(Fp,{selection:d,computedData$:f.computedData$,filteredMinMaxValue$:f.filteredMinMaxValue$,fullParams$:r.fullParams$.pipe(R(m=>h===0?m.firstAxis:m.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),zp="OverlappingStackedValueAxes",i2=Z(zp,"grid"),zB=de({name:zp,defaultParams:V$,layerIndex:bn,validator:(t,{validateColumns:e})=>{const n=e(t,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(t.firstAxis){const r=e(t.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.secondAxis){const r=e(t.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=[],a=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(L(i),R(c=>c.gridIndexes[1])),l=W({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(L(i),G(async c=>c),R(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const f=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let h=f;return f==="left"?h="right":f==="bottom"?h="top":f==="top"?h="bottom":f==="right"&&(h="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:h},container:{...c.fullDataFormatter.container}}}));return Sa(r).pipe(L(i),R(c=>({...c,fullParams$:c.fullParams$.pipe(R(f=>(f.gridIndexes.length>2&&(f.gridIndexes.length=2),f)))})),G(c=>Fe(c)),R(c=>c.map((f,h)=>{if(h===0)return f;const p=d0({fullDataFormatter$:l,layout$:r.layout$}),d=g0({gridAxesTransform$:p}),m=p0({computedData$:f.computedData$,fullDataFormatter$:l,layout$:r.layout$});return{...f,dataFormatter$:l,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:m}}))).pipe(L(i)).subscribe(c=>{o.forEach(f=>f()),t.selectAll(`g.${i2}`).data(c).join("g").attr("class",i2).each((f,h,p)=>{if(h>1)return;const d=V(p[h]);o[h]=Ii(zp,{selection:d,computedData$:h===0?f.computedStackedData$:f.computedData$,filteredMinMaxValue$:f.filteredMinMaxValue$,fullParams$:r.fullParams$.pipe(R(m=>h===0?m.firstAxis:m.secondAxis)),fullDataFormatter$:f.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:f.gridAxesTransform$,gridAxesReverseTransform$:f.gridAxesReverseTransform$,gridAxesSize$:f.gridAxesSize$,gridContainerPosition$:f.gridContainerPosition$,isSeriesSeprate$:f.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),o2={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},Op={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(t,{styles:e,utils:n})=>{const r=t.categoryLabel!=="",i=t.datum.label.slice(0,11)!=="multiValue_",o=e.textSizePx*.7,a=e.textSizePx/2-o/2,s=r?`<rect width="${o}" height="${o}" x="${a}" y="${a-1}" rx="${o/2}" fill="${t.datum.color}"></rect>
|
96
|
-
<text x="${
|
97
|
-
<tspan>${
|
98
|
-
</text>`:"",
|
99
|
-
${
|
100
|
-
</text>`;return`${
|
101
|
-
<g ${r?`transform="translate(0, ${
|
102
|
-
${
|
103
|
-
</g>`}};
|
109
|
+
}`;const u2="MultiGridLegend",QB=mt({name:u2,defaultParams:t2,layerIndex:Ei,validator:(e,{validateColumns:t})=>{const n=t(e,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},gridList:{toBeTypes:["object[]"]},textColorType:{toBeOption:"ColorType"}});if(e.gridList){const i=e.gridList.map((o,a)=>t(o,{listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]}})).find(o=>o.status==="error");if(i)return i}return n}})(({selection:e,rootSelection:t,observer:n,subject:r})=>{const i=new Q,o=n.multiGridEachDetail$.pipe(L(u=>u.map(c=>c.seriesLabels$)),z(u=>G(u).pipe(z(async c=>c))),L(u=>u.flat())),a=G({fullParams:n.fullParams$,computedData:n.computedData$}).pipe(D(i),z(async u=>u),L(u=>u.computedData.map((c,h)=>{const f=Wu(u.fullParams.gridList[h]??{},{listRectWidth:u.fullParams.listRectWidth,listRectHeight:u.fullParams.listRectHeight,listRectRadius:u.fullParams.listRectRadius});return c.map(p=>f)}).flat())),s=G({fullParams:n.fullParams$,seriesList:a}).pipe(D(i),z(async u=>u),L(u=>({...u.fullParams,labelList:u.seriesList}))),l=Bi(u2,{rootSelection:t,legendLabels$:o,fullParams$:s,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),l()}}),Ot=e=>{const t=e.fullParams$.pipe(L(n=>n.gridIndexes),K(),se(1));return G({multiGridEachDetail:e.multiGridEachDetail$,gridIndexes:t}).pipe(z(async n=>n),L(n=>n.gridIndexes==="all"?n.multiGridEachDetail:n.gridIndexes.map(r=>n.multiGridEachDetail[r]??n.multiGridEachDetail[0])))},Ep="MultiBars",c2=q(Ep,"grid"),JB=mt({name:Ep,defaultParams:n2,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[];return Ot(r).pipe(D(i)).subscribe(s=>{o.forEach(l=>l()),e.selectAll(`g.${c2}`).data(s).join("g").attr("class",c2).each((l,u,c)=>{const h=j(c[u]),f=l.dataFormatter$.pipe(D(i),L(p=>p.separateSeries),K(),se(1));o[u]=Pp(Ep,{selection:h,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedAxesData$:l.computedAxesData$,visibleComputedAxesData$:l.visibleComputedAxesData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:r.multiGridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Ip="MultiStackedBars",f2=q(Ip,"grid"),eN=mt({name:Ip,defaultParams:r2,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[];return Ot(r).pipe(D(i)).subscribe(s=>{o.forEach(l=>l()),e.selectAll(`g.${f2}`).data(s).join("g").attr("class",f2).each((l,u,c)=>{const h=j(c[u]),f=l.dataFormatter$.pipe(D(i),L(p=>p.separateSeries),K(),se(1));o[u]=Nv(Ip,{selection:h,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedAxesData$:l.computedAxesData$,visibleComputedAxesData$:l.visibleComputedAxesData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:r.multiGridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Bp="MultiBarsTriangle",h2=q(Bp,"grid"),tN=mt({name:Bp,defaultParams:i2,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barGroupPadding:{toBeTypes:["number"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[];return Ot(r).pipe(D(i)).subscribe(s=>{o.forEach(l=>l()),e.selectAll(`g.${h2}`).data(s).join("g").attr("class",h2).each((l,u,c)=>{const h=j(c[u]),f=l.dataFormatter$.pipe(D(i),L(p=>p.separateSeries),K(),se(1));o[u]=Gv(Bp,{selection:h,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedAxesData$:l.computedAxesData$,visibleComputedAxesData$:l.visibleComputedAxesData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,fullDataFormatter$:l.dataFormatter$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:r.multiGridHighlight$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:f,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Np="MultiLines",p2=q(Np,"grid"),nN=mt({name:Np,defaultParams:o2,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},lineWidth:{toBeTypes:["number"]}})})(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=[],s=i.multiGridContainerPosition$.pipe(D(o),L(u=>u.flat()));return Ot(i).pipe(D(o)).subscribe(u=>{a.forEach(c=>c()),e.selectAll(`g.${p2}`).data(u).join("g").attr("class",p2).each((c,h,f)=>{const p=j(f[h]);a[h]=Tv(Np,{selection:p,computedData$:c.computedData$,computedAxesData$:c.computedAxesData$,visibleComputedData$:c.visibleComputedData$,visibleComputedAxesData$:c.visibleComputedAxesData$,seriesLabels$:c.seriesLabels$,SeriesDataMap$:c.SeriesDataMap$,GroupDataMap$:c.GroupDataMap$,fullDataFormatter$:c.dataFormatter$,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,gridAxesTransform$:c.gridAxesTransform$,gridGraphicTransform$:c.gridGraphicTransform$,gridAxesSize$:c.gridAxesSize$,gridHighlight$:i.multiGridHighlight$,gridContainerPosition$:c.gridContainerPosition$,allContainerPosition$:s,layout$:i.layout$,event$:r.event$})})}),()=>{o.next(void 0),a.forEach(u=>u())}}),Fp="MultiLineAreas",d2=q(Fp,"grid"),rN=mt({name:Fp,defaultParams:a2,layerIndex:Cv,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},lineCurve:{toBeTypes:["string"]},linearGradientOpacity:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[],a=r.multiGridContainerPosition$.pipe(D(i),L(l=>l.flat()));return Ot(r).pipe(D(i)).subscribe(l=>{o.forEach(u=>u()),e.selectAll(`g.${d2}`).data(l).join("g").attr("class",d2).each((u,c,h)=>{const f=j(h[c]);o[c]=Mv(Fp,{selection:f,computedData$:u.computedData$,computedAxesData$:u.computedAxesData$,visibleComputedData$:u.visibleComputedData$,visibleComputedAxesData$:u.visibleComputedAxesData$,seriesLabels$:u.seriesLabels$,SeriesDataMap$:u.SeriesDataMap$,GroupDataMap$:u.GroupDataMap$,fullDataFormatter$:u.dataFormatter$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:u.gridAxesTransform$,gridGraphicTransform$:u.gridGraphicTransform$,gridAxesSize$:u.gridAxesSize$,gridHighlight$:r.multiGridHighlight$,gridContainerPosition$:u.gridContainerPosition$,allContainerPosition$:a,layout$:r.layout$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(l=>l())}}),zp="MultiDots",g2=q(zp,"grid"),iN=mt({name:zp,defaultParams:s2,layerIndex:gu,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},onlyShowHighlighted:{toBeTypes:["boolean"]}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[];return Ot(r).pipe(D(i)).subscribe(s=>{o.forEach(l=>l()),e.selectAll(`g.${g2}`).data(s).join("g").attr("class",g2).each((l,u,c)=>{const h=j(c[u]);o[u]=Yv(zp,{selection:h,computedData$:l.computedData$,visibleComputedData$:l.visibleComputedData$,computedAxesData$:l.computedAxesData$,visibleComputedAxesData$:l.visibleComputedAxesData$,seriesLabels$:l.seriesLabels$,SeriesDataMap$:l.SeriesDataMap$,GroupDataMap$:l.GroupDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridGraphicTransform$:l.gridGraphicTransform$,gridGraphicReverseScale$:l.gridGraphicReverseScale$,gridAxesSize$:l.gridAxesSize$,gridHighlight$:r.multiGridHighlight$,gridContainerPosition$:l.gridContainerPosition$,event$:n.event$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Op="MultiGroupAxis",m2=q(Op,"grid"),oN=mt({name:Op,defaultParams:Lp,layerIndex:zt,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBe:'number | null | "all"',test:r=>r===null||r==="all"||typeof r=="number"},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[];return Ot(r).pipe(D(i)).subscribe(s=>{o.forEach(l=>l()),e.selectAll(`g.${m2}`).data(s).join("g").attr("class",m2).each((l,u,c)=>{const h=j(c[u]),f=l.dataFormatter$.pipe(D(i),L(p=>p.separateSeries),K(),se(1));o[u]=qv(Op,{selection:h,computedData$:l.computedData$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:f,textSizePx$:r.textSizePx$})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Gp="MultiValueAxis",y2=q(Gp,"grid"),aN=mt({name:Gp,defaultParams:ma,layerIndex:zt,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[];return Ot(r).pipe(D(i)).subscribe(s=>{o.forEach(l=>l()),e.selectAll(`g.${y2}`).data(s).join("g").attr("class",y2).each((l,u,c)=>{const h=j(c[u]),f=l.dataFormatter$.pipe(D(i),L(p=>p.separateSeries),K(),se(1));o[u]=Ni(Gp,{selection:h,computedData$:l.computedData$,filteredMinMaxValue$:l.filteredMinMaxValue$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),b2="MultiGridTooltip",sN=mt({name:b2,defaultParams:Rp,layerIndex:Ii,validator:(e,{validateColumns:t})=>t(e,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=Fi(b2,{rootSelection:t,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),Wp="MultiStackedValueAxis",x2=q(Wp,"grid"),lN=mt({name:Wp,defaultParams:ma,layerIndex:zt,validator:(e,{validateColumns:t})=>t(e,{gridIndexes:{toBe:'number[] | "all"',test:r=>r==="all"||Array.isArray(r)&&r.every(i=>typeof i=="number")},labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}})})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[];return Ot(r).pipe(D(i)).subscribe(s=>{o.forEach(l=>l()),e.selectAll(`g.${x2}`).data(s).join("g").attr("class",x2).each((l,u,c)=>{const h=j(c[u]),f=l.dataFormatter$.pipe(D(i),L(p=>p.separateSeries),K(),se(1));o[u]=Ni(Wp,{selection:h,computedData$:l.computedStackedData$,filteredMinMaxValue$:l.filteredMinMaxValue$,fullParams$:r.fullParams$,fullDataFormatter$:l.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:l.gridAxesTransform$,gridAxesReverseTransform$:l.gridAxesReverseTransform$,gridAxesSize$:l.gridAxesSize$,gridContainerPosition$:l.gridContainerPosition$,isSeriesSeprate$:f})})}),()=>{i.next(void 0),o.forEach(s=>s())}}),Yp="OverlappingValueAxes",$2=q(Yp,"grid"),uN=mt({name:Yp,defaultParams:kp,layerIndex:zt,validator:(e,{validateColumns:t})=>{const n=t(e,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(e.firstAxis){const r=t(e.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(e.secondAxis){const r=t(e.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[],a=r.fullParams$.pipe(D(i),L(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(D(i),L(c=>c.gridIndexes[1])),l=G({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(D(i),z(async c=>c),L(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const h=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let f=h;return h==="left"?f="right":h==="bottom"?f="top":h==="top"?f="bottom":h==="right"&&(f="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:f},container:{...c.fullDataFormatter.container}}}));return Wt(r).pipe(D(i),L(c=>({...c,fullParams$:c.fullParams$.pipe(L(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),z(c=>Ot(c)),L(c=>c.map((h,f)=>{if(f===0)return h;const p=M0({fullDataFormatter$:l,layout$:r.layout$}),d=L0({gridAxesTransform$:p}),g=D0({computedData$:h.computedData$,fullDataFormatter$:l,layout$:r.layout$});return{...h,dataFormatter$:l,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(D(i)).subscribe(c=>{o.forEach(h=>h()),e.selectAll(`g.${$2}`).data(c).join("g").attr("class",$2).each((h,f,p)=>{if(f>1)return;const d=j(p[f]);o[f]=Ni(Yp,{selection:d,computedData$:h.computedData$,filteredMinMaxValue$:h.filteredMinMaxValue$,fullParams$:r.fullParams$.pipe(L(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainerPosition$:h.gridContainerPosition$,isSeriesSeprate$:h.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),Vp="OverlappingStackedValueAxes",v2=q(Vp,"grid"),cN=mt({name:Vp,defaultParams:l2,layerIndex:zt,validator:(e,{validateColumns:t})=>{const n=t(e,{firstAxis:{toBeTypes:["object"]},secondAxis:{toBeTypes:["object"]},gridIndexes:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2}});if(e.firstAxis){const r=t(e.firstAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(e.secondAxis){const r=t(e.secondAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextRotate:{toBeTypes:["number"]},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=[],a=r.fullParams$.pipe(D(i),L(c=>c.gridIndexes[0])),s=r.fullParams$.pipe(D(i),L(c=>c.gridIndexes[1])),l=G({firstGridIndex:a,secondGridIndex:s,fullDataFormatter:r.fullDataFormatter$}).pipe(D(i),z(async c=>c),L(c=>{c.fullDataFormatter.gridList[c.secondGridIndex]||(c.fullDataFormatter.gridList[c.secondGridIndex]=Object.assign({},c.fullDataFormatter.gridList[c.firstGridIndex]));const h=c.fullDataFormatter.gridList[c.firstGridIndex].valueAxis.position;let f=h;return h==="left"?f="right":h==="bottom"?f="top":h==="top"?f="bottom":h==="right"&&(f="left"),{type:"grid",visibleFilter:c.fullDataFormatter.visibleFilter,...c.fullDataFormatter.gridList[c.secondGridIndex],valueAxis:{...c.fullDataFormatter.gridList[c.secondGridIndex].valueAxis,position:f},container:{...c.fullDataFormatter.container}}}));return Wt(r).pipe(D(i),L(c=>({...c,fullParams$:c.fullParams$.pipe(L(h=>(h.gridIndexes.length>2&&(h.gridIndexes.length=2),h)))})),z(c=>Ot(c)),L(c=>c.map((h,f)=>{if(f===0)return h;const p=M0({fullDataFormatter$:l,layout$:r.layout$}),d=L0({gridAxesTransform$:p}),g=D0({computedData$:h.computedData$,fullDataFormatter$:l,layout$:r.layout$});return{...h,dataFormatter$:l,gridAxesTransform$:p,gridAxesReverseTransform$:d,gridContainerPosition$:g}}))).pipe(D(i)).subscribe(c=>{o.forEach(h=>h()),e.selectAll(`g.${v2}`).data(c).join("g").attr("class",v2).each((h,f,p)=>{if(f>1)return;const d=j(p[f]);o[f]=Ni(Vp,{selection:d,computedData$:f===0?h.computedStackedData$:h.computedData$,filteredMinMaxValue$:h.filteredMinMaxValue$,fullParams$:r.fullParams$.pipe(L(g=>f===0?g.firstAxis:g.secondAxis)),fullDataFormatter$:h.dataFormatter$,fullChartParams$:r.fullChartParams$,gridAxesTransform$:h.gridAxesTransform$,gridAxesReverseTransform$:h.gridAxesReverseTransform$,gridAxesSize$:h.gridAxesSize$,gridContainerPosition$:h.gridContainerPosition$,isSeriesSeprate$:h.isSeriesSeprate$})})}),()=>{i.next(void 0),o.forEach(c=>c())}}),S2={placement:"bottom",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},jp={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(e,{styles:t,utils:n})=>{const r=e.categoryLabel!=="",i=e.datum.label.slice(0,11)!=="multiValue_",o=e.datum._visibleValue.map(h=>n.toCurrency(h)),a=t.textSizePx*.7,s=t.textSizePx/2-a/2,l=r?`<rect width="${a}" height="${a}" x="${s}" y="${s-1}" rx="${a/2}" fill="${e.datum.color}"></rect>
|
110
|
+
<text x="${t.textSizePx*1.5}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
111
|
+
<tspan>${e.categoryLabel}</tspan>
|
112
|
+
</text>`:"",u=i?`<tspan>${e.datum.label}</tspan> `:"",c=`<text font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
113
|
+
${u}<tspan font-weight="bold">${o}</tspan>
|
114
|
+
</text>`;return`${l}
|
115
|
+
<g ${r?`transform="translate(0, ${t.textSizePx*2})"`:""}>
|
116
|
+
${c}
|
117
|
+
</g>`}};jp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
104
118
|
const hasCategoryLabel = eventData.categoryLabel === '' ? false : true
|
105
119
|
const hasDatumLabel = eventData.datum.label.slice(0, 11) === 'multiValue_' ? false : true
|
120
|
+
const valueText = eventData.datum._visibleValue.map(d => utils.toCurrency(d))
|
106
121
|
const bulletWidth = styles.textSizePx * 0.7
|
107
122
|
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
108
123
|
const categorySvg = hasCategoryLabel
|
@@ -115,16 +130,58 @@ ${c}`}};Dp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
|
115
130
|
? \`<tspan>\${eventData.datum.label}</tspan> \`
|
116
131
|
: ''
|
117
132
|
const datumSvg = \`<text font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
118
|
-
\${datumLabelSvg}<tspan font-weight="bold">\${
|
133
|
+
\${datumLabelSvg}<tspan font-weight="bold">\${valueText}</tspan>
|
119
134
|
</text>\`
|
120
135
|
|
121
136
|
return \`\${categorySvg}
|
122
137
|
<g \${hasCategoryLabel ? \`transform="translate(0, \${styles.textSizePx * 2})"\` : ''}>
|
123
138
|
\${datumSvg}
|
124
139
|
</g>\`
|
125
|
-
}`;const a2={radius:5,fillColorType:"label",strokeColorType:"label",strokeWidth:0},s2={fillColorType:"label",strokeColorType:"label",strokeWidth:0,valueLinearOpacity:[.8,.8],arcScaleType:"area",sizeAdjust:.5},du={xAxis:{showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>String(Math.round(t)),labelPadding:20},yAxis:{showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:t=>String(Math.round(t)),labelPadding:20}};du.xAxis.labelTextFormat.toString=()=>"(value: number) => String(Math.round(value))",du.yAxis.labelTextFormat.toString=()=>"(value: number) => String(Math.round(value))";const gu={xAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"},yAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:t=>t,tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"}};gu.xAxis.tickFormat.toString=()=>"v => v",gu.yAxis.tickFormat.toString=()=>"v => v";const l2={},u2="MultiValueLegend",OB=Hn({name:u2,defaultParams:o2,layerIndex:ki,validator:(t,{validateColumns:e})=>e(t,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:t,rootSelection:e,observer:n,subject:r})=>{const i=new J,o=n.CategoryDataMap$.pipe(L(i),R(l=>Array.from(l.keys()))),a=n.fullParams$.pipe(L(i),R(l=>{const u=[{listRectWidth:l.listRectWidth,listRectHeight:l.listRectHeight,listRectRadius:l.listRectRadius}];return{...l,labelList:u}})),s=Ei(u2,{rootSelection:e,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),c2="MultiValueTooltip",GB=Hn({name:c2,defaultParams:Op,layerIndex:Ri,validator:(t,{validateColumns:e})=>e(t,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=Bi(c2,{rootSelection:e,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),Gp=({selection:t,pluginName:e,clipPathID:n,categoryLabels$:r,multiValueContainerPosition$:i,multiValueGraphicTransform$:o})=>{const a=Z(e,"category"),s=Z(e,"axes"),l=Z(e,"graphic"),u=r.pipe(R((p,d)=>t.selectAll(`g.${a}`).data(p,m=>m).join(m=>m.append("g").classed(a,!0).each((g,y,b)=>{V(b[y]).selectAll(`g.${s}`).data([y]).join(v=>v.append("g").classed(s,!0).attr("clip-path",`url(#${n})`).each((x,_,A)=>{V(A[_]).selectAll("defs").data([_]).join("defs"),V(A[_]).selectAll("g").data([_]).join("g").classed(l,!0)}),v=>v,v=>v.remove())}),m=>m,m=>m.remove())),pt(1));W({categorySelection:u,multiValueContainerPosition:i}).pipe(G(async p=>p)).subscribe(p=>{p.categorySelection.transition().attr("transform",(d,m)=>{const g=p.multiValueContainerPosition[m]??p.multiValueContainerPosition[0],y=g.translate,b=g.scale;return`translate(${y[0]}, ${y[1]}) scale(${b[0]}, ${b[1]})`})});const c=u.pipe(R(p=>p.select(`g.${s}`)),pt(1)),f=c.pipe(R(p=>p.select("defs")),pt(1)),h=W({axesSelection:c,multiValueGraphicTransform:o}).pipe(G(async p=>p),R(p=>{const d=p.axesSelection.select(`g.${l}`);return d.transition().duration(50).style("transform",p.multiValueGraphicTransform.value),d}),pt(1));return{categorySelection$:u,axesSelection$:c,defsSelection$:f,graphicGSelection$:h}},WB=({rootSelection:t,fullDataFormatter$:e,filteredMinMaxXYData$:n,multiValueContainerPosition$:r,layout$:i})=>{const o=pa(t,"mousemove").pipe(H_(2)),a=r.pipe(R(c=>c.reduce((h,p)=>p.columnIndex>h?p.columnIndex:h,0)+1),tt(),pt(1)),s=r.pipe(R(c=>c.reduce((h,p)=>p.rowIndex>h?p.rowIndex:h,0)+1),tt(),pt(1)),l=new dt(c=>{W({layout:i,filteredMinMaxXYData:n,fullDataFormatter:e,columnAmount:a,rowAmount:s}).pipe(G(async f=>f)).subscribe(f=>{if(!f.filteredMinMaxXYData.minXDatum||!f.filteredMinMaxXYData.maxXDatum||f.filteredMinMaxXYData.minXDatum.value[0]==null||f.filteredMinMaxXYData.maxXDatum.value[0]==null||!f.filteredMinMaxXYData.minYDatum||!f.filteredMinMaxXYData.maxYDatum||f.filteredMinMaxXYData.minYDatum.value[1]==null||f.filteredMinMaxXYData.maxYDatum.value[1]==null)return;const h=f0({maxValue:f.filteredMinMaxXYData.maxXDatum.value[0],minValue:f.filteredMinMaxXYData.minXDatum.value[0],axisWidth:f.layout.width,scaleDomain:f.fullDataFormatter.xAxis.scaleDomain,scaleRange:f.fullDataFormatter.xAxis.scaleRange}),p=f0({maxValue:f.filteredMinMaxXYData.maxYDatum.value[1],minValue:f.filteredMinMaxXYData.minYDatum.value[1],axisWidth:f.layout.height,scaleDomain:f.fullDataFormatter.yAxis.scaleDomain,scaleRange:f.fullDataFormatter.yAxis.scaleRange,reverse:!0});c.next({xScale:h,yScale:p})})}),u=W({fullDataFormatter:e,rootMousemove:o,columnAmount:a,rowAmount:s,layout:i,multiValueContainerPosition:r}).pipe(G(async c=>c),R(c=>({x:(c.rootMousemove.offsetX-c.layout.left)/c.multiValueContainerPosition[0].scale[0]%(c.layout.rootWidth/c.columnAmount/c.multiValueContainerPosition[0].scale[0]),y:(c.rootMousemove.offsetY-c.layout.top)/c.multiValueContainerPosition[0].scale[1]%(c.layout.rootHeight/c.rowAmount/c.multiValueContainerPosition[0].scale[1])})));return W({xyScale:l,axisValue:u}).pipe(G(async c=>c),R(c=>({x:c.axisValue.x,y:c.axisValue.y,xValue:c.xyScale.xScale(c.axisValue.x),yValue:c.xyScale.yScale(c.axisValue.y)})))},xn="Scatter",YB={name:xn,defaultParams:a2,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]}})};function XB({graphicGSelection:t,circleGClassName:e,circleClassName:n,visibleComputedLayoutData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let l=0;return t.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,m)=>{V(m[d]).selectAll("circle").data([p]).join(g=>g.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,b)=>d*l).attr("opacity",1),g=>g.transition().duration(50).attr("opacity",1),g=>g.remove()).attr("r",i.radius).attr("fill",(g,y)=>St({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>St({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function VB({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",1);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",1).transition("highlight").duration(200):V(o[i]).style("opacity",n.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function UB({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const HB=Hn(YB)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=Pe(xn,"clipPath-box"),a=Z(xn,"circleG"),s=Z(xn,"circle"),{categorySelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:f}=Gp({selection:t,pluginName:xn,clipPathID:o,categoryLabels$:r.categoryLabels$,multiValueContainerPosition$:r.multiValueContainerPosition$,multiValueGraphicTransform$:r.multiValueGraphicTransform$}),h=W({computedData:r.computedData$,multiValueGraphicReverseScale:r.multiValueGraphicReverseScale$}).pipe(L(i),G(async m=>m),R(m=>m.computedData.map((g,y)=>m.multiValueGraphicReverseScale[y])));W({defsSelection:c,layout:r.layout$}).pipe(L(i),G(async m=>m)).subscribe(m=>{const g=[{id:o,width:m.layout.width,height:m.layout.height}];UB({defsSelection:m.defsSelection,clipPathData:g})});const p=W({graphicGSelection:f,visibleComputedLayoutData:r.visibleComputedLayoutData$,graphicReverseScale:h,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(L(i),G(async m=>m),R(m=>XB({graphicGSelection:m.graphicGSelection,circleGClassName:a,circleClassName:s,visibleComputedLayoutData:m.visibleComputedLayoutData,fullParams:m.fullParams,fullChartParams:m.fullChartParams,graphicReverseScale:m.graphicReverseScale}))),d=r.fullChartParams$.pipe(L(i),R(m=>m.highlightTarget),tt());return W({graphicSelection:p,computedData:r.computedData$,CategoryDataMap:r.CategoryDataMap$,highlightTarget:d}).pipe(L(i),G(async m=>m)).subscribe(m=>{m.graphicSelection.on("mouseover",(g,y)=>{n.event$.next({type:"multiValue",eventName:"mouseover",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})}).on("mousemove",(g,y)=>{n.event$.next({type:"multiValue",eventName:"mousemove",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})}).on("mouseout",(g,y)=>{n.event$.next({type:"multiValue",eventName:"mouseout",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})}).on("click",(g,y)=>{n.event$.next({type:"multiValue",eventName:"click",pluginName:xn,highlightTarget:m.highlightTarget,datum:y,category:m.CategoryDataMap.get(y.categoryLabel),categoryIndex:y.categoryIndex,categoryLabel:y.categoryLabel,data:m.computedData,event:g})})}),W({graphicSelection:p,highlight:r.multiValueHighlight$.pipe(R(m=>m.map(g=>g.id))),fullChartParams:r.fullChartParams$}).pipe(L(i),G(async m=>m)).subscribe(m=>{VB({selection:m.graphicSelection,ids:m.highlight,fullChartParams:m.fullChartParams})}),()=>{i.next(void 0)}}),vn="ScatterBubbles",jB=.9,qB={name:vn,defaultParams:s2,layerIndex:fu,validator:(t,{validateColumns:e})=>e(t,{fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},valueLinearOpacity:{toBeTypes:["number[]"]},arcScaleType:{toBe:"ArcScaleType",test:r=>r==="area"||r==="radius"},sizeAdjust:{toBeTypes:["number"]}})};function ZB({graphicGSelection:t,circleGClassName:e,circleClassName:n,bubbleData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const f=c.size();return o.transitionDuration/f};let l=0;return t.each((c,f,h)=>{V(h[f]).selectAll("g").data(r[f],p=>p.id).join(p=>(l=s(p),p.append("g").classed(e,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,m)=>{V(m[d]).selectAll("circle").data([p]).join(g=>g.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((y,b)=>d*l).attr("opacity",.8),g=>g.transition().duration(50).attr("opacity",.8),g=>g.remove()).attr("r",g=>g.r).attr("fill",(g,y)=>St({datum:g,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(g,y)=>St({datum:g,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[f][0]??1}, ${a[f][1]??1})`)})}),t.selectAll(`circle.${n}`)}function KB({selection:t,ids:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").duration(200).style("opacity",r=>r.opacity);return}t.each((r,i,o)=>{e.includes(r.id)?V(o[i]).style("opacity",s=>s.opacity).transition("highlight").duration(200):V(o[i]).style("opacity",n.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function QB({defsSelection:t,clipPathData:e}){t.selectAll("clipPath").data(e).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{V(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const JB=Hn(qB)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,o=Pe(vn,"clipPath-box"),a=Z(vn,"circleG"),s=Z(vn,"circle"),{categorySelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:f}=Gp({selection:t,pluginName:vn,clipPathID:o,categoryLabels$:r.categoryLabels$,multiValueContainerPosition$:r.multiValueContainerPosition$,multiValueGraphicTransform$:r.multiValueGraphicTransform$}),h=W({computedData:r.computedData$,multiValueGraphicReverseScale:r.multiValueGraphicReverseScale$}).pipe(L(i),G(async S=>S),R(S=>S.computedData.map((P,C)=>S.multiValueGraphicReverseScale[C])));W({defsSelection:c,layout:r.layout$}).pipe(L(i),G(async S=>S)).subscribe(S=>{const P=[{id:o,width:S.layout.width,height:S.layout.height}];QB({defsSelection:S.defsSelection,clipPathData:P})});const p=r.filteredMinMaxXYData$.pipe(L(i),R(S=>S.datumList.flat().map(P=>P.value[2]??0)),pt(1)),d=r.filteredMinMaxXYData$.pipe(L(i),R(S=>ic(S.datumList.flat().map(P=>P.value[2]??0)))),m=W({filteredMinMaxValue:d,fullParams:r.fullParams$}).pipe(L(i),G(async S=>S),R(S=>xr().domain(S.filteredMinMaxValue).range(S.fullParams.valueLinearOpacity))),g=W({layout:r.layout$,fullParams:r.fullParams$}).pipe(L(i),R(S=>Math.min(S.layout.width,S.layout.height)/2*S.fullParams.sizeAdjust)),y=p.pipe(L(i),R(S=>S.reduce((P,C)=>P+C,0)),Rr(S=>S>0)),b=W({totalR:g,totalValue:y,fullParams:r.fullParams$}).pipe(L(i),G(async S=>S),R(S=>kn().domain([0,S.totalValue]).range([0,S.totalR]).exponent(S.fullParams.arcScaleType==="area"?.5:1))),v=W({radiusScale:b,fullParams:r.fullParams$,totalR:g,filteredValueList:p}).pipe(L(i),G(async S=>S),R(S=>S.fullParams.arcScaleType==="area"?1:(()=>{const P=S.totalR*S.totalR*Math.PI;return Math.sqrt(P/Ac(S.filteredValueList,C=>Math.PI*Math.pow(S.radiusScale(C),2)))})())),x=W({computedLayoutData:r.computedLayoutData$,opacityScale:m,radiusScale:b,scaleFactor:v,fullParams:r.fullParams$}).pipe(L(i),G(async S=>S),R(S=>S.computedLayoutData.map(P=>P.map(C=>{const B=C;return B.r=S.radiusScale(B.value[2])*S.scaleFactor*jB,B.opacity=S.opacityScale(B.value[2]),B})))),_=W({graphicGSelection:f,bubbleData:x,graphicReverseScale:h,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(L(i),G(async S=>S),R(S=>ZB({graphicGSelection:S.graphicGSelection,circleGClassName:a,circleClassName:s,bubbleData:S.bubbleData,fullParams:S.fullParams,fullChartParams:S.fullChartParams,graphicReverseScale:S.graphicReverseScale}))),A=r.fullChartParams$.pipe(L(i),R(S=>S.highlightTarget),tt());return W({graphicSelection:_,computedData:r.computedData$,CategoryDataMap:r.CategoryDataMap$,highlightTarget:A}).pipe(L(i),G(async S=>S)).subscribe(S=>{S.graphicSelection.on("mouseover",(P,C)=>{n.event$.next({type:"multiValue",eventName:"mouseover",pluginName:vn,highlightTarget:S.highlightTarget,datum:C,category:S.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:S.computedData,event:P})}).on("mousemove",(P,C)=>{n.event$.next({type:"multiValue",eventName:"mousemove",pluginName:vn,highlightTarget:S.highlightTarget,datum:C,category:S.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:S.computedData,event:P})}).on("mouseout",(P,C)=>{n.event$.next({type:"multiValue",eventName:"mouseout",pluginName:vn,highlightTarget:S.highlightTarget,datum:C,category:S.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:S.computedData,event:P})}).on("click",(P,C)=>{n.event$.next({type:"multiValue",eventName:"click",pluginName:vn,highlightTarget:S.highlightTarget,datum:C,category:S.CategoryDataMap.get(C.categoryLabel),categoryIndex:C.categoryIndex,categoryLabel:C.categoryLabel,data:S.computedData,event:P})})}),W({graphicSelection:_,highlight:r.multiValueHighlight$.pipe(R(S=>S.map(P=>P.id))),fullChartParams:r.fullChartParams$}).pipe(L(i),G(async S=>S)).subscribe(S=>{KB({selection:S.graphicSelection,ids:S.highlight,fullChartParams:S.fullChartParams})}),()=>{i.next(void 0)}}),mu="XYAux",Wp=Z(mu,"label-box"),tN={name:mu,defaultParams:du,layerIndex:c$,validator:(t,{validateColumns:e})=>{const n=e(t,{xAxis:{toBeTypes:["object"]},yAxis:{toBeTypes:["object"]}});if(t.xAxis){const r=e(t.xAxis,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.yAxis){const r=e(t.yAxis,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function eN({axisX:t,axisY:e,layout:n,fullParams:r}){return t>=0&&t<=n.width&&e>=0&&e<=n.height?[{id:"line-x",x1:t,x2:t,y1:0,y2:n.height,dashArray:r.xAxis.lineDashArray??"none",colorType:r.xAxis.lineColorType},{id:"line-0",x1:0,x2:n.width,y1:e,y2:e,dashArray:r.yAxis.lineDashArray??"none",colorType:r.yAxis.lineColorType}]:[]}function nN({axisX:t,axisY:e,xValue:n,yValue:r,fullParams:i,textSizePx:o,layout:a,columnAmount:s,rowAmount:l}){if(!(t>=0&&t<=a.width&&e>=0&&e<=a.height))return[];const u=6,c=3,f=t,h=a.height+i.xAxis.labelPadding*l,p=wr(n,i.xAxis.labelTextFormat),d=p.split(`
|
126
|
-
|
127
|
-
`),k=$.reduce((E,O)=>O.length>E.length?O:E,""),M=ha(k,o),T=o*$.length,w=M+u*2,D=T+c*2,F=-M-u,z=-c-T/2,I=F+u,N=z+c;return[{id:"label-x",x:f,y:h,text:p,textArr:d,textWidth:g,textHeight:y,colorType:i.xAxis.labelColorType,textColorType:i.xAxis.labelTextColorType,rectWidth:b,rectHeight:v,rectX:x,rectY:_,textX:A,textY:S},{id:"label-y",x:P,y:C,text:B,textArr:$,textWidth:M,textHeight:T,colorType:i.yAxis.labelColorType,textColorType:i.xAxis.labelTextColorType,rectWidth:w,rectHeight:D,rectX:F,rectY:z,textX:I,textY:N}]}function rN({selection:t,pluginName:e,lineData:n,fullParams:r,fullChartParams:i}){const o=Z(e,"auxline");return t.selectAll(`line.${o}`).data(n).join(s=>s.append("line").classed(o,!0).style("stroke-width",1).style("pointer-events","none").style("vector-effect","non-scaling-stroke").attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),s=>s.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),s=>s.remove()).style("stroke",s=>bt(s.colorType,i)).style("stroke-dasharray",s=>s.dashArray)}function iN(t){t.selectAll("line").data([]).exit().remove()}function oN({selection:t,labelData:e,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransform:o,textSizePx:a}){return t.selectAll(`g.${Wp}`).data(e).join(l=>l.append("g").classed(Wp,!0).style("cursor","pointer").attr("transform",(u,c)=>`translate(${u.x}, ${u.y})`),l=>l.transition().duration(50).attr("transform",(c,f)=>`translate(${c.x}, ${c.y})`),l=>l.remove()).each((l,u,c)=>{V(c[u]).selectAll("rect").data([l]).join(f=>f.append("rect").style("cursor","pointer").attr("rx",5).attr("ry",5),f=>f,f=>f.remove()).attr("width",f=>`${f.rectWidth}px`).attr("height",f=>`${f.rectHeight}px`).attr("fill",f=>bt(f.colorType,i)).attr("x",f=>f.rectX).attr("y",f=>f.rectY).style("transform",o),V(c[u]).selectAll("text").data([l]).join(f=>f.append("text").style("dominant-baseline","hanging").style("cursor","pointer").style("pointer-events","none"),f=>f,f=>f.remove()).style("transform",o).attr("fill",f=>bt(f.textColorType,i)).attr("font-size",i.styles.textSize).attr("x",f=>f.textX).attr("y",f=>f.textY).each((f,h,p)=>{wp(V(p[h]),{textArr:l.textArr,textSizePx:a,groupAxisPosition:h===0?"bottom":"left"})})})}function aN(t){t.selectAll(`g.${Wp}`).data([]).exit().remove()}const sN=Hn(tN)(({selection:t,rootSelection:e,name:n,subject:r,observer:i})=>{const o=new J,a=e.insert("rect","g").classed(Z(mu,"rect"),!0).attr("opacity",0),{categorySelection$:s,axesSelection$:l,defsSelection$:u,graphicGSelection$:c}=Gp({selection:t,pluginName:mu,clipPathID:"test",categoryLabels$:i.isCategorySeprate$.pipe(G(g=>Yi(()=>g,i.categoryLabels$,i.categoryLabels$.pipe(R(y=>[y[0]]))))),multiValueContainerPosition$:i.multiValueContainerPosition$,multiValueGraphicTransform$:i.multiValueGraphicTransform$});i.layout$.pipe(L(o)).subscribe(g=>{a.attr("width",g.rootWidth).attr("height",g.rootHeight)});const f=i.multiValueContainerPosition$.pipe(R(g=>g.reduce((b,v)=>v.columnIndex>b?v.columnIndex:b,0)+1),tt()),h=i.multiValueContainerPosition$.pipe(R(g=>g.reduce((b,v)=>v.rowIndex>b?v.rowIndex:b,0)+1),tt()),p=i.multiValueContainerPosition$.pipe(L(o),G(async g=>g),R(g=>`${`scale(${1/g[0].scale[0]}, ${1/g[0].scale[1]})`}`),tt()),d=WB({rootSelection:e,fullDataFormatter$:i.fullDataFormatter$,filteredMinMaxXYData$:i.filteredMinMaxXYData$,multiValueContainerPosition$:i.multiValueContainerPosition$,layout$:i.layout$}).pipe(L(o));W({axesSelection:l,layout:i.layout$,xyPosition:d,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,textReverseTransform:p,textSizePx:i.textSizePx$,columnAmount:f,rowAmount:h}).pipe(L(o),G(async g=>g)).subscribe(g=>{const{x:y,y:b,xValue:v,yValue:x}=g.xyPosition,_=eN({axisX:y,axisY:b,layout:g.layout,fullParams:g.fullParams});rN({selection:g.axesSelection,pluginName:n,lineData:_,fullParams:g.fullParams,fullChartParams:g.fullChartParams});const A=nN({axisX:y,axisY:b,xValue:v,yValue:x,fullParams:g.fullParams,textSizePx:g.textSizePx,layout:g.layout,columnAmount:g.columnAmount,rowAmount:g.rowAmount});oN({selection:g.axesSelection,labelData:A,fullParams:g.fullParams,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,textReverseTransform:g.textReverseTransform,textSizePx:g.textSizePx})});const m=pa(a,"mouseout").pipe(L(o));return W({rootRectMouseout:m,axesSelection:l}).pipe(L(o),G(async g=>g)).subscribe(g=>{setTimeout(()=>{iN(g.axesSelection),aN(g.axesSelection)})}),()=>{o.next(void 0),a.remove()}}),Ar="XYAxes",f2=6,lN="middle",uN="hanging",cN="start",fN="hanging",hN="end",pN="middle",dN="end",gN="auto",mN={name:Ar,defaultParams:gu,layerIndex:bn,validator:(t,{validateColumns:e})=>{const n=e(t,{xAxis:{toBeTypes:["object"]},yAxis:{toBeTypes:["object"]}});if(t.xAxis){const r=e(t.xAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(t.yAxis){const r=e(t.yAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}};function yN({selection:t,xLabelClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,textReverseTransform:a}){const s=n.xAxis.tickPadding+n.xAxis.labelOffset[0],l=n.xAxis.tickPadding+n.xAxis.labelOffset[1];let u=s,c=l;t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((f,h,p)=>{V(p[h]).selectAll("text").data([f]).join(d=>d.append("text").style("font-weight","bold"),d=>d,d=>d.remove()).attr("text-anchor",cN).attr("dominant-baseline",fN).attr("font-size",o.styles.textSize).style("fill",bt(n.xAxis.labelColorType,o)).style("transform",a).attr("x",u).attr("y",c).text(d=>i.xAxis.label)}).attr("transform",f=>`translate(${r.width}, ${r.height})`)}function bN({selection:t,yLabelClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,textReverseTransform:a}){const s=n.yAxis.tickPadding-n.yAxis.labelOffset[0],l=n.yAxis.tickPadding+n.yAxis.labelOffset[1];let u=-s,c=-l;t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).each((f,h,p)=>{V(p[h]).selectAll("text").data([f]).join(d=>d.append("text").style("font-weight","bold"),d=>d,d=>d.remove()).attr("text-anchor",dN).attr("dominant-baseline",gN).attr("font-size",o.styles.textSize).style("fill",bt(n.yAxis.labelColorType,o)).style("transform",a).attr("x",u).attr("y",c).text(d=>i.yAxis.label)})}function xN({selection:t,xAxisClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,xScale:a,textReverseTransform:s,minMaxXY:l}){const u=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0).attr("transform",`translate(0, ${r.height})`);let c=n.xAxis.tickPadding;const f=Dc(a).scale(a).ticks(n.xAxis.ticks).tickFormat(d=>wr(d,n.xAxis.tickFormat)).tickSize(n.xAxis.tickFullLine==!0?-r.height:f2).tickSizeOuter(-r.height).tickPadding(c),h=u.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",n.xAxis.tickLineVisible==!0?bt(n.xAxis.tickColorType,o):"none").style("stroke-dasharray",n.xAxis.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",n.xAxis.axisLineVisible==!0?bt(n.xAxis.axisLineColorType,o):"none").style("shape-rendering","crispEdges"),u.selectAll("text").attr("font-size",o.styles.textSize).style("color",bt(n.xAxis.tickTextColorType,o)).attr("text-anchor",lN).attr("dominant-baseline",uN).attr("dy",0).attr("y",c).style("transform",s),u}function vN({selection:t,yAxisClassName:e,fullParams:n,layout:r,fullDataFormatter:i,fullChartParams:o,yScale:a,textReverseTransform:s,minMaxXY:l}){const u=t.selectAll(`g.${e}`).data([n]).join("g").classed(e,!0);let c=n.yAxis.tickPadding;const f=Cc(a).scale(a).ticks(n.xAxis.ticks).tickFormat(d=>wr(d,n.yAxis.tickFormat)).tickSize(n.yAxis.tickFullLine==!0?-r.width:f2).tickPadding(c),h=u.transition().duration(100).call(f);return h.selectAll("line").style("fill","none").style("stroke",n.yAxis.tickLineVisible==!0?bt(n.yAxis.tickColorType,o):"none").style("stroke-dasharray",n.yAxis.tickFullLineDasharray).attr("pointer-events","none"),h.selectAll("path").style("fill","none").style("stroke",n.yAxis.axisLineVisible==!0?bt(n.yAxis.axisLineColorType,o):"none").style("shape-rendering","crispEdges"),u.selectAll("text").attr("font-size",o.styles.textSize).style("color",bt(n.yAxis.tickTextColorType,o)).attr("text-anchor",hN).attr("dominant-baseline",pN).attr("x",-c).attr("dy",0).style("transform",s),u}const $N=Hn(mN)(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,o=Z(Ar,"container"),a=Z(Ar,"xAxis"),s=Z(Ar,"yAxisG"),l=Z(Ar,"yAxis"),u=Z(Ar,"xLabel"),c=Z(Ar,"yLabel"),f=W({computedData:n.computedData$.pipe(tt((g,y)=>g.length===y.length)),isCategorySeprate:n.isCategorySeprate$}).pipe(L(i),G(async g=>g),R(g=>g.isCategorySeprate?g.computedData:[g.computedData[0]]),R((g,y)=>t.selectAll(`g.${o}`).data(g,b=>b[0]?b[0].categoryIndex:y).join("g").classed(o,!0))),h=f.pipe(L(i),R((g,y)=>g.selectAll(`g.${s}`).data([s]).join("g").classed(s,!0)));W({containerSelection:f,gridContainerPosition:n.multiValueContainerPosition$}).pipe(L(i),G(async g=>g)).subscribe(g=>{g.containerSelection.attr("transform",(y,b)=>{const v=g.gridContainerPosition[b]??g.gridContainerPosition[0],x=v.translate,_=v.scale;return`translate(${x[0]}, ${x[1]}) scale(${_[0]}, ${_[1]})`})});const p=n.multiValueContainerPosition$.pipe(L(i),G(async g=>g),R(g=>`${`scale(${1/g[0].scale[0]}, ${1/g[0].scale[1]})`}`),tt()),d=new dt(g=>{W({fullDataFormatter:n.fullDataFormatter$,layout:n.layout$,filteredMinMaxXYData:n.filteredMinMaxXYData$}).pipe(L(i),G(async y=>y)).subscribe(y=>{if(!y.filteredMinMaxXYData.minXDatum||!y.filteredMinMaxXYData.maxXDatum||y.filteredMinMaxXYData.minXDatum.value[0]==null||y.filteredMinMaxXYData.maxXDatum.value[0]==null)return;let b=y.filteredMinMaxXYData.maxXDatum.value[0],v=y.filteredMinMaxXYData.minXDatum.value[0];b===v&&b===0&&(b=1);const x=ro({maxValue:b,minValue:v,axisWidth:y.layout.width,scaleDomain:y.fullDataFormatter.xAxis.scaleDomain,scaleRange:y.fullDataFormatter.xAxis.scaleRange});g.next(x)})}),m=new dt(g=>{W({fullDataFormatter:n.fullDataFormatter$,layout:n.layout$,filteredMinMaxXYData:n.filteredMinMaxXYData$}).pipe(L(i),G(async y=>y)).subscribe(y=>{if(!y.filteredMinMaxXYData.minYDatum||!y.filteredMinMaxXYData.maxYDatum||y.filteredMinMaxXYData.minYDatum.value[1]==null||y.filteredMinMaxXYData.maxYDatum.value[1]==null)return;let b=y.filteredMinMaxXYData.maxYDatum.value[1],v=y.filteredMinMaxXYData.minYDatum.value[1];b===v&&b===0&&(b=1);const x=ro({maxValue:b,minValue:v,axisWidth:y.layout.height,scaleDomain:y.fullDataFormatter.yAxis.scaleDomain,scaleRange:y.fullDataFormatter.yAxis.scaleRange,reverse:!0});g.next(x)})});return W({axisSelection:h,fullParams:n.fullParams$,computedData:n.computedData$,layout:n.layout$,fullDataFormatter:n.fullDataFormatter$,fullChartParams:n.fullChartParams$,xScale:d,yScale:m,textReverseTransform:p,minMaxXY:n.minMaxXY$}).pipe(L(i),G(async g=>g)).subscribe(g=>{xN({selection:g.axisSelection,xAxisClassName:a,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,xScale:g.xScale,textReverseTransform:g.textReverseTransform,minMaxXY:g.minMaxXY}),vN({selection:g.axisSelection,yAxisClassName:l,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,yScale:g.yScale,textReverseTransform:g.textReverseTransform,minMaxXY:g.minMaxXY}),yN({selection:g.axisSelection,xLabelClassName:u,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,textReverseTransform:g.textReverseTransform}),bN({selection:g.axisSelection,yLabelClassName:c,fullParams:g.fullParams,layout:g.layout,fullDataFormatter:g.fullDataFormatter,fullChartParams:g.fullChartParams,textReverseTransform:g.textReverseTransform})}),()=>{i.next(void 0)}}),_N=Hn({name:"XYZoom",defaultParams:l2,layerIndex:u$,validator:(t,{validateColumns:e})=>({status:"success",columnName:"",expectToBe:""})})(({selection:t,rootSelection:e,name:n,observer:r,subject:i})=>{const o=new J;let a={k:1,x:0,y:0};const s=r.fullDataFormatter$.pipe(R(f=>f.xAxis),Xi()),l=r.fullDataFormatter$.pipe(R(f=>f.yAxis),Xi()),u=new dt(f=>{W({initXAxis:s,layout:r.layout$,minMaxXY:r.minMaxXY$}).pipe(L(o),G(async h=>h)).subscribe(h=>{const p=ro({maxValue:h.minMaxXY.maxX,minValue:h.minMaxXY.minX,axisWidth:h.layout.width,scaleDomain:h.initXAxis.scaleDomain,scaleRange:h.initXAxis.scaleRange});f.next(p)})}),c=W({initXAxis:s,initYAxis:l,minMaxXY:r.minMaxXY$}).pipe(L(o),G(async f=>f),R(f=>{let h=f.minMaxXY.minX,p=f.minMaxXY.maxX,d=f.minMaxXY.minY,m=f.minMaxXY.maxY;return f.initXAxis.scaleDomain[0]==="auto"&&h>0&&(h=0),f.initXAxis.scaleDomain[1]==="auto"&&p<0&&(p=0),f.initYAxis.scaleDomain[0]==="auto"&&d>0&&(d=0),f.initYAxis.scaleDomain[1]==="auto"&&m<0&&(m=0),{minX:h,maxX:p,minY:d,maxY:m}}));return W({initXScale:u,fullDataFormatter:r.fullDataFormatter$,minMaxScaleDomain:c}).pipe(L(o),G(async f=>f)).subscribe(f=>{const h=f.initXScale.copy(),p=yn().on("zoom",function(m){const g=m.transform,y=x=>{const _=Math.round(x);return Math.min(f.minMaxScaleDomain.maxX,Math.max(f.minMaxScaleDomain.minX,_))},b=g.rescaleX(h).domain().map(y);b[0]<=f.minMaxScaleDomain.minX&&b[1]>=f.minMaxScaleDomain.maxX?g.k<a.k&&(g.k=a.k,g.x=a.x,g.y=a.y):b[1]-b[0]<=1&&g.k>a.k&&(g.k=a.k,g.x=a.x,g.y=a.y),a.k=g.k,a.x=g.x,a.y=g.y;const v={...f.fullDataFormatter,xAxis:{...f.fullDataFormatter.xAxis,scaleDomain:b}};i.dataFormatter$.next(v)});e.call(p)}),()=>{o.next(void 0),e.call(yn().on("zoom",null))}}),SN={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},h2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:t=>{if(t.highlightTarget==="datum"&&t.datum)return[`${t.datum.label}: ${t.datum.value}`];if(t.highlightTarget==="series"){const e=t.seriesLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="group"){const e=t.groupLabel,n=t.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}else if(t.highlightTarget==="category"){const e=t.categoryLabel,n=t.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[e,r]}return[]},svgRenderFn:null};h2.textRenderFn.toString=()=>`(eventData) => {
|
140
|
+
}`;const Xp={bar:{barWidth:0,barPadding:8,barRadius:!1},barLabel:{position:"inside",padding:20,rotate:0,colorType:"labelContrast"},valueLabel:{padding:20,colorType:"primary",format:e=>e},axisLabel:{offset:[0,0],colorType:"primary"},rankingAmount:10,autorun:!1,loop:!1};Xp.valueLabel.format.toString=()=>"v => v";const _2={renderFn:(e,t,n)=>e,textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"end","pointer-events":"none","dominant-baseline":"auto","font-size":64,fill:"#bebebe"},{"text-anchor":"end","pointer-events":"none","dominant-baseline":"auto","font-size":24,fill:"#bebebe"}],paddingRight:0,paddingBottom:0},Up={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"secondary",ticks:null,tickFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"};Up.tickFormat.toString=()=>`num => {
|
141
|
+
if (num === null || Number.isNaN(num) == true) {
|
142
|
+
return num || 0
|
143
|
+
}
|
144
|
+
var parts = num.toString().split('.')
|
145
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
146
|
+
return parts.join('.')
|
147
|
+
}`;const w2={radius:5,fillColorType:"label",strokeColorType:"label",strokeWidth:0},T2={fillColorType:"label",strokeColorType:"label",strokeWidth:0,valueLinearOpacity:[.8,.8],arcScaleType:"area",sizeAdjust:.5},Hp={labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"secondary",ticks:null,tickFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"};Hp.tickFormat.toString=()=>`num => {
|
148
|
+
if (num === null || Number.isNaN(num) == true) {
|
149
|
+
return num || 0
|
150
|
+
}
|
151
|
+
var parts = num.toString().split('.')
|
152
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
153
|
+
return parts.join('.')
|
154
|
+
}`;const bu={xAxis:{showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},labelPadding:20},yAxis:{showLine:!0,showLabel:!0,lineDashArray:"3, 3",lineColorType:"primary",labelColorType:"primary",labelTextColorType:"background",labelTextFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},labelPadding:20}};bu.xAxis.labelTextFormat.toString=()=>`num => {
|
155
|
+
if (num === null || Number.isNaN(num) == true) {
|
156
|
+
return num || 0
|
157
|
+
}
|
158
|
+
var parts = num.toString().split('.')
|
159
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
160
|
+
return parts.join('.')
|
161
|
+
}`,bu.yAxis.labelTextFormat.toString=()=>`num => {
|
162
|
+
if (num === null || Number.isNaN(num) == true) {
|
163
|
+
return num || 0
|
164
|
+
}
|
165
|
+
var parts = num.toString().split('.')
|
166
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
167
|
+
return parts.join('.')
|
168
|
+
}`;const xu={xAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"},yAxis:{labelOffset:[0,0],labelColorType:"primary",axisLineVisible:!1,axisLineColorType:"primary",ticks:null,tickFormat:e=>{if(e===null||Number.isNaN(e)==!0)return e||0;var t=e.toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")},tickLineVisible:!0,tickPadding:20,tickFullLine:!0,tickFullLineDasharray:"none",tickColorType:"secondary",tickTextColorType:"primary"}};xu.xAxis.tickFormat.toString=()=>`num => {
|
169
|
+
if (num === null || Number.isNaN(num) == true) {
|
170
|
+
return num || 0
|
171
|
+
}
|
172
|
+
var parts = num.toString().split('.')
|
173
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
174
|
+
return parts.join('.')
|
175
|
+
}`,xu.yAxis.tickFormat.toString=()=>`num => {
|
176
|
+
if (num === null || Number.isNaN(num) == true) {
|
177
|
+
return num || 0
|
178
|
+
}
|
179
|
+
var parts = num.toString().split('.')
|
180
|
+
parts[0] = parts[0].replace(/B(?=(d{3})+(?!d))/g, ',')
|
181
|
+
return parts.join('.')
|
182
|
+
}`;const A2={},P2="MultiValueLegend",fN=kt({name:P2,defaultParams:S2,layerIndex:Ei,validator:(e,{validateColumns:t})=>t(e,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:e,rootSelection:t,observer:n,subject:r})=>{const i=new Q,o=n.CategoryDataMap$.pipe(D(i),L(l=>Array.from(l.keys()))),a=n.fullParams$.pipe(D(i),L(l=>{const u=[{listRectWidth:l.listRectWidth,listRectHeight:l.listRectHeight,listRectRadius:l.listRectRadius}];return{...l,labelList:u}})),s=Bi(P2,{rootSelection:t,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),C2="MultiValueTooltip",hN=kt({name:C2,defaultParams:jp,layerIndex:Ii,validator:(e,{validateColumns:t})=>t(e,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=Fi(C2,{rootSelection:t,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),qp=({selection:e,pluginName:t,clipPathID:n,categoryLabels$:r,containerPosition$:i,graphicTransform$:o})=>{const a=q(t,"category"),s=q(t,"axes"),l=q(t,"graphic"),u=r.pipe(L((p,d)=>e.selectAll(`g.${a}`).data(p,g=>g).join(g=>g.append("g").classed(a,!0).each((m,b,y)=>{j(y[b]).selectAll(`g.${s}`).data([b]).join(x=>x.append("g").classed(s,!0).attr("clip-path",`url(#${n})`).each(($,S,A)=>{j(A[S]).selectAll("defs").data([S]).join("defs"),j(A[S]).selectAll("g").data([S]).join("g").classed(l,!0)}),x=>x,x=>x.remove())}),g=>g,g=>g.remove())),se(1));G({categorySelection:u,containerPosition:i}).pipe(z(async p=>p)).subscribe(p=>{p.categorySelection.transition().attr("transform",(d,g)=>{const m=p.containerPosition[g]??p.containerPosition[0],b=m.translate,y=m.scale;return`translate(${b[0]}, ${b[1]}) scale(${y[0]}, ${y[1]})`})});const c=u.pipe(L(p=>p.select(`g.${s}`)),se(1)),h=c.pipe(L(p=>p.select("defs")),se(1)),f=G({axesSelection:c,graphicTransform:o}).pipe(z(async p=>p),L(p=>{const d=p.axesSelection.select(`g.${l}`);return d.transition().duration(50).style("transform",p.graphicTransform.value),d}),se(1));return{categorySelection$:u,axesSelection$:c,defsSelection$:h,graphicGSelection$:f}},ya=({selection:e,pluginName:t,clipPathID:n,computedData$:r,containerPosition$:i,isCategorySeprate$:o})=>{const a=q(t,"container"),s=G({computedData:r.pipe(K((l,u)=>l.length===u.length)),isCategorySeprate:o}).pipe(z(async l=>l),L(l=>l.isCategorySeprate?l.computedData:[l.computedData[0]]),L((l,u)=>e.selectAll(`g.${a}`).data(l,c=>c[0]?c[0].categoryIndex:u).join("g").classed(a,!0).attr("clip-path",c=>n?`url(#${n})`:"none")),se(1));return G({containerSelection:s,gridContainerPosition:i}).pipe(z(async l=>l)).subscribe(l=>{l.containerSelection.attr("transform",(u,c)=>{const h=l.gridContainerPosition[c]??l.gridContainerPosition[0],f=h.translate;return h.scale,`translate(${f[0]}, ${f[1]})`})}),s},pN=({rootSelection:e,fullDataFormatter$:t,filteredXYMinMaxData$:n,containerPosition$:r,layout$:i})=>{const o=ga(e,"mousemove").pipe(p_(2)),a=r.pipe(L(c=>c.reduce((f,p)=>p.columnIndex>f?p.columnIndex:f,0)+1),K(),se(1)),s=r.pipe(L(c=>c.reduce((f,p)=>p.rowIndex>f?p.rowIndex:f,0)+1),K(),se(1)),l=new ge(c=>{G({layout:i,filteredXYMinMaxData:n,fullDataFormatter:t,columnAmount:a,rowAmount:s}).pipe(z(async h=>h)).subscribe(h=>{const f=h.fullDataFormatter.xAxis.valueIndex,p=h.fullDataFormatter.yAxis.valueIndex;if(!h.filteredXYMinMaxData.minXDatum||!h.filteredXYMinMaxData.maxXDatum||h.filteredXYMinMaxData.minXDatum.value[f]==null||h.filteredXYMinMaxData.maxXDatum.value[f]==null||!h.filteredXYMinMaxData.minYDatum||!h.filteredXYMinMaxData.maxYDatum||h.filteredXYMinMaxData.minYDatum.value[p]==null||h.filteredXYMinMaxData.maxYDatum.value[p]==null)return;const d=P0({maxValue:h.filteredXYMinMaxData.maxXDatum.value[f],minValue:h.filteredXYMinMaxData.minXDatum.value[f],axisWidth:h.layout.width,scaleDomain:h.fullDataFormatter.xAxis.scaleDomain,scaleRange:h.fullDataFormatter.xAxis.scaleRange}),g=P0({maxValue:h.filteredXYMinMaxData.maxYDatum.value[p],minValue:h.filteredXYMinMaxData.minYDatum.value[p],axisWidth:h.layout.height,scaleDomain:h.fullDataFormatter.yAxis.scaleDomain,scaleRange:h.fullDataFormatter.yAxis.scaleRange,reverse:!0});c.next({xScale:d,yScale:g})})}),u=G({fullDataFormatter:t,rootMousemove:o,columnAmount:a,rowAmount:s,layout:i,containerPosition:r}).pipe(z(async c=>c),L(c=>({x:(c.rootMousemove.offsetX-c.layout.left)/c.containerPosition[0].scale[0]%(c.layout.rootWidth/c.columnAmount/c.containerPosition[0].scale[0]),y:(c.rootMousemove.offsetY-c.layout.top)/c.containerPosition[0].scale[1]%(c.layout.rootHeight/c.rowAmount/c.containerPosition[0].scale[1])})));return G({xyScale:l,axisValue:u}).pipe(z(async c=>c),L(c=>({x:c.axisValue.x,y:c.axisValue.y,xValue:c.xyScale.xScale(c.axisValue.x),yValue:c.xyScale.yScale(c.axisValue.y)})))},dN=({containerSize$:e,visibleComputedData$:t,textSizePx$:n,rankingAmount$:r})=>{const i=({textSizePx$:c})=>c.pipe(L(h=>h*2),se(1)),o=({minLineHeight$:c,containerSize$:h})=>G({minLineHeight:c,containerSize:h}).pipe(z(async f=>f),L(f=>f.containerSize.height>f.minLineHeight?f.containerSize.height:f.minLineHeight),K(),se(1)),a=({minLineHeight$:c,containerHeight$:h})=>G({minLineHeight:c,containerHeight:h}).pipe(z(async f=>f),L(f=>Math.floor(f.containerHeight/f.minLineHeight)),K(),se(1)),s=i({textSizePx$:n}),l=o({minLineHeight$:s,containerSize$:e}),u=a({containerHeight$:l,minLineHeight$:s});return r.pipe(z(c=>Yn(()=>c==="auto",G({visibleComputedData:t,rankingAmountLimit:u}).pipe(z(async h=>h),L(h=>{const f=h.visibleComputedData.map(p=>Math.min(h.rankingAmountLimit,p.length));return Math.max(...f)})),r)))},gN=({containerSize$:e,textSizePx$:t,computedRankingAmount$:n})=>{const r=({textSizePx$:s})=>s.pipe(L(l=>l*2),se(1)),i=({minLineHeight$:s,containerSize$:l})=>G({minLineHeight:s,containerSize:l}).pipe(z(async u=>u),L(u=>u.containerSize.height>u.minLineHeight?u.containerSize.height:u.minLineHeight),K(),se(1)),o=r({textSizePx$:t}),a=i({minLineHeight$:o,containerSize$:e});return G({containerHeight:a,computedRankingAmount:n}).pipe(z(async s=>s),L(s=>s.containerHeight/s.computedRankingAmount))},mN=({visibleComputedRankingData$:e,rankingItemHeight$:t})=>G({visibleComputedRankingData:e,rankingItemHeight:t}).pipe(z(async n=>n),L(n=>n.visibleComputedRankingData.map((r,i)=>{const o=r.length,a=n.rankingItemHeight*o;return TC({axisLabels:r.map(s=>s.label),axisWidth:a,padding:.5})}))),yN="end",bN="middle",xN="end",$N="auto";function vN({selection:e,textClassName:t,fullParams:n,containerSize:r,fullDataFormatter:i,fullChartParams:o,textReverseTransform:a}){const s=n.barLabel.padding-n.axisLabel.offset[0],l=-n.barLabel.padding-n.axisLabel.offset[1];let u=-s,c=-l;e.attr("transform",h=>`translate(0, ${r.height})`).selectAll("text").data([n]).join(h=>h.append("text").style("font-weight","bold"),h=>h,h=>h.remove()).attr("text-anchor",xN).attr("dominant-baseline",$N).attr("font-size",o.styles.textSize).style("fill",be(n.axisLabel.colorType,o)).attr("x",u).attr("y",c).text(h=>i.yAxis.label)}function SN({selection:e,fullParams:t,fullChartParams:n,rankingScale:r,valueScale:i,categoryData:o}){const a=t.barLabel.position==="none"?[]:o;return e.selectAll("text").data(a,l=>l.id).join(l=>l.append("text").style("font-weight","bold").attr("x",u=>i(u.value[u.xValueIndex]??0)-t.barLabel.padding).attr("y",u=>r(u.label)),l=>l.transition().duration(n.transitionDuration).ease(Zt).attr("x",u=>i(u.value[u.xValueIndex]??0)-t.barLabel.padding).attr("y",u=>r(u.label)),l=>l.remove()).attr("text-anchor",yN).attr("dominant-baseline",bN).attr("font-size",n.styles.textSize).style("fill",l=>Se({colorType:t.barLabel.colorType,fullChartParams:n,datum:l})).text(l=>l.label)}function _N({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",o=>-o.width).attr("y",0).attr("width",o=>o.width*2).attr("height",o=>o.height)})}const wN=(e,{selection:t,computedData$:n,visibleComputedRankingData$:r,rankingScaleList$:i,xScale$:o,fullParams$:a,fullDataFormatter$:s,fullChartParams$:l,containerPosition$:u,containerSize$:c,isCategorySeprate$:h})=>{const f=new Q,p=q(e,"box"),d=q(e,"text"),g=it(e,"clipPath-box"),m=ya({selection:t,pluginName:e,clipPathID:null,computedData$:n,containerPosition$:u,isCategorySeprate$:h}).pipe(D(f)),b=u.pipe(D(f),z(async x=>x),L(x=>`${`scale(${1/x[0].scale[0]}, ${1/x[0].scale[1]})`}`),K()),y=a.pipe(L(x=>x.barLabel.position),K(),z(x=>Yn(()=>x==="inside",o,Wt(()=>0))));return c.subscribe(x=>{const $=t.selectAll("defs").data([g]).join("defs"),S=[{id:g,width:x.width,height:x.height}];_N({defsSelection:$,clipPathData:S})}),G({containerSelection:m,fullParams:a,containerSize:c,fullDataFormatter:s,fullChartParams:l,visibleComputedRankingData:r,rankingScaleList:i,valueScale:y,textReverseTransform:b}).pipe(D(f),z(async x=>x)).subscribe(x=>{x.containerSelection.each(($,S,A)=>{const _=j(A[S]),P=x.rankingScaleList[S];if(!P)return;const M=_.selectAll(`g.${p}`).data([S]).join("g").attr("class",p).attr("clip-path",`url(#${g})`),R=_.selectAll(`g.${d}`).data([x.fullParams]).join("g").classed(d,!0);SN({selection:M,fullParams:x.fullParams,fullChartParams:x.fullChartParams,rankingScale:P,categoryData:x.visibleComputedRankingData[S],valueScale:x.valueScale}),vN({selection:R,textClassName:d,fullParams:x.fullParams,containerSize:x.containerSize,fullDataFormatter:x.fullDataFormatter,fullChartParams:x.fullChartParams,textReverseTransform:x.textReverseTransform})})}),()=>{f.next(void 0)}},TN="start",AN="middle";function PN({selection:e,fullParams:t,fullChartParams:n,rankingScale:r,xScale:i,categoryData:o,computedRankingAmount:a}){const s=o.slice(0,a+1);return e.selectAll("g").data(s,c=>c.id).join(c=>c.append("g").attr("transform",h=>`translate(${i(h.value[h.xValueIndex]??0)+t.padding}, ${r(h.label)})`),c=>c.transition().duration(n.transitionDuration).ease(Zt).attr("transform",h=>`translate(${i(h.value[h.xValueIndex]??0)+t.padding}, ${r(h.label)})`),c=>c.remove()).each((c,h,f)=>{j(f[h]).selectAll("text").data([c]).join(d=>d.append("text"),d=>d,d=>d.remove()).attr("text-anchor",TN).attr("dominant-baseline",AN).attr("font-size",n.styles.textSize).style("fill",be(t.colorType,n)).transition().duration(n.transitionDuration).ease(Zt).textTween(d=>{const g=d.xValueIndex,m=g===0?0:g-1,b=d.value[m],y=d.value[g];return x=>{const $=x===1?bt(b,y)(x):xo(b,y)(x);return On($,t.format)}})}).selectAll("text")}function CN({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",o=>0).attr("y",0).attr("width",o=>o.width*1.5).attr("height",o=>o.height)})}const DN=(e,{selection:t,computedData$:n,visibleComputedRankingData$:r,rankingScaleList$:i,xScale$:o,computedRankingAmount$:a,fullParams$:s,fullChartParams$:l,containerPosition$:u,containerSize$:c,isCategorySeprate$:h})=>{const f=new Q,p=q(e,"box"),d=it(e,"clipPath-box"),g=ya({selection:t,pluginName:e,clipPathID:null,computedData$:n,containerPosition$:u,isCategorySeprate$:h}).pipe(D(f));return c.subscribe(m=>{const b=t.selectAll("defs").data([d]).join("defs"),y=[{id:d,width:m.width,height:m.height}];CN({defsSelection:b,clipPathData:y})}),G({containerSelection:g,fullParams:s,fullChartParams:l,visibleComputedRankingData:r,rankingScaleList:i,xScale:o,computedRankingAmount:a}).pipe(D(f),z(async m=>m)).subscribe(m=>{m.containerSelection.each((b,y,x)=>{const $=j(x[y]),S=m.rankingScaleList[y];if(!S)return;const A=$.selectAll(`g.${p}`).data([y]).join("g").attr("class",p).attr("clip-path",`url(#${d})`);PN({selection:A,fullParams:m.fullParams,fullChartParams:m.fullChartParams,rankingScale:S,categoryData:m.visibleComputedRankingData[y],xScale:m.xScale,computedRankingAmount:m.computedRankingAmount})})}),()=>{f.next(void 0)}};function MN({containerSelection:e,visibleComputedRankingData:t,rankingScaleList:n,transitionDuration:r}){return e.each((o,a,s)=>{j(s[a]).selectAll("g").data(t[a]??[],u=>u.id).join(u=>u.append("g").attr("cursor","pointer").attr("transform",c=>`translate(0, ${n[a]&&n[a](c.label)})`),u=>u.transition().duration(r).ease(Zt).attr("transform",c=>`translate(0, ${n[a]&&n[a](c.label)})`),u=>u.remove())}),e.selectAll("g")}function LN({graphicGSelection:e,rectClassName:t,xScale:n,fullParams:r,barWidth:i,transitionDuration:o}){return e.each((s,l,u)=>{const c=i/2,h=r.bar.barRadius===!0?c:r.bar.barRadius===!1?0:typeof r.bar.barRadius=="number"?r.bar.barRadius:0;j(u[l]).selectAll(`rect.${t}`).data([s],p=>p.id).join(p=>p.append("rect").classed(t,!0).attr("cursor","pointer").attr("width",d=>n(d.value[d.xValueIndex])??1).attr("height",i),p=>p.transition().duration(o).ease(Zt).attr("width",d=>n(d.value[d.xValueIndex])??1).attr("height",i),p=>p.remove()).attr("transform",`translate(0, ${-c})`).attr("fill",p=>p.color).attr("rx",h).attr("ry",h)}),e.selectAll(`rect.${t}`)}function kN({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join(o=>o.append("rect"),o=>o,o=>o.remove()).attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}function RN({selection:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const EN=(e,{selection:t,computedData$:n,visibleComputedRankingData$:r,CategoryDataMap$:i,fullParams$:o,fullChartParams$:a,highlight$:s,rankingItemHeight$:l,rankingScaleList$:u,containerPosition$:c,containerSize$:h,xScale$:f,isCategorySeprate$:p,event$:d})=>{const g=new Q,m=it(e,"clipPath-box"),b=q(e,"rect"),y=ya({selection:t,pluginName:e,clipPathID:m,computedData$:n,containerPosition$:c,isCategorySeprate$:p}).pipe(D(g));h.subscribe(P=>{const M=t.selectAll("defs").data([m]).join("defs"),R=[{id:m,width:P.width,height:P.height}];kN({defsSelection:M,clipPathData:R})});const x=G({fullParams:o,rankingItemHeight:l}).pipe(D(g),z(async P=>P),L(P=>P.fullParams.bar.barWidth?P.fullParams.bar.barWidth:P.rankingItemHeight-P.fullParams.bar.barPadding),K()),$=a.pipe(D(g),L(P=>P.transitionDuration),K()),S=G({containerSelection:y,visibleComputedRankingData:r,rankingScaleList:u,transitionDuration:$}).pipe(D(g),z(async P=>P),L(P=>MN({containerSelection:P.containerSelection,visibleComputedRankingData:P.visibleComputedRankingData,rankingScaleList:P.rankingScaleList,transitionDuration:P.transitionDuration}))),A=G({graphicGSelection:S,xScale:f,barWidth:x,transitionDuration:$,fullParams:o}).pipe(D(g),z(async P=>P),L(P=>LN({graphicGSelection:P.graphicGSelection,rectClassName:b,xScale:P.xScale,fullParams:P.fullParams,barWidth:P.barWidth,transitionDuration:P.transitionDuration})),se(1)),_=a.pipe(D(g),L(P=>P.highlightTarget),K());return G({graphicSelection:A,computedData:n,CategoryDataMap:i,highlightTarget:_}).pipe(D(g),z(async P=>P)).subscribe(P=>{P.graphicSelection.on("mouseover",(M,R)=>{R._visibleValue=[R.value[R.xValueIndex]],d.next({type:"multiValue",eventName:"mouseover",pluginName:e,highlightTarget:P.highlightTarget,datum:R,category:P.CategoryDataMap.get(R.categoryLabel),categoryIndex:R.categoryIndex,categoryLabel:R.categoryLabel,data:P.computedData,event:M})}).on("mousemove",(M,R)=>{R._visibleValue=[R.value[R.xValueIndex]],d.next({type:"multiValue",eventName:"mousemove",pluginName:e,highlightTarget:P.highlightTarget,datum:R,category:P.CategoryDataMap.get(R.categoryLabel),categoryIndex:R.categoryIndex,categoryLabel:R.categoryLabel,data:P.computedData,event:M})}).on("mouseout",(M,R)=>{d.next({type:"multiValue",eventName:"mouseout",pluginName:e,highlightTarget:P.highlightTarget,datum:R,category:P.CategoryDataMap.get(R.categoryLabel),categoryIndex:R.categoryIndex,categoryLabel:R.categoryLabel,data:P.computedData,event:M})}).on("click",(M,R)=>{R._visibleValue=[R.value[R.xValueIndex]],d.next({type:"multiValue",eventName:"click",pluginName:e,highlightTarget:P.highlightTarget,datum:R,category:P.CategoryDataMap.get(R.categoryLabel),categoryIndex:R.categoryIndex,categoryLabel:R.categoryLabel,data:P.computedData,event:M})})}),G({graphicSelection:A,highlight:s.pipe(L(P=>P.map(M=>M.id))),fullChartParams:a}).pipe(D(g),z(async P=>P)).subscribe(P=>{RN({selection:P.graphicSelection,ids:P.highlight,fullChartParams:P.fullChartParams})}),()=>{g.next(void 0)}},Cr="RacingBars",IN=kt({name:Cr,defaultParams:Xp,layerIndex:ht,validator:(e,{validateColumns:t})=>{const n=t(e,{bar:{toBeTypes:["object"]},barLabel:{toBeTypes:["object"]},valueLabel:{toBeTypes:["object"]},axisLabel:{toBeTypes:["object"]},rankingAmount:{toBe:'number | "auto"',test:r=>typeof r=="number"||r==="auto"},autorun:{toBeTypes:["boolean"]},loop:{toBeTypes:["boolean"]}});if(e.bar){const r=t(e.bar,{barWidth:{toBeTypes:["number"]},barPadding:{toBeTypes:["number"]},barRadius:{toBeTypes:["number","boolean"]}});if(r.status==="error")return r}if(e.barLabel){const r=t(e.barLabel,{position:{toBe:'"inside" | "outside" | "none"',test:i=>i==="inside"||i==="outside"||i==="none"},padding:{toBeTypes:["number"]},rotate:{toBeTypes:["number"]},colorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(e.valueLabel){const r=t(e.valueLabel,{padding:{toBeTypes:["number"]},colorType:{toBeOption:"ColorType"},format:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.axisLabel){const r=t(e.axisLabel,{offset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},colorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:e,name:t,observer:n,subject:r})=>{const i=e.append("g").attr("class",`${Cr}-bars`),o=e.append("g").attr("class",`${Cr}-labels`),a=e.append("g").attr("class",`${Cr}-valueLabels`),s=new Q,l=n.fullParams$.pipe(D(s),L(S=>S.valueLabel)),u=n.fullParams$.pipe(D(s),L(S=>S.rankingAmount),K()),c=dN({containerSize$:n.containerSize$,visibleComputedData$:n.visibleComputedData$,textSizePx$:n.textSizePx$,rankingAmount$:u}).pipe(D(s),se(1)),h=gN({containerSize$:n.containerSize$,textSizePx$:n.textSizePx$,computedRankingAmount$:c}).pipe(D(s),se(1)),f=mN({visibleComputedRankingData$:n.visibleComputedRankingByIndexData$,rankingItemHeight$:h}).pipe(D(s),se(1)),p=wN(`${Cr}-labels`,{selection:o,computedData$:n.computedData$,visibleComputedRankingData$:n.visibleComputedRankingByIndexData$,rankingScaleList$:f,xScale$:n.xScale$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,containerPosition$:n.containerPosition$,containerSize$:n.containerSize$,isCategorySeprate$:n.isCategorySeprate$}),d=DN(`${Cr}-valueLabels`,{selection:a,computedData$:n.computedData$,visibleComputedRankingData$:n.visibleComputedRankingByIndexData$,rankingScaleList$:f,xScale$:n.xScale$,computedRankingAmount$:c,fullParams$:l,fullChartParams$:n.fullChartParams$,containerPosition$:n.containerPosition$,containerSize$:n.containerSize$,isCategorySeprate$:n.isCategorySeprate$}),g=EN(`${Cr}-bars`,{selection:i,computedData$:n.computedData$,visibleComputedRankingData$:n.visibleComputedRankingByIndexData$,CategoryDataMap$:n.CategoryDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,highlight$:n.highlight$,rankingItemHeight$:h,rankingScaleList$:f,xScale$:n.xScale$,containerPosition$:n.containerPosition$,containerSize$:n.containerSize$,isCategorySeprate$:n.isCategorySeprate$,event$:r.event$}),m=n.visibleComputedRankingByIndexData$.pipe(D(s),L(S=>(S[0]&&S[0][0]&&S[0][0].value.length)??0),K()),b=n.fullParams$.pipe(D(s),L(S=>S.autorun),K()),y=n.fullParams$.pipe(D(s),L(S=>S.loop),K()),x=n.fullChartParams$.pipe(D(s),L(S=>S.transitionDuration),K());let $=!0;return G({autorun:b,loop:y,valueAmount:m,tickDurationPeriod:x,fullDataFormatter:n.fullDataFormatter$}).pipe(D(s),z(async S=>S)).subscribe(({autorun:S,loop:A,valueAmount:_,tickDurationPeriod:P,fullDataFormatter:M})=>{if($!=!1&&S){const R=M.xAxis.valueIndex+1;R<_?($=!1,setTimeout(()=>{r.dataFormatter$.next({...M,xAxis:{...M.xAxis,valueIndex:R}}),$=!0},P)):R>=_&&A&&($=!1,setTimeout(()=>{r.dataFormatter$.next({...M,xAxis:{...M.xAxis,valueIndex:0}}),$=!0},P))}}),()=>{s.next(void 0),p(),d(),g()}}),ba="RacingCounterTexts",D2=q(ba,"container"),zi=q(ba,"box"),Zp=q(ba,"text"),BN={name:ba,defaultParams:_2,layerIndex:mu,validator:(e,{validateColumns:t})=>t(e,{renderFn:{toBeTypes:["Function"]},textAttrs:{toBeTypes:["object[]"]},textStyles:{toBeTypes:["object[]"]},paddingRight:{toBeTypes:["number"]},paddingBottom:{toBeTypes:["number"]}})};function NN({selection:e,data:t,fullParams:n,containerSize:r}){const i=r.width-n.paddingRight,o=r.height-n.paddingBottom;return e.selectAll(`g.${zi}`).data([zi]).join("g").classed(zi,!0).attr("transform",`translate(${i}, ${o})`).each((s,l,u)=>{j(u[l]).selectAll(`text.${Zp}`).data(t).join("text").classed(Zp,!0).each((h,f,p)=>{const d=j(p[f]).text(h.text);Object.keys(h.attr).forEach(g=>{d.attr(g,h.attr[g])}),Object.keys(h.style).forEach(g=>{d.style(g,h.style[g])})})}).selectAll(`text.${Zp}`)}function FN({computedData:e,valueLabel:t,valueIndex:n,renderFn:r,textAttrs:i,textStyles:o}){const a=t||String(n),s=r(a,n,e);return(Array.isArray(s)?s:[s]).map((u,c)=>({text:u,attr:i[c],style:o[c]}))}function zN(e,t){const n=new Q;return G({textData:t.textData$,fullParams:t.fullParams$,containerSize:t.containerSize$}).pipe(D(n)).subscribe(r=>{NN({selection:t.containerSelection,data:r.textData,fullParams:r.fullParams,containerSize:r.containerSize})}),()=>{n.next(void 0)}}const ON=kt(BN)(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=G({computedData:n.computedData$.pipe(K((u,c)=>u.length===c.length)),isCategorySeprate:n.isCategorySeprate$}).pipe(D(i),z(async u=>u),L(u=>u.isCategorySeprate?u.computedData:[u.computedData[0]]),L((u,c)=>e.selectAll(`g.${D2}`).data(u,h=>h[0]?h[0].categoryIndex:c).join("g").classed(D2,!0)));o.pipe(D(i),L((u,c)=>u.selectAll(`g.${zi}`).data([zi]).join("g").classed(zi,!0))),G({containerSelection:o,gridContainerPosition:n.containerPosition$}).pipe(D(i),z(async u=>u)).subscribe(u=>{u.containerSelection.attr("transform",(c,h)=>{const f=u.gridContainerPosition[h]??u.gridContainerPosition[0],p=f.translate;return f.scale,`translate(${p[0]}, ${p[1]})`})});const a=G({xyValueIndex:n.xyValueIndex$,fullDataFormatter:n.fullDataFormatter$}).pipe(D(i),z(async u=>u),L(u=>u.fullDataFormatter.valueLabels[u.xyValueIndex[0]]??""),K(),se(1)),s=G({xyValueIndex:n.xyValueIndex$,valueLabel:a,computedData:n.computedData$,fullParams:n.fullParams$}).pipe(D(i),z(async u=>u),L(u=>FN({valueIndex:u.xyValueIndex[0],valueLabel:u.valueLabel,computedData:u.computedData,renderFn:u.fullParams.renderFn,textAttrs:u.fullParams.textAttrs,textStyles:u.fullParams.textStyles})),se(1)),l=[];return o.pipe(D(i)).subscribe(u=>{l.forEach(c=>c()),u.each((c,h,f)=>{const p=j(f[h]);n.visibleComputedRankingByIndexData$.pipe(D(i),L(d=>d[h]??d[0])),n.containerPosition$.pipe(D(i),L(d=>d[h]??d[0])),l[h]=zN(ba,{containerSelection:p,textData$:s,fullParams$:n.fullParams$,valueLabel$:a,xyValueIndex$:n.xyValueIndex$,containerSize$:n.containerSize$})})}),()=>{i.next(void 0),l.forEach(u=>u())}}),GN=6,WN="middle",YN="hanging",VN="start",jN="hanging";function XN({selection:e,position:t,xLabelClassName:n,fullParams:r,containerSize:i,fullDataFormatter:o,fullChartParams:a}){let l=r.tickPadding+r.labelOffset[0],u,c;t==="top"?(u=0,c=-r.tickPadding-r.labelOffset[1]):(u=i.height,c=r.tickPadding+r.labelOffset[1]);let h=c;e.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).each((f,p,d)=>{j(d[p]).selectAll("text").data([f]).join(g=>g.append("text").style("font-weight","bold"),g=>g,g=>g.remove()).attr("text-anchor",VN).attr("dominant-baseline",jN).attr("font-size",a.styles.textSize).style("fill",be(r.labelColorType,a)).attr("x",l).attr("y",h).text(g=>o.xAxis.label)}).attr("transform",f=>`translate(${i.width}, ${u})`)}function UN({selection:e,position:t,xAxisClassName:n,fullParams:r,containerSize:i,fullChartParams:o,xScale:a,transitionDuration:s}){let l,u;t==="top"?(l=0,u=Rc(a)):(l=i.height,u=om(a));const c=e.selectAll(`g.${n}`).data([r]).join("g").classed(n,!0).attr("transform",`translate(0, ${l})`);let h=r.tickPadding;const f=u.scale(a).ticks(r.ticks).tickFormat(g=>On(g,r.tickFormat)).tickSize(r.tickFullLine==!0?-i.height:GN).tickSizeOuter(-i.height).tickPadding(h),p=c.transition().duration(s).ease(Zt).call(f);return p.selectAll("line").style("fill","none").style("stroke",r.tickLineVisible==!0?be(r.tickColorType,o):"none").style("stroke-dasharray",r.tickFullLineDasharray).attr("pointer-events","none"),p.selectAll("path").style("fill","none").style("stroke",r.axisLineVisible==!0?be(r.axisLineColorType,o):"none").style("shape-rendering","crispEdges"),c.selectAll("text").attr("font-size",o.styles.textSize).style("color",be(r.tickTextColorType,o)).attr("text-anchor",WN).attr("dominant-baseline",YN).attr("dy",0),c}const Kp=(e,{selection:t,position$:n,computedData$:r,fullParams$:i,fullDataFormatter$:o,fullChartParams$:a,isCategorySeprate$:s,containerPosition$:l,containerSize$:u,xScale$:c,transitionDuration$:h})=>{const f=new Q,p=q(e,"xAxisG"),d=q(e,"xAxis"),g=q(e,"xLabel"),b=ya({selection:t,pluginName:e,clipPathID:null,computedData$:r,containerPosition$:l,isCategorySeprate$:s}).pipe(D(f)).pipe(D(f),L((y,x)=>y.selectAll(`g.${p}`).data([p]).join("g").classed(p,!0)));return G({axisSelection:b,position:n,fullParams:i,computedData:r,containerSize:u,fullDataFormatter:o,fullChartParams:a,xScale:c,transitionDuration:h}).pipe(D(f),z(async y=>y)).subscribe(y=>{UN({selection:y.axisSelection,position:y.position,xAxisClassName:d,fullParams:y.fullParams,containerSize:y.containerSize,fullChartParams:y.fullChartParams,xScale:y.xScale,transitionDuration:y.transitionDuration}),XN({selection:y.axisSelection,position:y.position,xLabelClassName:g,fullParams:y.fullParams,containerSize:y.containerSize,fullDataFormatter:y.fullDataFormatter,fullChartParams:y.fullChartParams})}),()=>{f.next(void 0)}},M2="RacingValueAxis",HN=kt({name:M2,defaultParams:Up,layerIndex:zt,validator:(e,{validateColumns:t})=>{const n=t(e,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});return n.status==="error",n}})(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=n.fullChartParams$.pipe(D(i),L(s=>s.transitionDuration),K()),a=Kp(M2,{selection:e,position$:Wt("top"),transitionDuration$:o,computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,isCategorySeprate$:n.isCategorySeprate$,containerPosition$:n.containerPosition$,containerSize$:n.containerSize$,xScale$:n.xScale$});return()=>{i.next(void 0),a()}}),Sn="Scatter",qN={name:Sn,defaultParams:w2,layerIndex:gu,validator:(e,{validateColumns:t})=>t(e,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]}})};function ZN({graphicGSelection:e,circleGClassName:t,circleClassName:n,visibleComputedXYData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const h=c.size();return o.transitionDuration/h};let l=0;return e.each((c,h,f)=>{j(f[h]).selectAll("g").data(r[h],p=>p.id).join(p=>(l=s(p),p.append("g").classed(t,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{j(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((b,y)=>d*l).attr("opacity",1),m=>m.transition().duration(50).attr("opacity",1),m=>m.remove()).attr("r",i.radius).attr("fill",(m,b)=>Se({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,b)=>Se({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),e.selectAll(`circle.${n}`)}function KN({selection:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.id)?j(o[i]).style("opacity",1).transition("highlight").duration(200):j(o[i]).style("opacity",n.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function QN({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const JN=kt(qN)(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=it(Sn,"clipPath-box"),a=q(Sn,"circleG"),s=q(Sn,"circle"),{categorySelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:h}=qp({selection:e,pluginName:Sn,clipPathID:o,categoryLabels$:r.categoryLabels$,containerPosition$:r.containerPosition$,graphicTransform$:r.graphicTransform$}),f=G({computedData:r.computedData$,graphicReverseScale:r.graphicReverseScale$}).pipe(D(i),z(async g=>g),L(g=>g.computedData.map((m,b)=>g.graphicReverseScale[b])));G({defsSelection:c,layout:r.layout$}).pipe(D(i),z(async g=>g)).subscribe(g=>{const m=[{id:o,width:g.layout.width,height:g.layout.height}];QN({defsSelection:g.defsSelection,clipPathData:m})});const p=G({graphicGSelection:h,visibleComputedXYData:r.visibleComputedXYData$,graphicReverseScale:f,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(D(i),z(async g=>g),L(g=>ZN({graphicGSelection:g.graphicGSelection,circleGClassName:a,circleClassName:s,visibleComputedXYData:g.visibleComputedXYData,fullParams:g.fullParams,fullChartParams:g.fullChartParams,graphicReverseScale:g.graphicReverseScale}))),d=r.fullChartParams$.pipe(D(i),L(g=>g.highlightTarget),K());return G({graphicSelection:p,computedData:r.computedData$,CategoryDataMap:r.CategoryDataMap$,highlightTarget:d}).pipe(D(i),z(async g=>g)).subscribe(g=>{g.graphicSelection.on("mouseover",(m,b)=>{n.event$.next({type:"multiValue",eventName:"mouseover",pluginName:Sn,highlightTarget:g.highlightTarget,datum:b,category:g.CategoryDataMap.get(b.categoryLabel),categoryIndex:b.categoryIndex,categoryLabel:b.categoryLabel,data:g.computedData,event:m})}).on("mousemove",(m,b)=>{n.event$.next({type:"multiValue",eventName:"mousemove",pluginName:Sn,highlightTarget:g.highlightTarget,datum:b,category:g.CategoryDataMap.get(b.categoryLabel),categoryIndex:b.categoryIndex,categoryLabel:b.categoryLabel,data:g.computedData,event:m})}).on("mouseout",(m,b)=>{n.event$.next({type:"multiValue",eventName:"mouseout",pluginName:Sn,highlightTarget:g.highlightTarget,datum:b,category:g.CategoryDataMap.get(b.categoryLabel),categoryIndex:b.categoryIndex,categoryLabel:b.categoryLabel,data:g.computedData,event:m})}).on("click",(m,b)=>{n.event$.next({type:"multiValue",eventName:"click",pluginName:Sn,highlightTarget:g.highlightTarget,datum:b,category:g.CategoryDataMap.get(b.categoryLabel),categoryIndex:b.categoryIndex,categoryLabel:b.categoryLabel,data:g.computedData,event:m})})}),G({graphicSelection:p,highlight:r.highlight$.pipe(L(g=>g.map(m=>m.id))),fullChartParams:r.fullChartParams$}).pipe(D(i),z(async g=>g)).subscribe(g=>{KN({selection:g.graphicSelection,ids:g.highlight,fullChartParams:g.fullChartParams})}),()=>{i.next(void 0)}}),_n="ScatterBubbles",eF=.9,tF={name:_n,defaultParams:T2,layerIndex:gu,validator:(e,{validateColumns:t})=>t(e,{fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},valueLinearOpacity:{toBeTypes:["number[]"]},arcScaleType:{toBe:"ArcScaleType",test:r=>r==="area"||r==="radius"},sizeAdjust:{toBeTypes:["number"]}})};function nF({graphicGSelection:e,circleGClassName:t,circleClassName:n,bubbleData:r,fullParams:i,fullChartParams:o,graphicReverseScale:a}){const s=c=>{const h=c.size();return o.transitionDuration/h};let l=0;return e.each((c,h,f)=>{j(f[h]).selectAll("g").data(r[h],p=>p.id).join(p=>(l=s(p),p.append("g").classed(t,!0)),p=>p,p=>p.remove()).attr("transform",p=>`translate(${p.axisX}, ${p.axisY})`).each((p,d,g)=>{j(g[d]).selectAll("circle").data([p]).join(m=>m.append("circle").style("cursor","pointer").style("vector-effect","non-scaling-stroke").classed(n,!0).attr("opacity",0).transition().delay((b,y)=>d*l).attr("opacity",.8),m=>m.transition().duration(50).attr("opacity",.8),m=>m.remove()).attr("r",m=>m.r).attr("fill",(m,b)=>Se({datum:m,colorType:i.fillColorType,fullChartParams:o})).attr("stroke",(m,b)=>Se({datum:m,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("transform",`scale(${a[h][0]??1}, ${a[h][1]??1})`)})}),e.selectAll(`circle.${n}`)}function rF({selection:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",r=>r.opacity);return}e.each((r,i,o)=>{t.includes(r.id)?j(o[i]).style("opacity",s=>s.opacity).transition("highlight").duration(200):j(o[i]).style("opacity",n.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function iF({defsSelection:e,clipPathData:t}){e.selectAll("clipPath").data(t).join(n=>n.append("clipPath"),n=>n,n=>n.remove()).attr("id",n=>n.id).each((n,r,i)=>{j(i[r]).selectAll("rect").data([n]).join("rect").attr("x",0).attr("y",0).attr("width",o=>o.width).attr("height",o=>o.height)})}const oF=kt(tF)(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=it(_n,"clipPath-box"),a=q(_n,"circleG"),s=q(_n,"circle"),{categorySelection$:l,axesSelection$:u,defsSelection$:c,graphicGSelection$:h}=qp({selection:e,pluginName:_n,clipPathID:o,categoryLabels$:r.categoryLabels$,containerPosition$:r.containerPosition$,graphicTransform$:r.graphicTransform$}),f=G({computedData:r.computedData$,graphicReverseScale:r.graphicReverseScale$}).pipe(D(i),z(async _=>_),L(_=>_.computedData.map((P,M)=>_.graphicReverseScale[M])));G({defsSelection:c,layout:r.layout$}).pipe(D(i),z(async _=>_)).subscribe(_=>{const P=[{id:o,width:_.layout.width,height:_.layout.height}];iF({defsSelection:_.defsSelection,clipPathData:P})});const p=r.filteredXYMinMaxData$.pipe(D(i),L(_=>_.datumList.flat().map(P=>P.value[2]??0)),se(1)),d=r.filteredXYMinMaxData$.pipe(D(i),L(_=>lc(_.datumList.flat().map(P=>P.value[2]??0)))),g=G({filteredMinMaxValue:d,fullParams:r.fullParams$}).pipe(D(i),z(async _=>_),L(_=>Sr().domain(_.filteredMinMaxValue).range(_.fullParams.valueLinearOpacity))),m=G({layout:r.layout$,fullParams:r.fullParams$}).pipe(D(i),L(_=>Math.min(_.layout.width,_.layout.height)/2*_.fullParams.sizeAdjust)),b=p.pipe(D(i),L(_=>_.reduce((P,M)=>P+M,0)),Ir(_=>_>0)),y=G({totalR:m,totalValue:b,fullParams:r.fullParams$}).pipe(D(i),z(async _=>_),L(_=>In().domain([0,_.totalValue]).range([0,_.totalR]).exponent(_.fullParams.arcScaleType==="area"?.5:1))),x=G({radiusScale:y,fullParams:r.fullParams$,totalR:m,filteredValueList:p}).pipe(D(i),z(async _=>_),L(_=>_.fullParams.arcScaleType==="area"?1:(()=>{const P=_.totalR*_.totalR*Math.PI;return Math.sqrt(P/Lc(_.filteredValueList,M=>Math.PI*Math.pow(_.radiusScale(M),2)))})())),$=G({visibleComputedXYData:r.visibleComputedXYData$,opacityScale:g,radiusScale:y,scaleFactor:x,fullParams:r.fullParams$}).pipe(D(i),z(async _=>_),L(_=>_.visibleComputedXYData.map(P=>P.map(M=>{const R=M;return R.r=_.radiusScale(R.value[2])*_.scaleFactor*eF,R.opacity=_.opacityScale(R.value[2]),R})))),S=G({graphicGSelection:h,bubbleData:$,graphicReverseScale:f,fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(D(i),z(async _=>_),L(_=>nF({graphicGSelection:_.graphicGSelection,circleGClassName:a,circleClassName:s,bubbleData:_.bubbleData,fullParams:_.fullParams,fullChartParams:_.fullChartParams,graphicReverseScale:_.graphicReverseScale}))),A=r.fullChartParams$.pipe(D(i),L(_=>_.highlightTarget),K());return G({graphicSelection:S,computedData:r.computedData$,CategoryDataMap:r.CategoryDataMap$,highlightTarget:A}).pipe(D(i),z(async _=>_)).subscribe(_=>{_.graphicSelection.on("mouseover",(P,M)=>{n.event$.next({type:"multiValue",eventName:"mouseover",pluginName:_n,highlightTarget:_.highlightTarget,datum:M,category:_.CategoryDataMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,data:_.computedData,event:P})}).on("mousemove",(P,M)=>{n.event$.next({type:"multiValue",eventName:"mousemove",pluginName:_n,highlightTarget:_.highlightTarget,datum:M,category:_.CategoryDataMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,data:_.computedData,event:P})}).on("mouseout",(P,M)=>{n.event$.next({type:"multiValue",eventName:"mouseout",pluginName:_n,highlightTarget:_.highlightTarget,datum:M,category:_.CategoryDataMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,data:_.computedData,event:P})}).on("click",(P,M)=>{n.event$.next({type:"multiValue",eventName:"click",pluginName:_n,highlightTarget:_.highlightTarget,datum:M,category:_.CategoryDataMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,data:_.computedData,event:P})})}),G({graphicSelection:S,highlight:r.highlight$.pipe(L(_=>_.map(P=>P.id))),fullChartParams:r.fullChartParams$}).pipe(D(i),z(async _=>_)).subscribe(_=>{rF({selection:_.graphicSelection,ids:_.highlight,fullChartParams:_.fullChartParams})}),()=>{i.next(void 0)}}),L2="XAxis",aF=kt({name:L2,defaultParams:Hp,layerIndex:zt,validator:(e,{validateColumns:t})=>{const n=t(e,{labelOffset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});return n.status==="error",n}})(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=Kp(L2,{selection:e,position$:Wt("bottom"),transitionDuration$:Wt(100),computedData$:n.computedData$,fullParams$:n.fullParams$,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,isCategorySeprate$:n.isCategorySeprate$,containerPosition$:n.containerPosition$,containerSize$:n.containerSize$,xScale$:n.xScale$});return()=>{i.next(void 0),o()}}),$u="XYAux",Qp=q($u,"label-box"),sF={name:$u,defaultParams:bu,layerIndex:Pv,validator:(e,{validateColumns:t})=>{const n=t(e,{xAxis:{toBeTypes:["object"]},yAxis:{toBeTypes:["object"]}});if(e.xAxis){const r=t(e.xAxis,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]}});if(r.status==="error")return r}if(e.yAxis){const r=t(e.yAxis,{showLine:{toBeTypes:["boolean"]},showLabel:{toBeTypes:["boolean"]},lineDashArray:{toBeTypes:["string"]},lineColorType:{toBeOption:"ColorType"},labelColorType:{toBeOption:"ColorType"},labelTextColorType:{toBeOption:"ColorType"},labelTextFormat:{toBeTypes:["string","Function"]},labelPadding:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function lF({axisX:e,axisY:t,layout:n,fullParams:r}){return e>=0&&e<=n.width&&t>=0&&t<=n.height?[{id:"line-x",x1:e,x2:e,y1:0,y2:n.height,dashArray:r.xAxis.lineDashArray??"none",colorType:r.xAxis.lineColorType},{id:"line-0",x1:0,x2:n.width,y1:t,y2:t,dashArray:r.yAxis.lineDashArray??"none",colorType:r.yAxis.lineColorType}]:[]}function uF({axisX:e,axisY:t,xValue:n,yValue:r,fullParams:i,textSizePx:o,layout:a,columnAmount:s,rowAmount:l}){if(!(e>=0&&e<=a.width&&t>=0&&t<=a.height))return[];const u=6,c=3,h=e,f=a.height+i.xAxis.labelPadding*l,p=On(n,i.xAxis.labelTextFormat),d=p.split(`
|
183
|
+
`),g=d.reduce((I,W)=>W.length>I.length?W:I,""),m=da(g,o),b=o*d.length,y=m+u*2,x=b+c*2,$=-y/2,S=-c,A=$+u,_=S+c,P=-(i.yAxis.labelPadding*s),M=t,R=On(r,i.yAxis.labelTextFormat),v=R.split(`
|
184
|
+
`),E=v.reduce((I,W)=>W.length>I.length?W:I,""),k=da(E,o),T=o*v.length,w=k+u*2,C=T+c*2,F=-k-u,O=-c-T/2,B=F+u,N=O+c;return[{id:"label-x",x:h,y:f,text:p,textArr:d,textWidth:m,textHeight:b,colorType:i.xAxis.labelColorType,textColorType:i.xAxis.labelTextColorType,rectWidth:y,rectHeight:x,rectX:$,rectY:S,textX:A,textY:_},{id:"label-y",x:P,y:M,text:R,textArr:v,textWidth:k,textHeight:T,colorType:i.yAxis.labelColorType,textColorType:i.xAxis.labelTextColorType,rectWidth:w,rectHeight:C,rectX:F,rectY:O,textX:B,textY:N}]}function cF({selection:e,pluginName:t,lineData:n,fullParams:r,fullChartParams:i}){const o=q(t,"auxline");return e.selectAll(`line.${o}`).data(n).join(s=>s.append("line").classed(o,!0).style("stroke-width",1).style("pointer-events","none").style("vector-effect","non-scaling-stroke").attr("x1",l=>l.x1).attr("y1",l=>l.y1).attr("x2",l=>l.x2).attr("y2",l=>l.y2),s=>s.transition().duration(50).attr("x1",u=>u.x1).attr("y1",u=>u.y1).attr("x2",u=>u.x2).attr("y2",u=>u.y2),s=>s.remove()).style("stroke",s=>be(s.colorType,i)).style("stroke-dasharray",s=>s.dashArray)}function fF(e){e.selectAll("line").data([]).exit().remove()}function hF({selection:e,labelData:t,fullParams:n,fullDataFormatter:r,fullChartParams:i,textReverseTransform:o,textSizePx:a}){return e.selectAll(`g.${Qp}`).data(t).join(l=>l.append("g").classed(Qp,!0).style("cursor","pointer").attr("transform",(u,c)=>`translate(${u.x}, ${u.y})`),l=>l.transition().duration(50).attr("transform",(c,h)=>`translate(${c.x}, ${c.y})`),l=>l.remove()).each((l,u,c)=>{j(c[u]).selectAll("rect").data([l]).join(h=>h.append("rect").style("cursor","pointer").attr("rx",5).attr("ry",5),h=>h,h=>h.remove()).attr("width",h=>`${h.rectWidth}px`).attr("height",h=>`${h.rectHeight}px`).attr("fill",h=>be(h.colorType,i)).attr("x",h=>h.rectX).attr("y",h=>h.rectY).style("transform",o),j(c[u]).selectAll("text").data([l]).join(h=>h.append("text").style("dominant-baseline","hanging").style("cursor","pointer").style("pointer-events","none"),h=>h,h=>h.remove()).style("transform",o).attr("fill",h=>be(h.textColorType,i)).attr("font-size",i.styles.textSize).attr("x",h=>h.textX).attr("y",h=>h.textY).each((h,f,p)=>{Cp(j(p[f]),{textArr:l.textArr,textSizePx:a,groupAxisPosition:f===0?"bottom":"left",isContainerRotated:!1})})})}function pF(e){e.selectAll(`g.${Qp}`).data([]).exit().remove()}const dF=kt(sF)(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=t.insert("rect","g").classed(q($u,"rect"),!0).attr("opacity",0),{categorySelection$:s,axesSelection$:l,defsSelection$:u,graphicGSelection$:c}=qp({selection:e,pluginName:$u,clipPathID:"test",categoryLabels$:i.isCategorySeprate$.pipe(z(m=>Yn(()=>m,i.categoryLabels$,i.categoryLabels$.pipe(L(b=>[b[0]]))))),containerPosition$:i.containerPosition$,graphicTransform$:i.graphicTransform$});i.layout$.pipe(D(o)).subscribe(m=>{a.attr("width",m.rootWidth).attr("height",m.rootHeight)});const h=i.containerPosition$.pipe(L(m=>m.reduce((y,x)=>x.columnIndex>y?x.columnIndex:y,0)+1),K()),f=i.containerPosition$.pipe(L(m=>m.reduce((y,x)=>x.rowIndex>y?x.rowIndex:y,0)+1),K()),p=i.containerPosition$.pipe(D(o),z(async m=>m),L(m=>`${`scale(${1/m[0].scale[0]}, ${1/m[0].scale[1]})`}`),K()),d=pN({rootSelection:t,fullDataFormatter$:i.fullDataFormatter$,filteredXYMinMaxData$:i.filteredXYMinMaxData$,containerPosition$:i.containerPosition$,layout$:i.layout$}).pipe(D(o));G({axesSelection:l,layout:i.layout$,xyPosition:d,fullParams:i.fullParams$,fullDataFormatter:i.fullDataFormatter$,fullChartParams:i.fullChartParams$,textReverseTransform:p,textSizePx:i.textSizePx$,columnAmount:h,rowAmount:f}).pipe(D(o),z(async m=>m)).subscribe(m=>{const{x:b,y,xValue:x,yValue:$}=m.xyPosition,S=lF({axisX:b,axisY:y,layout:m.layout,fullParams:m.fullParams});cF({selection:m.axesSelection,pluginName:n,lineData:S,fullParams:m.fullParams,fullChartParams:m.fullChartParams});const A=uF({axisX:b,axisY:y,xValue:x,yValue:$,fullParams:m.fullParams,textSizePx:m.textSizePx,layout:m.layout,columnAmount:m.columnAmount,rowAmount:m.rowAmount});hF({selection:m.axesSelection,labelData:A,fullParams:m.fullParams,fullDataFormatter:m.fullDataFormatter,fullChartParams:m.fullChartParams,textReverseTransform:m.textReverseTransform,textSizePx:m.textSizePx})});const g=ga(a,"mouseout").pipe(D(o));return G({rootRectMouseout:g,axesSelection:l}).pipe(D(o),z(async m=>m)).subscribe(m=>{setTimeout(()=>{fF(m.axesSelection),pF(m.axesSelection)})}),()=>{o.next(void 0),a.remove()}}),gF=6,mF="end",yF="middle",bF="end",xF="auto";function $F({selection:e,yLabelClassName:t,fullParams:n,containerSize:r,fullDataFormatter:i,fullChartParams:o}){const a=n.tickPadding-n.labelOffset[0],s=n.tickPadding+n.labelOffset[1];let l=-a,u=-s;e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!0).each((c,h,f)=>{j(f[h]).selectAll("text").data([c]).join(p=>p.append("text").style("font-weight","bold"),p=>p,p=>p.remove()).attr("text-anchor",bF).attr("dominant-baseline",xF).attr("font-size",o.styles.textSize).style("fill",be(n.labelColorType,o)).attr("x",l).attr("y",u).text(p=>i.yAxis.label)})}function vF({selection:e,yAxisClassName:t,fullParams:n,containerSize:r,fullDataFormatter:i,fullChartParams:o,yScale:a}){const s=e.selectAll(`g.${t}`).data([n]).join("g").classed(t,!0);let l=n.tickPadding;const u=Ec(a).scale(a).ticks(n.ticks).tickFormat(h=>On(h,n.tickFormat)).tickSize(n.tickFullLine==!0?-r.width:gF).tickPadding(l),c=s.transition().duration(100).ease(Zt).call(u);return c.selectAll("line").style("fill","none").style("stroke",n.tickLineVisible==!0?be(n.tickColorType,o):"none").style("stroke-dasharray",n.tickFullLineDasharray).attr("pointer-events","none"),c.selectAll("path").style("fill","none").style("stroke",n.axisLineVisible==!0?be(n.axisLineColorType,o):"none").style("shape-rendering","crispEdges"),s.selectAll("text").attr("font-size",o.styles.textSize).style("color",be(n.tickTextColorType,o)).attr("text-anchor",mF).attr("dominant-baseline",yF).attr("x",-l).attr("dy",0),s}const SF=(e,{selection:t,computedData$:n,fullParams$:r,fullDataFormatter$:i,fullChartParams$:o,isCategorySeprate$:a,containerPosition$:s,containerSize$:l,yScale$:u})=>{const c=new Q,h=q(e,"yAxisG"),f=q(e,"yAxis"),p=q(e,"yLabel"),g=ya({selection:t,pluginName:e,clipPathID:null,computedData$:n,containerPosition$:s,isCategorySeprate$:a}).pipe(D(c)).pipe(D(c),L((m,b)=>m.selectAll(`g.${h}`).data([h]).join("g").classed(h,!0)));return G({axisSelection:g,fullParams:r,computedData:n,containerSize:l,fullDataFormatter:i,fullChartParams:o,yScale:u}).pipe(D(c),z(async m=>m)).subscribe(m=>{vF({selection:m.axisSelection,yAxisClassName:f,fullParams:m.fullParams,containerSize:m.containerSize,fullDataFormatter:m.fullDataFormatter,fullChartParams:m.fullChartParams,yScale:m.yScale}),$F({selection:m.axisSelection,yLabelClassName:p,fullParams:m.fullParams,containerSize:m.containerSize,fullDataFormatter:m.fullDataFormatter,fullChartParams:m.fullChartParams})}),()=>{c.next(void 0)}},Jp="XYAxes",_F=kt({name:Jp,defaultParams:xu,layerIndex:zt,validator:(e,{validateColumns:t})=>{const n=t(e,{xAxis:{toBeTypes:["object"]},yAxis:{toBeTypes:["object"]}});if(e.xAxis){const r=t(e.xAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}if(e.yAxis){const r=t(e.yAxis,{labelOffset:{toBe:"[number, number]",test:i=>Array.isArray(i)&&i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"},labelColorType:{toBeOption:"ColorType"},axisLineVisible:{toBeTypes:["boolean"]},axisLineColorType:{toBeOption:"ColorType"},ticks:{toBeTypes:["number","null"]},tickFormat:{toBeTypes:["string","Function"]},tickLineVisible:{toBeTypes:["boolean"]},tickPadding:{toBeTypes:["number"]},tickFullLine:{toBeTypes:["boolean"]},tickFullLineDasharray:{toBeTypes:["string"]},tickColorType:{toBeOption:"ColorType"},tickTextColorType:{toBeOption:"ColorType"}});if(r.status==="error")return r}return n}})(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,o=n.fullParams$.pipe(D(i),L(u=>u.xAxis),K((u,c)=>JSON.stringify(u)===JSON.stringify(c))),a=n.fullParams$.pipe(D(i),L(u=>u.xAxis),K((u,c)=>JSON.stringify(u)===JSON.stringify(c))),s=Kp(`${Jp}-x`,{selection:e,position$:Wt("bottom"),transitionDuration$:Wt(100),computedData$:n.computedData$,fullParams$:o,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,isCategorySeprate$:n.isCategorySeprate$,containerPosition$:n.containerPosition$,containerSize$:n.containerSize$,xScale$:n.xScale$}),l=SF(`${Jp}-y`,{selection:e,computedData$:n.computedData$,fullParams$:a,fullDataFormatter$:n.fullDataFormatter$,fullChartParams$:n.fullChartParams$,isCategorySeprate$:n.isCategorySeprate$,containerPosition$:n.containerPosition$,containerSize$:n.containerSize$,yScale$:n.yScale$});return()=>{i.next(void 0),s(),l()}}),wF=kt({name:"XZoom",defaultParams:A2,layerIndex:Av,validator:(e,{validateColumns:t})=>({status:"success",columnName:"",expectToBe:""})})(({selection:e,rootSelection:t,name:n,observer:r,subject:i})=>{const o=new Q;let a={k:1,x:0,y:0};const s=r.fullDataFormatter$.pipe(L(h=>h.xAxis),Xi()),l=r.fullDataFormatter$.pipe(L(h=>h.yAxis),Xi()),u=new ge(h=>{G({initXAxis:s,layout:r.layout$,xyMinMax:r.xyMinMax$}).pipe(D(o),z(async f=>f)).subscribe(f=>{const p=xc({maxValue:f.xyMinMax.maxX,minValue:f.xyMinMax.minX,axisWidth:f.layout.width,scaleDomain:f.initXAxis.scaleDomain,scaleRange:f.initXAxis.scaleRange});h.next(p)})}),c=G({initXAxis:s,initYAxis:l,xyMinMax:r.xyMinMax$}).pipe(D(o),z(async h=>h),L(h=>{let f=h.xyMinMax.minX,p=h.xyMinMax.maxX,d=h.xyMinMax.minY,g=h.xyMinMax.maxY;return h.initXAxis.scaleDomain[0]==="auto"&&f>0&&(f=0),h.initXAxis.scaleDomain[1]==="auto"&&p<0&&(p=0),h.initYAxis.scaleDomain[0]==="auto"&&d>0&&(d=0),h.initYAxis.scaleDomain[1]==="auto"&&g<0&&(g=0),{minX:f,maxX:p,minY:d,maxY:g}}));return G({initXScale:u,fullDataFormatter:r.fullDataFormatter$,minMaxScaleDomain:c}).pipe(D(o),z(async h=>h)).subscribe(h=>{const f=h.initXScale.copy(),p=vn().on("zoom",function(g){const m=g.transform,b=$=>{const S=Math.round($);return Math.min(h.minMaxScaleDomain.maxX,Math.max(h.minMaxScaleDomain.minX,S))},y=m.rescaleX(f).domain().map(b);y[0]<=h.minMaxScaleDomain.minX&&y[1]>=h.minMaxScaleDomain.maxX?m.k<a.k&&(m.k=a.k,m.x=a.x,m.y=a.y):y[1]-y[0]<=1&&m.k>a.k&&(m.k=a.k,m.x=a.x,m.y=a.y),a.k=m.k,a.x=m.x,a.y=m.y;const x={...h.fullDataFormatter,xAxis:{...h.fullDataFormatter.xAxis,scaleDomain:y}};i.dataFormatter$.next(x)});t.call(p)}),()=>{o.next(void 0),t.call(vn().on("zoom",null))}}),TF={header:{height:36,text:[],textStyle:[]},footer:{height:0,text:[],textStyle:[]}},k2={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,textRenderFn:e=>{if(e.highlightTarget==="datum"&&e.datum)return[`${e.datum.label}: ${e.datum.value}`];if(e.highlightTarget==="series"){const t=e.seriesLabel,n=e.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[t,r]}else if(e.highlightTarget==="group"){const t=e.groupLabel,n=e.series.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[t,r]}else if(e.highlightTarget==="category"){const t=e.categoryLabel,n=e.category.filter(i=>i.visible==!0).map(i=>i.value),r=n.length>5?n.slice(0,5).join(",")+"...":n.join(",");return[t,r]}return[]},svgRenderFn:null};k2.textRenderFn.toString=()=>`(eventData) => {
|
128
185
|
if (eventData.highlightTarget === 'datum' && eventData.datum) {
|
129
186
|
return [\`\${eventData.datum.label}: \${eventData.datum.value}\`]
|
130
187
|
} else if (eventData.highlightTarget === 'series') {
|
@@ -162,58 +219,59 @@ ${c}`}};Dp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
|
162
219
|
return [label, value]
|
163
220
|
}
|
164
221
|
return []
|
165
|
-
}`;const
|
166
|
-
<text x="${
|
167
|
-
<tspan>${
|
168
|
-
</text>`:"",
|
169
|
-
${
|
170
|
-
</text>`;return`${
|
171
|
-
<g ${r?`transform="translate(0, ${
|
172
|
-
${
|
173
|
-
</g>`}};
|
222
|
+
}`;const Oi={dot:{radius:10,fillColorType:"label",strokeColorType:"label",strokeWidth:1,styleFn:e=>""},dotLabel:{colorType:"primary",sizeFixed:!1,styleFn:e=>"text-shadow:0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff"},arrow:{colorType:"primary",strokeWidth:1.5,pointerWidth:5,pointerHeight:5,styleFn:e=>""},arrowLabel:{colorType:"primary",sizeFixed:!1,styleFn:e=>""},force:{nodeStrength:-500,linkDistance:100,velocityDecay:.1,alphaDecay:.05},zoomable:!0,transform:{x:0,y:0,k:1},scaleExtent:{min:0,max:1/0}};Oi.dot.styleFn.toString=()=>"(node) => ''",Oi.dotLabel.styleFn.toString=()=>"(node) => 'text-shadow:0 1px 0 #fff, 1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff'",Oi.arrow.styleFn.toString=()=>"(edge) => ''",Oi.arrowLabel.styleFn.toString=()=>"(edge) => ''";const Gi={bubble:{radiusMin:15,radiusMax:45,arcScaleType:"area",fillColorType:"label",strokeColorType:"label",strokeWidth:1,styleFn:e=>""},bubbleLabel:{fillRate:.9,lineHeight:1,maxLineLength:6,wordBreakAll:!0,colorType:"labelContrast",styleFn:e=>""},arrow:{colorType:"primary",strokeWidthMin:1.5,strokeWidthMax:4.5,pointerWidth:5,pointerHeight:5,styleFn:e=>""},arrowLabel:{colorType:"primary",sizeFixed:!1,styleFn:e=>""},force:{nodeStrength:-500,linkDistance:130,velocityDecay:.1,alphaDecay:.05},zoomable:!0,transform:{x:0,y:0,k:1},scaleExtent:{min:0,max:1/0}};Gi.bubble.styleFn.toString=()=>"(node) => ''",Gi.bubbleLabel.styleFn.toString=()=>"(node) => ''",Gi.arrow.styleFn.toString=()=>"(edge) => ''",Gi.arrowLabel.styleFn.toString=()=>"(edge) => ''";const R2={placement:"right-end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},ed={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(e,{styles:t,utils:n})=>{const r=!!e.categoryLabel,i=!!e.datum.label,o=n.toCurrency(e.datum.value),a=t.textSizePx*.7,s=t.textSizePx/2-a/2,l=r?`<rect width="${a}" height="${a}" x="${s}" y="${s-1}" rx="${a/2}" fill="${e.datum.color}"></rect>
|
223
|
+
<text x="${t.textSizePx*1.5}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
224
|
+
<tspan>${e.categoryLabel}</tspan>
|
225
|
+
</text>`:"",u=i?`<tspan>${e.datum.label}</tspan> `:"",c=r?n.measureTextWidth(`${e.categoryLabel}${o}`,t.textSizePx)+t.textSizePx*1.5:0,h=i?n.measureTextWidth(`${e.datum.label}${o}`,t.textSizePx):0,f=Math.max(c,h),p=i?f+t.textSizePx*.5:0,d=i?"end":"start",g=`<text font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
226
|
+
${u}<tspan font-weight="bold" text-anchor="${d}" x="${p}">${o}</tspan>
|
227
|
+
</text>`;return`${l}
|
228
|
+
<g ${r?`transform="translate(0, ${t.textSizePx*2})"`:""}>
|
229
|
+
${g}
|
230
|
+
</g>`}};ed.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
174
231
|
const hasCategoryLabel = eventData.categoryLabel ? true : false
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
</
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
</
|
232
|
+
const hasDatumLabel = eventData.datum.label ? true : false
|
233
|
+
const valueText = utils.toCurrency(eventData.datum.value)
|
234
|
+
const bulletWidth = styles.textSizePx * 0.7
|
235
|
+
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
236
|
+
const categorySvg = hasCategoryLabel
|
237
|
+
? \`<rect width="\${bulletWidth}" height="\${bulletWidth}" x="\${offset}" y="\${offset - 1}" rx="\${bulletWidth / 2}" fill="\${eventData.datum.color}"></rect>
|
238
|
+
<text x="\${styles.textSizePx * 1.5}" font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
239
|
+
<tspan>\${eventData.categoryLabel}</tspan>
|
240
|
+
</text>\`
|
241
|
+
: ''
|
242
|
+
const datumLabelSvg = hasDatumLabel
|
243
|
+
? \`<tspan>\${eventData.datum.label}</tspan> \`
|
244
|
+
: ''
|
245
|
+
const categoryLabelTextWidth = hasCategoryLabel
|
246
|
+
? utils.measureTextWidth(\`\${eventData.categoryLabel}\${valueText}\`, styles.textSizePx) + styles.textSizePx * 1.5
|
247
|
+
: 0
|
248
|
+
const datumLabelTextWidth = hasDatumLabel
|
249
|
+
? utils.measureTextWidth(\`\${eventData.datum.label}\${valueText}\`, styles.textSizePx)
|
250
|
+
: 0
|
251
|
+
const maxTextWidth = Math.max(categoryLabelTextWidth, datumLabelTextWidth)
|
252
|
+
const lineEndX = hasDatumLabel
|
253
|
+
? maxTextWidth + styles.textSizePx * 0.5
|
254
|
+
: 0
|
255
|
+
const valueTextAnchor = hasDatumLabel ? 'end' : 'start'
|
256
|
+
const datumSvg = \`<text font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
257
|
+
\${datumLabelSvg}<tspan font-weight="bold" text-anchor="\${valueTextAnchor}" x="\${lineEndX}">\${valueText}</tspan>
|
258
|
+
</text>\`
|
201
259
|
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
}`;const
|
207
|
-
${
|
208
|
-
${
|
260
|
+
return \`\${categorySvg}
|
261
|
+
<g \${hasCategoryLabel ? \`transform="translate(0, \${styles.textSizePx * 2})"\` : ''}>
|
262
|
+
\${datumSvg}
|
263
|
+
</g>\`
|
264
|
+
}`;const ze="ForceDirected",AF=q(ze,"zoom-area"),E2=it(ze,"arrow"),I2=q(ze,"arrow-marker"),PF=q(ze,"edge-list-g"),CF=q(ze,"edge-g"),B2=q(ze,"edge-arrow-path"),N2=q(ze,"edge-label-g"),F2=q(ze,"edge-label"),DF=q(ze,"node-list-g"),MF=q(ze,"node-g"),z2=q(ze,"node-circle"),O2=q(ze,"node-label-g"),G2=q(ze,"node-label"),LF={name:ze,defaultParams:Oi,layerIndex:ht,validator:(e,{validateColumns:t})=>{const n=t(e,{dot:{toBeTypes:["object"]},dotLabel:{toBeTypes:["object"]},arrow:{toBeTypes:["object"]},arrowLabel:{toBeTypes:["object"]},force:{toBeTypes:["object"]},zoomable:{toBeTypes:["boolean"]},transform:{toBeTypes:["object"]},scaleExtent:{toBeTypes:["object"]}});if(e.dot){const r=t(e.dot,{radius:{toBeTypes:["number"]},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.dotLabel){const r=t(e.dotLabel,{colorType:{toBeOption:"ColorType"},sizeFixed:{toBeTypes:["boolean"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.arrow){const r=t(e.arrow,{colorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},pointerWidth:{toBeTypes:["number"]},pointerHeight:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.arrowLabel){const r=t(e.arrowLabel,{colorType:{toBeOption:"ColorType"},sizeFixed:{toBeTypes:["boolean"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.force){const r=t(e.force,{nodeStrength:{toBeTypes:["number"]},linkDistance:{toBeTypes:["number"]},velocityDecay:{toBeTypes:["number"]},alphaDecay:{toBeTypes:["number"]}});if(r.status==="error")return r}if(e.transform){const r=t(e.transform,{x:{toBeTypes:["number"]},y:{toBeTypes:["number"]},k:{toBeTypes:["number"]}});if(r.status==="error")return r}if(e.scaleExtent){const r=t(e.scaleExtent,{min:{toBeTypes:["number"]},max:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function kF(e,t){return Hs().velocityDecay(t.force.velocityDecay).alphaDecay(t.force.alphaDecay).force("link",Gf().id(n=>n.id).strength(1).distance(n=>t.force.linkDistance)).force("charge",qs().strength(t.force.nodeStrength)).force("collision",Us(t.dot.radius).strength(1)).force("center",zf(e.width/2,e.height/2))}function RF(e){return"translate("+e.x+","+e.y+")"}function EF(e){const t=e.source.x+(e.target.x-e.source.x)/2,n=e.source.y+(e.target.y-e.source.y)/2;return"translate("+t+","+n+")"}function IF(e){return"M"+e.source.x+","+e.source.y+" L"+e.target.x+","+e.target.y}function BF(e,t){return e.selectAll(`marker.${I2}`).data([t]).join(n=>{const r=n.append("marker").classed(I2,!0).attr("id",E2).attr("viewBox",i=>`-${i.arrow.pointerWidth} -${i.arrow.pointerHeight/2} ${i.arrow.pointerWidth} ${i.arrow.pointerHeight}`).attr("orient","auto");return r.append("path").attr("d",i=>`M${-i.arrow.pointerWidth},${-i.arrow.pointerHeight/2}L0,0L${-i.arrow.pointerWidth},${i.arrow.pointerHeight/2}`),r},n=>n,n=>n.remove()).attr("markerWidth",n=>n.arrow.pointerWidth).attr("markerHeight",n=>n.arrow.pointerHeight).attr("refX",n=>(n.dot.radius+t.dot.strokeWidth/2)/n.arrow.strokeWidth-1).attr("refY",0)}function NF(e,t){function n(o,a){o.active||e.alphaTarget(.3).restart(),o.subject.fx=o.x,o.subject.fy=o.y,t.next("start")}function r(o,a){o.subject.fx=o.x,o.subject.fy=o.y,t.next("drag")}function i(o,a){o.active||e.alphaTarget(0),o.subject.fx=null,o.subject.fy=null,t.next("end")}return bs().on("start",n).on("drag",r).on("end",i)}function FF({nodeListGSelection:e,nodes:t}){return e.selectAll("g").data(t,n=>n.id).join(n=>n.append("g").classed(MF,!0),n=>n,n=>n.remove())}function zF({nodeGSelection:e,fullParams:t,fullChartParams:n}){return e.each((r,i,o)=>{j(o[i]).selectAll("circle").data([r]).join(s=>s.append("circle").classed(z2,!0).attr("cursor","pointer"),s=>s,s=>s.remove()).attr("r",t.dot.radius).attr("fill",s=>Se({datum:s,colorType:t.dot.fillColorType,fullChartParams:n})).attr("stroke",s=>Se({datum:s,colorType:t.dot.strokeColorType,fullChartParams:n})).attr("stroke-width",t.dot.strokeWidth).attr("style",s=>t.dot.styleFn(s))}),e.select(`circle.${z2}`)}function OF({nodeGSelection:e,fullParams:t}){return e.each((n,r,i)=>{j(i[r]).selectAll("g").data([n]).join(a=>a.append("g").classed(O2,!0),a=>a,a=>a.remove()).attr("transform",`translate(0, ${-t.dot.radius-10})`)}),e.select(`g.${O2}`)}function GF({nodeLabelGSelection:e,fullParams:t,fullChartParams:n}){return e.each((r,i,o)=>{j(o[i]).selectAll("text").data([r],s=>s.id).join(s=>s.append("text").classed(G2,!0).attr("text-anchor","middle").attr("pointer-events","none"),s=>s,s=>s.remove()).text(s=>s.label).attr("fill",s=>Se({datum:s,colorType:t.dotLabel.colorType,fullChartParams:n})).attr("font-size",n.styles.textSize).attr("style",s=>t.dotLabel.styleFn(s))}),e.select(`text.${G2}`)}function WF({edgeListGSelection:e,edges:t}){return e.selectAll("g").data(t,n=>n.id).join(n=>n.append("g").classed(CF,!0),n=>n,n=>n.remove())}function YF({edgeGSelection:e,fullParams:t,fullChartParams:n}){return e.each((r,i,o)=>{j(o[i]).selectAll("path").data([r]).join(s=>s.append("path").classed(B2,!0).attr("marker-end",`url(#${E2})`),s=>s,s=>s.remove()).attr("stroke",s=>Se({datum:s.data,colorType:t.arrow.colorType,fullChartParams:n})).attr("stroke-width",t.arrow.strokeWidth).attr("style",s=>t.arrow.styleFn(s))}),e.select(`path.${B2}`)}function VF({edgeGSelection:e}){return e.each((t,n,r)=>{j(r[n]).selectAll("g").data([t]).join(o=>o.append("g").classed(N2,!0),o=>o,o=>o.remove())}),e.select(`g.${N2}`)}function jF({edgeLabelGSelection:e,fullParams:t,fullChartParams:n}){return e.each((r,i,o)=>{j(o[i]).selectAll("text").data([r],s=>s.id).join(s=>s.append("text").classed(F2,!0).attr("text-anchor","middle").attr("pointer-events","none"),s=>s,s=>s.remove()).text(s=>s.label).attr("fill",s=>Se({datum:s,colorType:t.arrowLabel.colorType,fullChartParams:n})).attr("font-size",n.styles.textSize).attr("style",s=>t.arrowLabel.styleFn(s))}),e.select(`text.${F2}`)}function XF({nodeGSelection:e,edgeGSelection:t,highlightIds:n,fullChartParams:r}){if(e.interrupt("highlight"),t.interrupt("highlight"),!n.length){e.transition("highlight").style("opacity",1),t.transition("highlight").style("opacity",1);return}t.style("opacity",r.styles.unhighlightedOpacity),e.each((i,o,a)=>{const s=j(a[o]);n.includes(i.id)?s.style("opacity",1).transition("highlight").ease(cr).duration(500):s.style("opacity",r.styles.unhighlightedOpacity)})}const UF=es(LF)(({selection:e,rootSelection:t,name:n,observer:r,subject:i})=>{const o=new Q,a=e.append("g").classed(AF,!0),s=a.append("defs"),l=a.append("g").classed(PF,!0),u=a.append("g").classed(DF,!0);let c,h,f,p,d,g,m,b;const y=new ku("end"),x=new Q;r.fullParams$.pipe(D(o),L(_=>BF(s,_))).subscribe();const $=r.fullParams$.pipe(D(o),L(_=>{let P=_.zoomable?vn().on("zoom",M=>{a.attr("transform",`translate(
|
265
|
+
${M.transform.x},
|
266
|
+
${M.transform.y}
|
209
267
|
) scale(
|
210
|
-
${
|
211
|
-
)`),
|
268
|
+
${M.transform.k}
|
269
|
+
)`),_.dotLabel.sizeFixed&&p&&p.attr("transform",`scale(${1/M.transform.k})`),_.arrowLabel.sizeFixed&&b&&b.attr("transform",`scale(${1/M.transform.k})`)}):vn().on("zoom",null);return _.scaleExtent&&P.scaleExtent([_.scaleExtent.min,_.scaleExtent.max]),t.call(P),P}));G({d3Zoom:$,transform:r.fullParams$.pipe(D(o),L(_=>_.transform))}).pipe(D(o),z(async _=>_)).subscribe(_=>{e.call(_.d3Zoom.transform,Ri.translate(_.transform.x,_.transform.y).scale(_.transform.k))});const S=G({layout:r.layout$.pipe(Xi()),fullParams:r.fullParams$}).pipe(D(o),z(async _=>_),L(_=>kF(_.layout,_.fullParams)),se(1)),A=r.visibleComputedData$.pipe(D(o),L(_=>({nodes:_.nodes,edges:_.edges.map(P=>{let M=P;return M.source=P.startNode,M.target=P.endNode,M})})),se(1));return G({renderData:A,computedData:r.computedData$,CategoryNodeMap:r.CategoryNodeMap$,simulation:S,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(D(o),z(async _=>_)).subscribe(_=>{c=FF({nodeListGSelection:u,nodes:_.renderData.nodes}),h=zF({nodeGSelection:c,fullParams:_.fullParams,fullChartParams:_.fullChartParams}),c.call(NF(_.simulation,y)),f=OF({nodeGSelection:c,fullParams:_.fullParams}),p=GF({nodeLabelGSelection:f,fullParams:_.fullParams,fullChartParams:_.fullChartParams}),d=WF({edgeListGSelection:l,edges:_.renderData.edges}),g=YF({edgeGSelection:d,fullParams:_.fullParams,fullChartParams:_.fullChartParams}),m=VF({edgeGSelection:d}),b=jF({edgeLabelGSelection:m,fullParams:_.fullParams,fullChartParams:_.fullChartParams}),_.simulation.nodes(_.renderData.nodes).on("tick",()=>{g.attr("d",IF),c.attr("transform",RF),m.attr("transform",P=>EF(P))}),_.simulation.force("link").links(_.renderData.edges),_.simulation.alpha(.3).restart(),h.on("mouseover",(P,M)=>{P.stopPropagation(),x.next({type:"relationship",eventName:"mouseover",pluginName:ze,highlightTarget:_.fullChartParams.highlightTarget,datum:M,category:_.CategoryNodeMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,event:P,data:_.computedData})}).on("mousemove",(P,M)=>{P.stopPropagation(),x.next({type:"relationship",eventName:"mousemove",pluginName:ze,highlightTarget:_.fullChartParams.highlightTarget,datum:M,category:_.CategoryNodeMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,event:P,data:_.computedData})}).on("mouseout",(P,M)=>{P.stopPropagation(),x.next({type:"relationship",eventName:"mouseout",pluginName:ze,highlightTarget:_.fullChartParams.highlightTarget,datum:M,category:_.CategoryNodeMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,event:P,data:_.computedData})}).on("click",(P,M)=>{P.stopPropagation(),x.next({type:"relationship",eventName:"click",pluginName:ze,highlightTarget:_.fullChartParams.highlightTarget,datum:M,category:_.CategoryNodeMap.get(M.categoryLabel),categoryIndex:M.categoryIndex,categoryLabel:M.categoryLabel,event:P,data:_.computedData})})}),y.pipe(K((_,P)=>_===P),z(_=>Yn(()=>_==="end",x,Aa))).subscribe(_=>{i.event$.next(_)}),G({renderData:A,highlightNodes:r.relationshipHighlightNodes$.pipe(L(_=>_.map(P=>P.id))),highlightEdges:r.relationshipHighlightEdges$.pipe(L(_=>_.map(P=>P.id))),fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(D(o),z(async _=>_)).subscribe(_=>{!c||!d||XF({nodeGSelection:c,edgeGSelection:d,highlightIds:_.highlightNodes,fullChartParams:_.fullChartParams})}),()=>{o.next(void 0)}}),Xe="ForceDirectedBubbles",W2=12,HF=q(Xe,"zoom-area"),qF=it(Xe,"arrow"),Y2=q(Xe,"arrow-marker"),ZF=q(Xe,"edge-list-g"),KF=q(Xe,"edge-g"),V2=q(Xe,"edge-arrow-path"),j2=q(Xe,"edge-label-g"),X2=q(Xe,"edge-label"),QF=q(Xe,"node-list-g"),JF=q(Xe,"node-g"),U2=q(Xe,"node-circle"),ez={name:Xe,defaultParams:Gi,layerIndex:ht,validator:(e,{validateColumns:t})=>{const n=t(e,{bubble:{toBeTypes:["object"]},bubbleLabel:{toBeTypes:["object"]},arrow:{toBeTypes:["object"]},arrowLabel:{toBeTypes:["object"]},force:{toBeTypes:["object"]},zoomable:{toBeTypes:["boolean"]},transform:{toBeTypes:["object"]},scaleExtent:{toBeTypes:["object"]}});if(e.bubble){const r=t(e.bubble,{radiusMin:{toBeTypes:["number"]},radiusMax:{toBeTypes:["number"]},arcScaleType:{toBe:'"area" | "radius"',test:i=>i==="area"||i==="radius"},fillColorType:{toBeOption:"ColorType"},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.bubbleLabel){const r=t(e.bubbleLabel,{fillRate:{toBeTypes:["number"]},lineHeight:{toBeTypes:["number"]},maxLineLength:{toBeTypes:["number"]},colorType:{toBeOption:"ColorType"},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.arrow){const r=t(e.arrow,{colorType:{toBeOption:"ColorType"},strokeWidthMin:{toBeTypes:["number"]},strokeWidthMax:{toBeTypes:["number"]},pointerWidth:{toBeTypes:["number"]},pointerHeight:{toBeTypes:["number"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.arrowLabel){const r=t(e.arrowLabel,{colorType:{toBeOption:"ColorType"},sizeFixed:{toBeTypes:["boolean"]},styleFn:{toBeTypes:["Function"]}});if(r.status==="error")return r}if(e.force){const r=t(e.force,{nodeStrength:{toBeTypes:["number"]},linkDistance:{toBeTypes:["number"]},velocityDecay:{toBeTypes:["number"]},alphaDecay:{toBeTypes:["number"]}});if(r.status==="error")return r}if(e.transform){const r=t(e.transform,{x:{toBeTypes:["number"]},y:{toBeTypes:["number"]},k:{toBeTypes:["number"]}});if(r.status==="error")return r}if(e.scaleExtent){const r=t(e.scaleExtent,{min:{toBeTypes:["number"]},max:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function tz(e,t){return Hs().velocityDecay(t.force.velocityDecay).alphaDecay(t.force.alphaDecay).force("link",Gf().id(n=>n.id).strength(1).distance(n=>t.force.linkDistance)).force("charge",qs().strength(t.force.nodeStrength)).force("collision",Us(t.bubble.radiusMax).strength(1)).force("center",zf(e.width/2,e.height/2))}function nz(e){return"translate("+e.x+","+e.y+")"}function rz(e){const t=e.source.x+(e.target.x-e.source.x)/2,n=e.source.y+(e.target.y-e.source.y)/2;return"translate("+t+","+n+")"}function iz(e){return"M"+e.source.x+","+e.source.y+" L"+e.target.x+","+e.target.y}function oz({defsSelection:e,markerParams:t,markerData:n}){return e.selectAll(`marker.${Y2}`).data(n).join(r=>{const i=r.append("marker").classed(Y2,!0).attr("viewBox",t.viewBox).attr("orient","auto");return i.append("path").attr("d",t.d),i},r=>r,r=>r.remove()).attr("id",r=>r.id).attr("markerWidth",t.pointerWidth).attr("markerHeight",t.pointerHeight).attr("refX",r=>r.refX).attr("refY",0)}function az(e,t){function n(o,a){o.active||e.alphaTarget(.3).restart(),o.subject.fx=o.subject.x,o.subject.fy=o.subject.y,t.next("start")}function r(o,a){o.subject.fx=o.x,o.subject.fy=o.y,t.next("drag")}function i(o,a){o.active||e.alphaTarget(0),o.subject.fx=null,o.subject.fy=null,t.next("end")}return bs().on("start",n).on("drag",r).on("end",i)}function sz({nodeListGSelection:e,nodes:t}){return e.selectAll("g").data(t,n=>n.id).join(n=>n.append("g").classed(JF,!0),n=>n,n=>n.remove())}function lz({nodeGSelection:e,fullParams:t,fullChartParams:n}){return e.each((r,i,o)=>{j(o[i]).selectAll("circle").data([r]).join(s=>s.append("circle").classed(U2,!0).attr("cursor","pointer"),s=>s,s=>s.remove()).attr("r",s=>s.r).attr("fill",s=>Se({datum:s,colorType:t.bubble.fillColorType,fullChartParams:n})).attr("stroke",s=>Se({datum:s,colorType:t.bubble.strokeColorType,fullChartParams:n})).attr("stroke-width",t.bubble.strokeWidth).attr("style",s=>t.bubble.styleFn(s))}).attr("text-anchor","middle").attr("font-size",W2).each((r,i,o)=>{const a=j(o[i]);a.call(Uv,{text:r.label,radius:r.r*t.bubbleLabel.fillRate,lineHeight:W2*t.bubbleLabel.lineHeight,isBreakAll:r.label.length<=t.bubbleLabel.maxLineLength?!1:t.bubbleLabel.wordBreakAll}),a.select("text").attr("fill",s=>Se({datum:r,colorType:t.bubbleLabel.colorType,fullChartParams:n}))}),e.select("text").attr("pointer-events","none").attr("style",r=>t.bubbleLabel.styleFn(r)),e.select(`circle.${U2}`)}function uz({edgeListGSelection:e,edges:t}){return e.selectAll("g").data(t,n=>n.id).join(n=>n.append("g").classed(KF,!0),n=>n,n=>n.remove())}function cz({edgeGSelection:e,fullParams:t,fullChartParams:n}){return e.each((r,i,o)=>{j(o[i]).selectAll("path").data([r]).join(s=>s.append("path").classed(V2,!0),s=>s,s=>s.remove()).attr("marker-end",s=>`url(#${s.markerId})`).attr("stroke",s=>Se({datum:s.data,colorType:t.arrow.colorType,fullChartParams:n})).attr("stroke-width",s=>s.strokeWidth).attr("style",s=>t.arrow.styleFn(s))}),e.select(`path.${V2}`)}function fz({edgeGSelection:e}){return e.each((t,n,r)=>{j(r[n]).selectAll("g").data([t]).join(o=>o.append("g").classed(j2,!0),o=>o,o=>o.remove())}),e.select(`g.${j2}`)}function hz({edgeLabelGSelection:e,fullParams:t,fullChartParams:n}){return e.each((r,i,o)=>{j(o[i]).selectAll("text").data([r],s=>s.id).join(s=>s.append("text").classed(X2,!0).attr("text-anchor","middle").attr("pointer-events","none"),s=>s,s=>s.remove()).text(s=>s.label).attr("fill",s=>Se({datum:s,colorType:t.arrowLabel.colorType,fullChartParams:n})).attr("font-size",n.styles.textSize).attr("style",s=>t.arrowLabel.styleFn(s))}),e.select(`text.${X2}`)}function pz({nodeGSelection:e,edgeGSelection:t,highlightIds:n,fullChartParams:r}){if(e.interrupt("highlight"),t.interrupt("highlight"),!n.length){e.transition("highlight").style("opacity",1),t.transition("highlight").style("opacity",1);return}t.style("opacity",r.styles.unhighlightedOpacity),e.each((i,o,a)=>{const s=j(a[o]);n.includes(i.id)?s.style("opacity",1).transition("highlight").ease(cr).duration(500):s.style("opacity",r.styles.unhighlightedOpacity)})}const dz=es(ez)(({selection:e,rootSelection:t,name:n,observer:r,subject:i})=>{const o=new Q,a=e.append("g").classed(HF,!0),s=a.append("defs"),l=a.append("g").classed(ZF,!0),u=a.append("g").classed(QF,!0);let c,h,f,p,d,g;const m=new ku("end"),b=new Q,y=r.fullParams$.pipe(D(o),L(w=>{let C=w.zoomable?vn().on("zoom",F=>{a.attr("transform",`translate(
|
212
270
|
${F.transform.x},
|
213
271
|
${F.transform.y}
|
214
272
|
) scale(
|
215
273
|
${F.transform.k}
|
216
|
-
)`),w.arrowLabel.sizeFixed&&
|
274
|
+
)`),w.arrowLabel.sizeFixed&&g&&g.attr("transform",`scale(${1/F.transform.k})`)}):vn().on("zoom",null);return w.scaleExtent&&C.scaleExtent([w.scaleExtent.min,w.scaleExtent.max]),t.call(C),C}));G({d3Zoom:y,transform:r.fullParams$.pipe(D(o),L(w=>w.transform))}).pipe(D(o),z(async w=>w)).subscribe(w=>{e.call(w.d3Zoom.transform,Ri.translate(w.transform.x,w.transform.y).scale(w.transform.k))});const x=G({layout:r.layout$.pipe(Xi()),fullParams:r.fullParams$}).pipe(D(o),z(async w=>w),L(w=>tz(w.layout,w.fullParams)),se(1)),$=r.computedData$.pipe(D(o),L(w=>{const C=w.nodes.filter(O=>O.value!=null);if(!C.length)return[0,2];const F=lc(w.nodes.map(O=>O.value));return C.length==1||F[0]===F[1]?[F[0]-1,F[1]+1]:F}),se(1)),S=r.computedData$.pipe(D(o),L(w=>{const C=w.edges.filter(O=>O.value!=null);if(!C.length)return[0,2];const F=lc(w.edges.map(O=>O.value));return C.length==1||F[0]===F[1]?[F[0]-1,F[1]+1]:F}),se(1)),A=$.pipe(D(o),L(w=>(w[1]-w[0])/2)),_=S.pipe(D(o),L(w=>(w[1]-w[0])/2)),P=G({nodeMinMaxValue:$,fullParams:r.fullParams$}).pipe(D(o),z(async w=>w),L(w=>In().domain(w.nodeMinMaxValue).range([w.fullParams.bubble.radiusMin,w.fullParams.bubble.radiusMax]).exponent(w.fullParams.bubble.arcScaleType==="area"?.5:1))),M=G({edgeMinMaxValue:S,fullParams:r.fullParams$}).pipe(D(o),z(async w=>w),L(w=>Sr().domain(w.edgeMinMaxValue).range([w.fullParams.arrow.strokeWidthMin,w.fullParams.arrow.strokeWidthMax]))),R=G({computedData:r.computedData$,radiusScale:P,defaultNodeValue:A}).pipe(D(o),z(async w=>w),L(w=>new Map(w.computedData.nodes.map(C=>{let F=C;return F.r=w.radiusScale(F.value??w.defaultNodeValue),[F.id,F]})))),v=G({computedData:r.computedData$,strokeWidthScale:M,defaultEdgeValue:_}).pipe(D(o),z(async w=>w),L(w=>new Map(w.computedData.edges.map(C=>{let F=C;return F.source=C.startNode,F.target=C.endNode,F.strokeWidth=w.strokeWidthScale(F.value??w.defaultEdgeValue),F.markerId=`${qF}__${F.id}`,[F.id,F]})))),E=G({visibleComputedData:r.visibleComputedData$,RenderNodeMap:R,RenderEdgeMap:v}).pipe(D(o),z(async w=>w),L(w=>({nodes:w.visibleComputedData.nodes.map(C=>w.RenderNodeMap.get(C.id)),edges:w.visibleComputedData.edges.map(C=>w.RenderEdgeMap.get(C.id))})),se(1)),k=r.fullParams$.pipe(D(o),L(w=>({viewBox:`-${w.arrow.pointerWidth} -${w.arrow.pointerHeight/2} ${w.arrow.pointerWidth} ${w.arrow.pointerHeight}`,d:`M${-w.arrow.pointerWidth},${-w.arrow.pointerHeight/2}L0,0L${-w.arrow.pointerWidth},${w.arrow.pointerHeight/2}`,pointerWidth:w.arrow.pointerWidth,pointerHeight:w.arrow.pointerHeight}))),T=G({computedData:r.computedData$,fullParams:r.fullParams$,RenderNodeMap:R,RenderEdgeMap:v}).pipe(D(o),z(async w=>w),L(w=>w.computedData.edges.map(C=>{const F=w.RenderEdgeMap.get(C.id),O=w.RenderNodeMap.get(C.endNode.id);return{id:F.markerId,edgeId:C.id,strokeWidth:F.strokeWidth,refX:(O.r+w.fullParams.bubble.strokeWidth/2)/F.strokeWidth-1}})));return G({defsSelection:s,markerParams:k,markerData:T}).pipe(D(o),L(w=>oz({defsSelection:s,markerParams:w.markerParams,markerData:w.markerData}))).subscribe(),G({renderData:E,computedData:r.computedData$,CategoryNodeMap:r.CategoryNodeMap$,simulation:x,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$}).pipe(D(o),z(async w=>w)).subscribe(w=>{c=sz({nodeListGSelection:u,nodes:w.renderData.nodes}),h=lz({nodeGSelection:c,fullParams:w.fullParams,fullChartParams:w.fullChartParams}),c.call(az(w.simulation,m)),f=uz({edgeListGSelection:l,edges:w.renderData.edges}),p=cz({edgeGSelection:f,fullParams:w.fullParams,fullChartParams:w.fullChartParams}),d=fz({edgeGSelection:f}),g=hz({edgeLabelGSelection:d,fullParams:w.fullParams,fullChartParams:w.fullChartParams}),w.simulation.nodes(w.renderData.nodes).on("tick",()=>{p.attr("d",iz),c.attr("transform",nz),d.attr("transform",C=>rz(C))}),w.simulation.force("link").links(w.renderData.edges),w.simulation.alpha(.3).restart(),h.on("mouseover",(C,F)=>{C.stopPropagation(),b.next({type:"relationship",eventName:"mouseover",pluginName:Xe,highlightTarget:w.fullChartParams.highlightTarget,datum:F,category:w.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:C,data:w.computedData})}).on("mousemove",(C,F)=>{C.stopPropagation(),b.next({type:"relationship",eventName:"mousemove",pluginName:Xe,highlightTarget:w.fullChartParams.highlightTarget,datum:F,category:w.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:C,data:w.computedData})}).on("mouseout",(C,F)=>{C.stopPropagation(),b.next({type:"relationship",eventName:"mouseout",pluginName:Xe,highlightTarget:w.fullChartParams.highlightTarget,datum:F,category:w.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:C,data:w.computedData})}).on("click",(C,F)=>{C.stopPropagation(),b.next({type:"relationship",eventName:"click",pluginName:Xe,highlightTarget:w.fullChartParams.highlightTarget,datum:F,category:w.CategoryNodeMap.get(F.categoryLabel),categoryIndex:F.categoryIndex,categoryLabel:F.categoryLabel,event:C,data:w.computedData})})}),m.pipe(K((w,C)=>w===C),z(w=>Yn(()=>w==="end",b,Aa))).subscribe(w=>{i.event$.next(w)}),G({renderData:E,highlightNodes:r.relationshipHighlightNodes$.pipe(L(w=>w.map(C=>C.id))),highlightEdges:r.relationshipHighlightEdges$.pipe(L(w=>w.map(C=>C.id))),fullChartParams:r.fullChartParams$,fullParams:r.fullParams$}).pipe(D(o),z(async w=>w)).subscribe(w=>{!c||!f||pz({nodeGSelection:c,edgeGSelection:f,highlightIds:w.highlightNodes,fullChartParams:w.fullChartParams})}),()=>{o.next(void 0)}}),H2="RelationshipLegend",gz=es({name:H2,defaultParams:R2,layerIndex:Ei,validator:(e,{validateColumns:t})=>t(e,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:e,rootSelection:t,observer:n,subject:r})=>{const i=new Q,o=n.fullParams$.pipe(D(i),L(s=>{const l=[{listRectWidth:s.listRectWidth,listRectHeight:s.listRectHeight,listRectRadius:s.listRectRadius}];return{...s,labelList:l}})),a=Bi(H2,{rootSelection:t,legendLabels$:n.categoryLabels$,fullParams$:o,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),a()}}),q2="RelationshipTooltip",mz=es({name:q2,defaultParams:ed,layerIndex:Ii,validator:(e,{validateColumns:t})=>t(e,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=Fi(q2,{rootSelection:t,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),Z2={force:{strength:.08,velocityDecay:.3,collisionSpacing:2},bubbleLabel:{colorType:"labelContrast",fillRate:.6,lineHeight:1,maxLineLength:6,wordBreakAll:!0},arcScaleType:"area"},K2={outerRadius:.85,innerRadius:0,outerRadiusWhileHighlight:.9,startAngle:0,endAngle:Math.PI*2,padAngle:0,strokeColorType:"background",strokeWidth:1,cornerRadius:0},td={renderFn:e=>e.eventName==="mouseover"||e.eventName==="mousemove"?[String(e.datum.value)]:[String(Math.round(e.data.reduce((t,n)=>t+n.reduce((r,i)=>r+(i.value??0),0),0)*(e.tween??1)))],textAttrs:[{transform:"translate(0, 0)"}],textStyles:[{"font-weight":"bold","text-anchor":"middle","pointer-events":"none","dominant-baseline":"middle","font-size":64,fill:"#000"}]};td.renderFn.toString=()=>`(eventData) => {
|
217
275
|
if (eventData.eventName === 'mouseover' || eventData.eventName === 'mousemove') {
|
218
276
|
return [String(eventData.datum.value)]
|
219
277
|
}
|
@@ -228,88 +286,90 @@ ${c}`}};Dp.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
|
228
286
|
)
|
229
287
|
)
|
230
288
|
]
|
231
|
-
}`;const
|
232
|
-
<text x="${
|
233
|
-
<tspan>${
|
234
|
-
</text>`:"",
|
235
|
-
${
|
236
|
-
</text>`;return`${
|
237
|
-
<g ${r?`transform="translate(0, ${
|
238
|
-
${
|
239
|
-
</g>`}};
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
</
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
</
|
289
|
+
}`;const nd={outerRadius:.85,outerRadiusWhileHighlight:.9,startAngle:0,endAngle:Math.PI*2,labelCentroid:2.1,labelColorType:"primary",labelFn:e=>String(e.label)};nd.labelFn.toString=()=>"d => String(d.label)";const Q2={outerRadius:.95,padAngle:0,strokeColorType:"background",strokeWidth:.5,cornerRadius:0,arcScaleType:"area",angleIncreaseWhileHighlight:.05},rd={outerRadius:.95,labelCentroid:2.1,labelFn:e=>String(e.label),labelColorType:"primary",arcScaleType:"area"};rd.labelFn.toString=()=>"d => String(d.label)";const J2={placement:"right-end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},id={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(e,{styles:t,utils:n})=>{const r=e.seriesLabel.slice(0,7)!=="series_",i=e.datum.label.slice(0,7)!=="series_",o=n.toCurrency(e.datum.value),a=t.textSizePx*.7,s=t.textSizePx/2-a/2,l=r?`<rect width="${a}" height="${a}" x="${s}" y="${s-1}" rx="${a/2}" fill="${e.datum.color}"></rect>
|
290
|
+
<text x="${t.textSizePx*1.5}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
291
|
+
<tspan>${e.seriesLabel}</tspan>
|
292
|
+
</text>`:"",u=i?`<tspan>${e.datum.label}</tspan> `:"",c=r?n.measureTextWidth(`${e.seriesLabel}${o}`,t.textSizePx)+t.textSizePx*1.5:0,h=i?n.measureTextWidth(`${e.datum.label}${o}`,t.textSizePx):0,f=Math.max(c,h),p=i?f+t.textSizePx*1.5:0,d=i?"end":"start",g=`<text font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
293
|
+
${u}<tspan font-weight="bold" text-anchor="${d}" x="${p}">${o}</tspan>
|
294
|
+
</text>`;return`${l}
|
295
|
+
<g ${r?`transform="translate(0, ${t.textSizePx*2})"`:""}>
|
296
|
+
${g}
|
297
|
+
</g>`}};id.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
298
|
+
const hasSeriesLabel = eventData.seriesLabel.slice(0, 7) === 'series_' ? false : true
|
299
|
+
const hasDatumLabel = eventData.datum.label.slice(0, 7) === 'series_' ? false : true
|
300
|
+
const valueText = utils.toCurrency(eventData.datum.value)
|
301
|
+
const bulletWidth = styles.textSizePx * 0.7
|
302
|
+
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
303
|
+
const seriesSvg = hasSeriesLabel
|
304
|
+
? \`<rect width="\${bulletWidth}" height="\${bulletWidth}" x="\${offset}" y="\${offset - 1}" rx="\${bulletWidth / 2}" fill="\${eventData.datum.color}"></rect>
|
305
|
+
<text x="\${styles.textSizePx * 1.5}" font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
306
|
+
<tspan>\${eventData.seriesLabel}</tspan>
|
307
|
+
</text>\`
|
308
|
+
: ''
|
309
|
+
const datumLabelSvg = hasDatumLabel
|
310
|
+
? \`<tspan>\${eventData.datum.label}</tspan> \`
|
311
|
+
: ''
|
312
|
+
const seriesLabelTextWidth = hasSeriesLabel
|
313
|
+
? utils.measureTextWidth(\`\${eventData.seriesLabel}\${valueText}\`, styles.textSizePx) + styles.textSizePx * 1.5
|
314
|
+
: 0
|
315
|
+
const datumLabelTextWidth = hasDatumLabel
|
316
|
+
? utils.measureTextWidth(\`\${eventData.datum.label}\${valueText}\`, styles.textSizePx)
|
317
|
+
: 0
|
318
|
+
const maxTextWidth = Math.max(seriesLabelTextWidth, datumLabelTextWidth)
|
319
|
+
const lineEndX = hasDatumLabel
|
320
|
+
? maxTextWidth + styles.textSizePx * 1.5
|
321
|
+
: 0
|
322
|
+
const valueTextAnchor = hasDatumLabel ? 'end' : 'start'
|
323
|
+
const datumSvg = \`<text font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
324
|
+
\${datumLabelSvg}<tspan font-weight="bold" text-anchor="\${valueTextAnchor}" x="\${lineEndX}">\${valueText}</tspan>
|
325
|
+
</text>\`
|
267
326
|
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
}`;const gF="Bubbles",E2=12,mF={name:gF,defaultParams:M2,layerIndex:be,validator:(t,{validateColumns:e})=>{const n=e(t,{force:{toBeTypes:["object"]},bubbleLabel:{toBeTypes:["object"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}});if(t.force){const r=e(t.force,{velocityDecay:{toBeTypes:["number"]},collisionSpacing:{toBeTypes:["number"]},strength:{toBeTypes:["number"]}});if(r.status==="error")return r}if(t.bubbleLabel){const r=e(t.bubbleLabel,{colorType:{toBeOption:"ColorType"},fillRate:{toBeTypes:["number"]},lineHeight:{toBeTypes:["number"]},maxLineLength:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};let Nn;function yF(t,e){return Xs().velocityDecay(e.force.velocityDecay).force("collision",Ys().radius(n=>n.r+e.force.collisionSpacing)).force("charge",Vs().strength(n=>-Math.pow(n.r,2)*e.force.strength)).on("tick",()=>{t.attr("transform",n=>`translate(${n.x},${n.y})`)})}function bF({visibleComputedLayoutData:t,LastBubbleDataMap:e,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=t.flat(),l=s.reduce((h,p)=>h+p.value,0),u=kn().domain([0,l]).range([0,a]).exponent(o==="area"?.5:1),c=o==="area"?1:(()=>{const h=a*a*Math.PI;return Math.sqrt(h/Ac(s,p=>Math.PI*Math.pow(u(p.value),2)))})(),f=.9;return s.map(h=>{const p=h,d=e.get(p.id);if(d)p.x=d.x,p.y=d.y;else{const g=i.get(p.seriesLabel);p.x=Math.random()*g.width,p.y=Math.random()*g.height}const m=u(p.value??0)*c*f;return p.r=m,p._originR=m,p})}function xF({selection:t,bubblesData:e,fullParams:n,fullChartParams:r,sumSeries:i}){const o=t.selectAll("g").data(e,s=>s.id).join(s=>{const l=s.append("g").attr("cursor","pointer").attr("font-size",E2).style("fill","#ffffff").attr("text-anchor","middle");return l.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",u=>u.color),l.append("text").style("opacity",.8).attr("pointer-events","none"),l},s=>s,s=>s.remove()).attr("transform",s=>`translate(${s.x},${s.y})`),a=i?"seriesLabel":"label";return o.select("circle").transition().duration(200).attr("r",s=>s.r).attr("fill",s=>s.color),o.each((s,l,u)=>{const c=V(u[l]),f=s[a]??"";c.call(M$,{text:f,radius:s.r*n.bubbleLabel.fillRate,lineHeight:E2*n.bubbleLabel.lineHeight,isBreakAll:f.length<=n.bubbleLabel.maxLineLength?!1:n.bubbleLabel.wordBreakAll}),c.select("text").attr("fill",h=>St({datum:s,colorType:n.bubbleLabel.colorType,fullChartParams:r}))}),o}function vF(){return ps().on("start",(t,e)=>{t.active||Nn.alpha(1).restart(),e.fx=e.x,e.fy=e.y}).on("drag",(t,e)=>{t.active||Nn.alphaTarget(0),e.fx=t.x,e.fy=t.y}).on("end",(t,e)=>{e.fx=null,e.fy=null})}function $F({fullParams:t,SeriesContainerPositionMap:e}){Nn.force("x",Fy().strength(t.force.strength).x(n=>e.get(n.seriesLabel).centerX)).force("y",zy().strength(t.force.strength).y(n=>e.get(n.seriesLabel).centerY)),Nn.alpha(1).restart()}function _F({bubblesSelection:t,highlightIds:e,fullChartParams:n}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1);return}t.each((r,i,o)=>{const a=V(o[i]);e.includes(r.id)?a.style("opacity",1).transition("highlight").ease(sr).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const SF=Sn(mF)(({selection:t,name:e,observer:n,subject:r})=>{const i=new J;let o=new Map;const a=n.fullDataFormatter$.pipe(R(f=>f.sumSeries),tt()),s=n.fullParams$.pipe(L(i),R(f=>f.arcScaleType),tt()),l=W({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedLayoutData:n.visibleComputedLayoutData$,scaleType:s}).pipe(L(i),G(async f=>f),R(f=>bF({visibleComputedLayoutData:f.visibleComputedLayoutData,LastBubbleDataMap:o,graphicWidth:f.layout.width,graphicHeight:f.layout.height,SeriesContainerPositionMap:f.SeriesContainerPositionMap,scaleType:f.scaleType})),pt(1));l.subscribe(f=>{o=new Map(f.map(h=>[h.id,h]))});const u=n.fullChartParams$.pipe(L(i),R(f=>f.highlightTarget),tt()),c=W({bubblesData:l,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:a}).pipe(L(i),G(async f=>f),R(f=>{Nn&&Nn.stop();const h=xF({selection:t,bubblesData:f.bubblesData,fullParams:f.fullParams,fullChartParams:f.fullChartParams,sumSeries:f.sumSeries});return Nn=yF(h,f.fullParams),Nn.nodes(f.bubblesData),$F({fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),h}));return W({bubblesSelection:c,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,highlightTarget:u}).pipe(L(i),G(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(h,p)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mousemove",(h,p)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("mouseout",(h,p)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).on("click",(h,p)=>{r.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:p,series:f.SeriesDataMap.get(p.seriesLabel),seriesIndex:p.seriesIndex,seriesLabel:p.seriesLabel,event:h,data:f.computedData})}).call(vF())}),W({bubblesSelection:c,bubblesData:l,highlight:n.seriesHighlight$.pipe(R(f=>f.map(h=>h.id))),fullChartParams:n.fullChartParams$,fullParams:n.fullParams$,sumSeries:a,SeriesContainerPositionMap:n.SeriesContainerPositionMap$}).pipe(L(i),G(async f=>f)).subscribe(f=>{_F({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams})}),()=>{i.next(void 0)}});function I2({data:t,startAngle:e,endAngle:n}){return xv().startAngle(e).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(t).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function wF({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r}){const i=Z(e,"series");return W({seriesLabels:r,separateSeries:n}).pipe(G(async o=>o),R((o,a)=>{const s=o.separateSeries?o.seriesLabels:[o.seriesLabels.join("")];return t.selectAll(`g.${i}`).data(s,l=>l).join(l=>l.append("g").classed(i,!0),l=>l,l=>l.remove())}),pt(1))}const da=({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=wF({selection:t,pluginName:e,separateSeries$:n,seriesLabels$:r});return W({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(G(async a=>a),tt((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,l)=>{const u=a.seriesContainerPosition[l]??a.seriesContainerPosition[0];return`translate(${u.centerX}, ${u.centerY})`})}),W({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(G(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,l)=>{const u=a.seriesContainerPosition[l]??a.seriesContainerPosition[0];return`translate(${u.centerX}, ${u.centerY})`})}),{seriesCenterSelection$:o}},jp="Pie",TF={name:jp,defaultParams:L2,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},innerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeTypes:["string"]},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]}})};function AF({enter:t,exit:e,data:n,lastTweenData:r,fullParams:i}){return!t.size()&&!e.size()?o=>{const a=n.map((s,l)=>{const u=r[l]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+u.startAngle*(1-o),endAngle:s.endAngle*o+u.endAngle*(1-o),value:s.value*o+u.value*(1-o)}});return qp(a,i.startAngle,i.endAngle,1)}:o=>qp(n,i.startAngle,i.endAngle,o)}function qp(t,e,n,r){return t.map((i,o)=>{const a=e+(i.startAngle-e)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function B2({selection:t,data:e,arc:n,pathClassName:r,fullParams:i,fullChartParams:o}){return t.selectAll("path").data(e,s=>s.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(s,l)=>s.data.color).attr("stroke",(s,l)=>St({datum:s.data,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("d",(s,l)=>n(s))}function PF({pathSelection:t,ids:e,fullChartParams:n,arc:r,arcHighlight:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}t.each((o,a,s)=>{const l=V(s[a]);e.includes(o.data.id)?l.style("opacity",1).transition("highlight").ease(sr).duration(500).attr("d",u=>i(u)):l.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>r(u))})}function DF(t,e){const n=new J,r=Z(t,"path");let i=[],o=[];const a=e.seriesContainerPosition$.pipe(L(n),R(h=>h.width<h.height?h.width:h.height),tt()),s=new dt(h=>{W({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p)).subscribe(p=>{const d=I2({data:p.containerVisibleComputedLayoutData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});h.next(d)})}),l=new dt(h=>{W({shorterSideWith:a,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p)).subscribe(p=>{const d=cu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),u=new dt(h=>{W({shorterSideWith:a,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p)).subscribe(p=>{const d=cu({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadiusWhileHighlight,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});h.next(d)})}),c=e.fullChartParams$.pipe(L(n),R(h=>h.highlightTarget),tt()),f=new dt(h=>{W({pieData:s,arc:l,computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:c}).pipe(L(n),G(async p=>p)).subscribe(p=>{e.containerSelection.interrupt("graphicMove");const d=e.containerSelection.selectAll("path").data(p.pieData,b=>b.id),m=d.enter(),g=d.exit(),y=AF({enter:m,exit:g,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});e.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(b,v)=>x=>{o=y(x),B2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams})}).on("end",(b,v)=>{o=qp(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const x=B2({selection:e.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams});h.next(x),i=Object.assign([],p.pieData),e.event$.next({type:"series",pluginName:t,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})})})}).pipe(pt(1));return W({pathSelection:f,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:c}).pipe(L(n),G(async h=>h)).subscribe(h=>{h.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})}).on("click",(p,d)=>{p.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:h.highlightTarget,datum:d.data,series:h.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:h.computedData})})}),W({pathSelection:f,highlight:e.seriesHighlight$.pipe(R(h=>h.map(p=>p.id))),fullChartParams:e.fullChartParams$,arc:l,arcHighlight:u}).pipe(L(n),G(async h=>h)).subscribe(h=>{PF({pathSelection:h.pathSelection,ids:h.highlight,fullChartParams:h.fullChartParams,arc:h.arc,arcHighlight:h.arcHighlight})}),()=>{n.next(void 0)}}const CF=Sn(TF)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,{seriesCenterSelection$:o}=da({selection:t,pluginName:jp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(L(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const f=V(c[u]),h=r.visibleComputedLayoutData$.pipe(L(i),R(d=>d[u]??d[0])),p=r.seriesContainerPosition$.pipe(L(i),R(d=>d[u]??d[0]));a[u]=DF(jp,{containerSelection:f,computedData$:r.computedData$,containerVisibleComputedLayoutData$:h,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),yu="PieEventTexts",N2=Z(yu,"text"),MF={name:yu,defaultParams:Xp,layerIndex:_p,validator:(t,{validateColumns:e})=>e(t,{renderFn:{toBeTypes:["Function"]},textAttrs:{toBeTypes:["object[]"]},textStyles:{toBeTypes:["object[]"]}})};function Zp(t,e){const n=t.selectAll(`text.${N2}`).data(e),r=n.enter().append("text").classed(N2,!0),i=n.merge(r);return i.each((o,a,s)=>{const l=V(s[a]).text(o.text);Object.keys(o.attr).forEach(u=>{l.attr(u,o.attr[u])}),Object.keys(o.style).forEach(u=>{l.style(u,o.style[u])})}),n.exit().remove(),i}function Kp({eventData:t,renderFn:e,textAttrs:n,textStyles:r}){const i=e(t);return(Array.isArray(i)?i:[i]).map((a,s)=>({text:a,attr:n[s],style:r[s]}))}function LF(t,e){const n=new J;let r;const i=e.fullChartParams$.pipe(L(n),R(o=>o.highlightTarget),tt());return W({computedData:e.computedData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,highlightTarget:i}).pipe(L(n),G(async o=>o)).subscribe(o=>{e.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>l=>{const u=Kp({eventData:{type:"series",pluginName:t,eventName:"transitionMove",event:a,tween:l,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Zp(e.containerSelection,u)}).on("end",(a,s)=>{const l=Kp({eventData:{type:"series",pluginName:t,eventName:"transitionEnd",event:a,tween:1,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Zp(e.containerSelection,l),r&&r.unsubscribe(),r=e.event$.subscribe(u=>{const c=Kp({eventData:u,renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});Zp(e.containerSelection,c)})})}),()=>{n.next(void 0)}}const kF=Sn(MF)(({selection:t,name:e,observer:n,subject:r})=>{const i=new J,{seriesCenterSelection$:o}=da({selection:t,pluginName:yu,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(L(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const f=V(c[u]),h=n.computedLayoutData$.pipe(L(i),R(d=>d[u]??d[0])),p=n.seriesContainerPosition$.pipe(L(i),R(d=>d[u]??d[0]));a[u]=LF(yu,{containerSelection:f,computedData$:n.computedData$,containerComputedLayoutData$:h,SeriesDataMap$:n.SeriesDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,seriesHighlight$:n.seriesHighlight$,seriesContainerPosition$:p,event$:r.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),zi="PieLabels",RF=Z(zi,"label-g"),EF=Z(zi,"line-g"),IF=Z(zi,"text"),F2=2,BF={name:zi,defaultParams:Vp,layerIndex:_p,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"}})};function NF({pieData:t,arc:e,arcMouseover:n,labelCentroid:r,lineStartCentroid:i,fullParams:o}){return t.map((a,s)=>{const[l,u]=e.centroid(a),[c,f]=n.centroid(a),h=o.labelFn(a.data);return{pieDatum:a,arcIndex:s,arcLabels:h.split(`
|
273
|
-
`),lineStartX:l*i,lineStartY:u*i,lineStartMouseoverX:c*i,lineStartMouseoverY:f*i,x:l*r,y:u*r,mouseoverX:c*r,mouseoverY:f*r,textWidth:0,collisionShiftX:0,collisionShiftY:0,quadrant:l>=0&&u<=0?1:l<0&&u<=0?2:l<0&&u>0?3:4}}).filter(a=>a.pieDatum.data.visible)}function FF({labelGSelection:t,data:e,fullParams:n,fullChartParams:r,textSizePx:i}){const o=t.selectAll("text").data(e,a=>a.pieDatum.id).join("text").classed(IF,!0).attr("font-weight","bold").attr("text-anchor",a=>a.quadrant==1||a.quadrant==4?"start":"end").style("dominant-baseline",a=>a.quadrant==1||a.quadrant==2?"auto":"hanging").style("cursor",a=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").attr("font-size",r.styles.textSize).attr("x",0).attr("y",0).attr("fill",(a,s)=>St({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).each((a,s,l)=>{L$(V(l[s]),{textArr:a.arcLabels,textSizePx:i,quadrant:a.quadrant})});return o.transition().attr("transform",a=>"translate("+a.x+","+a.y+")"),o}function zF(t,e,n){const r=t.nodes(),i=n,o=r.map((a,s)=>{const l=a.getBBox(),u=[e[s].x,e[s].y];return{node:a,x:u[0],y:u[1],width:l.width,height:l.height}});for(let a=0;a<o.length;a++){const s=o[a];for(let l=a+1;l<o.length;l++){const u=o[l];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=u.x+e[l].collisionShiftX,p=u.y+e[l].collisionShiftY;if(!(c+s.width/2<h-u.width/2||c-s.width/2>h+u.width/2||f+s.height/2<p-u.height/2||f-s.height/2>p+u.height/2)){if(e[l].quadrant==2){const d=p>f?-i*2:-i;e[l].collisionShiftY+=d}else if(e[l].quadrant==4){const d=p>f?i:i*2;e[l].collisionShiftY+=d}}}}for(let a=o.length-1;a>=0;a--){const s=o[a];for(let l=a-1;l>=0;l--){const u=o[l];e[a].textWidth=s.width;const c=s.x+e[a].collisionShiftX,f=s.y+e[a].collisionShiftY,h=u.x+e[l].collisionShiftX,p=u.y+e[l].collisionShiftY;if(!(c+s.width/2<h-u.width/2||c-s.width/2>h+u.width/2||f+s.height/2<p-u.height/2||f-s.height/2>p+u.height/2)){if(e[l].quadrant==1){const d=p>f?-i*2:-i;e[l].collisionShiftY+=d}else if(e[l].quadrant==3){const d=p>f?i:i*2;e[l].collisionShiftY+=d}}}}t.data(e).transition().attr("transform",a=>`translate(${a.x+a.collisionShiftX},${a.y+a.collisionShiftY})`)}function OF({lineGSelection:t,data:e,fullParams:n,fullChartParams:r}){const i=e.filter(a=>a.collisionShiftX||a.collisionShiftY),o=t.selectAll("polyline").data(i,a=>a.pieDatum.id).join("polyline").attr("stroke",a=>St({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).attr("stroke-width",1).attr("fill","none").attr("points",a=>[[a.lineStartX,a.lineStartY],[a.lineStartX,a.lineStartY]]);return o.transition().attr("points",a=>{let s=a.x+a.collisionShiftX,l=a.y+a.collisionShiftY;return[[s,l],[a.lineStartX,a.lineStartY]]}),o}function GF({textSelection:t,lineSelection:e,ids:n,fullChartParams:r}){if(t.interrupt("highlight"),e.interrupt("highlight"),!n.length){t.transition("highlight").duration(200).attr("transform",i=>`translate(${i.x+i.collisionShiftX},${i.y+i.collisionShiftY})`).style("opacity",1),e.transition("highlight").duration(200).style("opacity",1);return}t.each((i,o,a)=>{const s=V(a[o]);n.includes(i.pieDatum.id)?s.style("opacity",1).transition("highlight").duration(200).attr("transform",l=>l.collisionShiftX||l.collisionShiftY?`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`:`translate(${l.mouseoverX+l.collisionShiftX},${l.mouseoverY+l.collisionShiftY})`):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200).attr("transform",l=>`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`)}),e.each((i,o,a)=>{const s=V(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function WF(t,e){const n=new J;e.containerSelection.selectAll("g").remove();const r=e.containerSelection.append("g");r.classed(EF,!0);const i=e.containerSelection.append("g");i.classed(RF,!0);const o=new J,a=new J;let s=[];const l=e.seriesContainerPosition$.pipe(L(n),R(c=>c.width<c.height?c.width:c.height),tt()),u=e.fullParams$.pipe(L(n),R(c=>c.labelCentroid>=F2?F2:c.labelCentroid));return W({shorterSideWith:l,containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,textSizePx:e.textSizePx$,lineStartCentroid:u}).pipe(L(n),G(async c=>c)).subscribe(c=>{const f=cu({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadius,padAngle:0,cornerRadius:0}),h=cu({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadiusWhileHighlight,padAngle:0,cornerRadius:0}),p=I2({data:c.containerVisibleComputedLayoutData,startAngle:c.fullParams.startAngle,endAngle:c.fullParams.endAngle});s=NF({pieData:p,arc:f,arcMouseover:h,labelCentroid:c.fullParams.labelCentroid,lineStartCentroid:c.lineStartCentroid,fullParams:c.fullParams}),r.selectAll("polyline").remove();const d=FF({labelGSelection:i,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams,textSizePx:c.textSizePx});setTimeout(()=>{zF(d,s,c.textSizePx);const m=OF({lineGSelection:r,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams});a.next(m)},1e3),o.next(d)}),W({textSelection:o,lineSelection:a,highlight:e.seriesHighlight$.pipe(R(c=>c.map(f=>f.id))),fullChartParams:e.fullChartParams$}).pipe(L(n),G(async c=>c)).subscribe(c=>{GF({textSelection:c.textSelection,lineSelection:c.lineSelection,ids:c.highlight,fullChartParams:c.fullChartParams})}),()=>{n.next(void 0)}}const YF=Sn(BF)(({selection:t,observer:e,subject:n})=>{const r=new J,{seriesCenterSelection$:i}=da({selection:t,pluginName:zi,separateSeries$:e.separateSeries$,seriesLabels$:e.seriesLabels$,seriesContainerPosition$:e.seriesContainerPosition$}),o=[];return i.pipe(L(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,l,u)=>{const c=V(u[l]),f=e.visibleComputedLayoutData$.pipe(L(r),R(p=>p[l]??p[0])),h=e.seriesContainerPosition$.pipe(L(r),R(p=>p[l]??p[0]));o[l]=WF(zi,{containerSelection:c,containerVisibleComputedLayoutData$:f,fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,textSizePx$:e.textSizePx$,seriesHighlight$:e.seriesHighlight$,seriesContainerPosition$:h,event$:n.event$})})}),()=>{r.next(void 0)}}),Qp="Rose",XF=Math.PI*2,VF={name:Qp,defaultParams:k2,layerIndex:be,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"},angleIncreaseWhileHighlight:{toBeTypes:["number"]}})};function UF({cornerRadius:t,outerRadius:e,axisWidth:n,maxValue:r,arcScaleType:i,fullParams:o}){const a=n/2*e,s=i==="area"?.5:1,l=kn().domain([0,r]).range([0,a]).exponent(s);return u=>{const c=l(u.prevValue),f=l(u.value),h=nn(c,f);return p=>{const d=h(p);return Ql().innerRadius(0).outerRadius(d).padAngle(o.padAngle).padRadius(d).cornerRadius(t)(u)}}}function HF({pathSelection:t,ids:e,fullParams:n,fullChartParams:r,tweenArc:i}){if(t.interrupt("highlight"),!e.length){t.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}t.each((o,a,s)=>{const l=V(s[a]);e.includes(o.data.id)?l.style("opacity",1).transition("highlight").ease(sr).duration(500).attr("d",u=>i({...u,startAngle:u.startAngle-n.angleIncreaseWhileHighlight,endAngle:u.endAngle+n.angleIncreaseWhileHighlight})(1)):l.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>i(u)(1))})}function jF(t,e){const n=new J,r=Z(t,"path");let i=[];const o=e.seriesContainerPosition$.pipe(L(n),R(p=>p.width<p.height?p.width:p.height),tt()),a=W({containerVisibleComputedLayoutData:e.containerVisibleComputedLayoutData$,fullParams:e.fullParams$}).pipe(L(n),G(async p=>p),R(p=>{const d=XF/p.containerVisibleComputedLayoutData.length;return p.containerVisibleComputedLayoutData.map((m,g)=>({id:m.id,data:m,index:g,value:m.value,startAngle:d*g,endAngle:d*(g+1),padAngle:p.fullParams.padAngle,prevValue:i[g]&&i[g].id===m.id?i[g].value:0}))})),s=e.fullChartParams$.pipe(L(n),R(p=>p.highlightTarget),tt()),l=e.visibleComputedLayoutData$.pipe(R(p=>Math.max(...p.flat().map(d=>d.value))),tt()),u=W({fullParams:e.fullParams$,axisWidth:o,maxValue:l}).pipe(L(n),G(async p=>p),R(p=>UF({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType,fullParams:p.fullParams}))),c=e.fullChartParams$.pipe(L(n),R(p=>p.transitionDuration),tt()),f=new Du(!1),h=new dt(p=>{W({pieData:a,tweenArc:u,transitionDuration:c,fullParams:e.fullParams$,fullChartParams:e.fullChartParams$}).pipe(L(n),G(async d=>d)).subscribe(d=>{const m=d.pieData.map((y,b)=>(y.prevValue=i[b]&&i[b].id===y.id?i[b].value:0,y));f.next(!0);const g=e.containerSelection.selectAll("path").data(m,y=>y.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(y,b)=>y.data.color).attr("stroke",(y,b)=>St({datum:y.data,colorType:d.fullParams.strokeColorType,fullChartParams:d.fullChartParams})).attr("stroke-width",d.fullParams.strokeWidth);g.interrupt("graphicMove"),g.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(g),f.next(!1)}),i=Object.assign([],m)})}).pipe(pt(1));return W({pathSelection:h,SeriesDataMap:e.SeriesDataMap$,computedData:e.computedData$,highlightTarget:s}).pipe(L(n),G(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,m)=>{d.stopPropagation(),e.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:p.highlightTarget,datum:m.data,series:p.SeriesDataMap.get(m.data.seriesLabel),seriesIndex:m.data.seriesIndex,seriesLabel:m.data.seriesLabel,event:d,data:p.computedData})})}),W({pathSelection:h,highlight:e.seriesHighlight$.pipe(R(p=>p.map(d=>d.id))),fullParams:e.fullParams$,fullChartParams:e.fullChartParams$,tweenArc:u,isTransitionMoving:f}).pipe(L(n),G(async p=>p),Rr(p=>!p.isTransitionMoving)).subscribe(p=>{HF({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const qF=Sn(VF)(({selection:t,name:e,subject:n,observer:r})=>{const i=new J,{seriesCenterSelection$:o}=da({selection:t,pluginName:Qp,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(L(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const f=V(c[u]),h=r.visibleComputedLayoutData$.pipe(L(i),R(d=>JSON.parse(JSON.stringify(d[u]??d[0])))),p=r.seriesContainerPosition$.pipe(L(i),R(d=>JSON.parse(JSON.stringify(d[u]??d[0]))));a[u]=jF(Qp,{containerSelection:f,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedLayoutData$:r.visibleComputedLayoutData$,containerVisibleComputedLayoutData$:h,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Oi="RoseLabels",ZF=Z(Oi,"label-g"),KF=Z(Oi,"line-g"),QF=Z(Oi,"text"),z2=2,JF={name:Oi,defaultParams:Up,layerIndex:_p,validator:(t,{validateColumns:e})=>e(t,{outerRadius:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}})};function tz({pieData:t,labelCentroid:e,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o,lineStartCentroid:a,fullParams:s}){const l=i/2*o,u=n==="area"?.5:1,c=kn().domain([0,r]).range([0,l]).exponent(u);return t.map((f,h)=>{const p=c(f.value),d=Ql().innerRadius(0).outerRadius(p).padAngle(0).padRadius(p).cornerRadius(0),[m,g]=d.centroid(f),[y,b]=[m,g],v=s.labelFn(f.data);return{pieDatum:f,arcIndex:h,arcLabels:v.split(`
|
274
|
-
`),lineStartX:
|
275
|
-
<text x="${
|
276
|
-
<tspan>${
|
277
|
-
</text>`:"",
|
278
|
-
${
|
279
|
-
</text>`;return`${
|
280
|
-
<g ${r?`transform="translate(0, ${
|
281
|
-
${
|
282
|
-
</g>`}};
|
327
|
+
return \`\${seriesSvg}
|
328
|
+
<g \${hasSeriesLabel ? \`transform="translate(0, \${styles.textSizePx * 2})"\` : ''}>
|
329
|
+
\${datumSvg}
|
330
|
+
</g>\`
|
331
|
+
}`;const yz="Bubbles",eS=12,bz={name:yz,defaultParams:Z2,layerIndex:ht,validator:(e,{validateColumns:t})=>{const n=t(e,{force:{toBeTypes:["object"]},bubbleLabel:{toBeTypes:["object"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}});if(e.force){const r=t(e.force,{velocityDecay:{toBeTypes:["number"]},collisionSpacing:{toBeTypes:["number"]},strength:{toBeTypes:["number"]}});if(r.status==="error")return r}if(e.bubbleLabel){const r=t(e.bubbleLabel,{colorType:{toBeOption:"ColorType"},fillRate:{toBeTypes:["number"]},lineHeight:{toBeTypes:["number"]},maxLineLength:{toBeTypes:["number"]}});if(r.status==="error")return r}return n}};function xz(e,t){return Hs().velocityDecay(t.force.velocityDecay).force("collision",Us().radius(n=>n.r+t.force.collisionSpacing)).force("charge",qs().strength(n=>-Math.pow(n.r,2)*t.force.strength)).on("tick",()=>{e.attr("transform",n=>`translate(${n.x},${n.y})`)})}function $z({visibleComputedSortedData:e,LastBubbleDataMap:t,graphicWidth:n,graphicHeight:r,SeriesContainerPositionMap:i,scaleType:o}){const a=Math.min(n,r)/2,s=e.flat(),l=s.reduce((f,p)=>f+p.value,0),u=In().domain([0,l]).range([0,a]).exponent(o==="area"?.5:1),c=o==="area"?1:(()=>{const f=a*a*Math.PI;return Math.sqrt(f/Lc(s,p=>Math.PI*Math.pow(u(p.value),2)))})(),h=.9;return s.map(f=>{const p=f,d=t.get(p.id);if(d)p.x=d.x,p.y=d.y;else{const m=i.get(p.seriesLabel);p.x=Math.random()*m.width,p.y=Math.random()*m.height}const g=u(p.value??0)*c*h;return p.r=g,p._originR=g,p})}function vz({selection:e,bubblesData:t,fullParams:n,fullChartParams:r,sumSeries:i}){const o=e.selectAll("g").data(t,s=>s.id).join(s=>{const l=s.append("g").attr("cursor","pointer").attr("font-size",eS).style("fill","#ffffff").attr("text-anchor","middle");return l.append("circle").attr("class","node").attr("cx",0).attr("cy",0).attr("fill",u=>u.color),l.append("text").style("opacity",.8).attr("pointer-events","none"),l},s=>s,s=>s.remove()).attr("transform",s=>`translate(${s.x},${s.y})`),a=i?"seriesLabel":"label";return o.select("circle").transition().duration(200).attr("r",s=>s.r).attr("fill",s=>s.color),o.each((s,l,u)=>{const c=j(u[l]),h=s[a]??"";c.call(Uv,{text:h,radius:s.r*n.bubbleLabel.fillRate,lineHeight:eS*n.bubbleLabel.lineHeight,isBreakAll:h.length<=n.bubbleLabel.maxLineLength?!1:n.bubbleLabel.wordBreakAll}),c.select("text").attr("fill",f=>Se({datum:s,colorType:n.bubbleLabel.colorType,fullChartParams:r}))}),o}function Sz(e){return bs().on("start",(t,n)=>{t.active||e.alpha(1).restart(),n.fx=n.x,n.fy=n.y}).on("drag",(t,n)=>{t.active||e.alphaTarget(0),n.fx=t.x,n.fy=t.y}).on("end",(t,n)=>{n.fx=null,n.fy=null,e.alpha(1).restart()})}function _z({_simulation:e,fullParams:t,SeriesContainerPositionMap:n}){e.force("x",t1().strength(t.force.strength).x(r=>n.get(r.seriesLabel).centerX)).force("y",n1().strength(t.force.strength).y(r=>n.get(r.seriesLabel).centerY))}function wz({bubblesSelection:e,highlightIds:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").style("opacity",1);return}e.each((r,i,o)=>{const a=j(o[i]);t.includes(r.id)?a.style("opacity",1).transition("highlight").ease(cr).duration(500):a.style("opacity",n.styles.unhighlightedOpacity)})}const Tz=An(bz)(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q;let o,a=new Map;const s=n.fullDataFormatter$.pipe(L(f=>f.sumSeries),K()),l=n.fullParams$.pipe(D(i),L(f=>f.arcScaleType),K()),u=G({layout:n.layout$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,visibleComputedSortedData:n.visibleComputedSortedData$,scaleType:l}).pipe(D(i),z(async f=>f),L(f=>$z({visibleComputedSortedData:f.visibleComputedSortedData,LastBubbleDataMap:a,graphicWidth:f.layout.width,graphicHeight:f.layout.height,SeriesContainerPositionMap:f.SeriesContainerPositionMap,scaleType:f.scaleType})),se(1));u.subscribe(f=>{a=new Map(f.map(p=>[p.id,p]))});const c=n.fullChartParams$.pipe(D(i),L(f=>f.highlightTarget),K()),h=G({bubblesData:u,fullParams:n.fullParams$,fullChartParams:n.fullChartParams$,SeriesContainerPositionMap:n.SeriesContainerPositionMap$,sumSeries:s}).pipe(D(i),z(async f=>f),L(f=>{o&&o.stop();const p=vz({selection:e,bubblesData:f.bubblesData,fullParams:f.fullParams,fullChartParams:f.fullChartParams,sumSeries:f.sumSeries});return o=xz(p,f.fullParams),o.nodes(f.bubblesData),_z({_simulation:o,fullParams:f.fullParams,SeriesContainerPositionMap:f.SeriesContainerPositionMap}),o.alpha(1).restart(),p}),se(1));return G({bubblesSelection:h,computedData:n.computedData$,SeriesDataMap:n.SeriesDataMap$,highlightTarget:c}).pipe(D(i),z(async f=>f)).subscribe(f=>{f.bubblesSelection.on("mouseover",(p,d)=>{r.event$.next({type:"series",eventName:"mouseover",pluginName:t,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{r.event$.next({type:"series",eventName:"mousemove",pluginName:t,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{r.event$.next({type:"series",eventName:"mouseout",pluginName:t,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{r.event$.next({type:"series",eventName:"click",pluginName:t,highlightTarget:f.highlightTarget,datum:d,series:f.SeriesDataMap.get(d.seriesLabel),seriesIndex:d.seriesIndex,seriesLabel:d.seriesLabel,event:p,data:f.computedData})}).call(Sz(o))}),G({bubblesSelection:h,highlight:n.seriesHighlight$.pipe(L(f=>f.map(p=>p.id))),fullChartParams:n.fullChartParams$}).pipe(D(i),z(async f=>f)).subscribe(f=>{wz({bubblesSelection:f.bubblesSelection,highlightIds:f.highlight,fullChartParams:f.fullChartParams})}),()=>{i.next(void 0),o&&(o.stop(),o=void 0)}});function tS({data:e,startAngle:t,endAngle:n}){return B$().startAngle(t).endAngle(n).value(o=>o.value).sort((o,a)=>o.seq-a.seq)(e).map((o,a)=>{let s=o;return s.id=o.data.id,s})}function Az({selection:e,pluginName:t,separateSeries$:n,seriesLabels$:r}){const i=q(t,"series");return G({seriesLabels:r,separateSeries:n}).pipe(z(async o=>o),L((o,a)=>{const s=o.separateSeries?o.seriesLabels:[o.seriesLabels.join("")];return e.selectAll(`g.${i}`).data(s,l=>l).join(l=>l.append("g").classed(i,!0),l=>l,l=>l.remove())}),se(1))}const xa=({selection:e,pluginName:t,separateSeries$:n,seriesLabels$:r,seriesContainerPosition$:i})=>{const o=Az({selection:e,pluginName:t,separateSeries$:n,seriesLabels$:r});return G({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(z(async a=>a),K((a,s)=>a.seriesContainerPosition.length===s.seriesContainerPosition.length)).subscribe(a=>{a.seriesCenterSelection.attr("transform",(s,l)=>{const u=a.seriesContainerPosition[l]??a.seriesContainerPosition[0];return`translate(${u.centerX}, ${u.centerY})`})}),G({seriesCenterSelection:o,seriesContainerPosition:i}).pipe(z(async a=>a)).subscribe(a=>{a.seriesCenterSelection.transition().attr("transform",(s,l)=>{const u=a.seriesContainerPosition[l]??a.seriesContainerPosition[0];return`translate(${u.centerX}, ${u.centerY})`})}),{seriesCenterSelection$:o}},od="Pie",Pz={name:od,defaultParams:K2,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{outerRadius:{toBeTypes:["number"]},innerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeTypes:["string"]},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]}})};function Cz({enter:e,exit:t,data:n,lastTweenData:r,fullParams:i}){return!e.size()&&!t.size()?o=>{const a=n.map((s,l)=>{const u=r[l]??{startAngle:0,endAngle:0,value:0};return{...s,startAngle:s.startAngle*o+u.startAngle*(1-o),endAngle:s.endAngle*o+u.endAngle*(1-o),value:s.value*o+u.value*(1-o)}});return ad(a,i.startAngle,i.endAngle,1)}:o=>ad(n,i.startAngle,i.endAngle,o)}function ad(e,t,n,r){return e.map((i,o)=>{const a=t+(i.startAngle-t)*r,s=a+(i.endAngle-i.startAngle)*r;return{...i,startAngle:a,endAngle:s}})}function nS({selection:e,data:t,arc:n,pathClassName:r,fullParams:i,fullChartParams:o}){return e.selectAll("path").data(t,s=>s.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(s,l)=>s.data.color).attr("stroke",(s,l)=>Se({datum:s.data,colorType:i.strokeColorType,fullChartParams:o})).attr("stroke-width",i.strokeWidth).attr("d",(s,l)=>n(s))}function Dz({pathSelection:e,ids:t,fullChartParams:n,arc:r,arcHighlight:i}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").style("opacity",1).attr("d",o=>r(o));return}e.each((o,a,s)=>{const l=j(s[a]);t.includes(o.data.id)?l.style("opacity",1).transition("highlight").ease(cr).duration(500).attr("d",u=>i(u)):l.style("opacity",n.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>r(u))})}function Mz(e,t){const n=new Q,r=q(e,"path");let i=[],o=[];const a=t.seriesContainerPosition$.pipe(D(n),L(f=>f.width<f.height?f.width:f.height),K()),s=new ge(f=>{G({containerVisibleComputedSortedData:t.containerVisibleComputedSortedData$,fullParams:t.fullParams$}).pipe(D(n),z(async p=>p)).subscribe(p=>{const d=tS({data:p.containerVisibleComputedSortedData,startAngle:p.fullParams.startAngle,endAngle:p.fullParams.endAngle});f.next(d)})}),l=new ge(f=>{G({shorterSideWith:a,fullParams:t.fullParams$}).pipe(D(n),z(async p=>p)).subscribe(p=>{const d=du({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadius,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),u=new ge(f=>{G({shorterSideWith:a,fullParams:t.fullParams$}).pipe(D(n),z(async p=>p)).subscribe(p=>{const d=du({axisWidth:p.shorterSideWith,innerRadius:p.fullParams.innerRadius,outerRadius:p.fullParams.outerRadiusWhileHighlight,padAngle:p.fullParams.padAngle,cornerRadius:p.fullParams.cornerRadius});f.next(d)})}),c=t.fullChartParams$.pipe(D(n),L(f=>f.highlightTarget),K()),h=new ge(f=>{G({pieData:s,arc:l,computedData:t.computedData$,fullParams:t.fullParams$,fullChartParams:t.fullChartParams$,highlightTarget:c}).pipe(D(n),z(async p=>p)).subscribe(p=>{t.containerSelection.interrupt("graphicMove");const d=t.containerSelection.selectAll("path").data(p.pieData,y=>y.id),g=d.enter(),m=d.exit(),b=Cz({enter:g,exit:m,data:p.pieData,lastTweenData:i,fullParams:p.fullParams});t.containerSelection.transition("graphicMove").duration(p.fullChartParams.transitionDuration).tween("move",(y,x)=>$=>{o=b($),nS({selection:t.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams})}).on("end",(y,x)=>{o=ad(p.pieData,p.fullParams.startAngle,p.fullParams.endAngle,1);const $=nS({selection:t.containerSelection,data:o,arc:p.arc,pathClassName:r,fullParams:p.fullParams,fullChartParams:p.fullChartParams});f.next($),i=Object.assign([],p.pieData),t.event$.next({type:"series",pluginName:e,eventName:"transitionEnd",event:void 0,highlightTarget:p.highlightTarget,datum:null,series:[],seriesIndex:-1,seriesLabel:"",data:p.computedData})})})}).pipe(se(1));return G({pathSelection:h,SeriesDataMap:t.SeriesDataMap$,computedData:t.computedData$,highlightTarget:c}).pipe(D(n),z(async f=>f)).subscribe(f=>{f.pathSelection.on("mouseover",(p,d)=>{p.stopPropagation(),t.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mousemove",(p,d)=>{p.stopPropagation(),t.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("mouseout",(p,d)=>{p.stopPropagation(),t.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})}).on("click",(p,d)=>{p.stopPropagation(),t.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:f.highlightTarget,datum:d.data,series:f.SeriesDataMap.get(d.data.seriesLabel),seriesIndex:d.data.seriesIndex,seriesLabel:d.data.seriesLabel,event:p,data:f.computedData})})}),G({pathSelection:h,highlight:t.seriesHighlight$.pipe(L(f=>f.map(p=>p.id))),fullChartParams:t.fullChartParams$,arc:l,arcHighlight:u}).pipe(D(n),z(async f=>f)).subscribe(f=>{Dz({pathSelection:f.pathSelection,ids:f.highlight,fullChartParams:f.fullChartParams,arc:f.arc,arcHighlight:f.arcHighlight})}),()=>{n.next(void 0)}}const Lz=An(Pz)(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,{seriesCenterSelection$:o}=xa({selection:e,pluginName:od,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(D(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const h=j(c[u]),f=r.visibleComputedSortedData$.pipe(D(i),L(d=>d[u]??d[0])),p=r.seriesContainerPosition$.pipe(D(i),L(d=>d[u]??d[0]));a[u]=Mz(od,{containerSelection:h,computedData$:r.computedData$,containerVisibleComputedSortedData$:f,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),vu="PieEventTexts",rS=q(vu,"text"),kz={name:vu,defaultParams:td,layerIndex:mu,validator:(e,{validateColumns:t})=>t(e,{renderFn:{toBeTypes:["Function"]},textAttrs:{toBeTypes:["object[]"]},textStyles:{toBeTypes:["object[]"]}})};function sd(e,t){const n=e.selectAll(`text.${rS}`).data(t),r=n.enter().append("text").classed(rS,!0),i=n.merge(r);return i.each((o,a,s)=>{const l=j(s[a]).text(o.text);Object.keys(o.attr).forEach(u=>{l.attr(u,o.attr[u])}),Object.keys(o.style).forEach(u=>{l.style(u,o.style[u])})}),n.exit().remove(),i}function ld({eventData:e,renderFn:t,textAttrs:n,textStyles:r}){const i=t(e);return(Array.isArray(i)?i:[i]).map((a,s)=>({text:a,attr:n[s],style:r[s]}))}function Rz(e,t){const n=new Q;let r;const i=t.fullChartParams$.pipe(D(n),L(o=>o.highlightTarget),K());return G({computedData:t.computedData$,fullParams:t.fullParams$,fullChartParams:t.fullChartParams$,highlightTarget:i}).pipe(D(n),z(async o=>o)).subscribe(o=>{t.containerSelection.transition("move").duration(o.fullChartParams.transitionDuration).tween("move",(a,s)=>l=>{const u=ld({eventData:{type:"series",pluginName:e,eventName:"transitionMove",event:a,tween:l,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});sd(t.containerSelection,u)}).on("end",(a,s)=>{const l=ld({eventData:{type:"series",pluginName:e,eventName:"transitionEnd",event:a,tween:1,highlightTarget:o.highlightTarget,data:o.computedData,series:[],seriesIndex:-1,seriesLabel:"",datum:null},renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});sd(t.containerSelection,l),r&&r.unsubscribe(),r=t.event$.subscribe(u=>{const c=ld({eventData:u,renderFn:o.fullParams.renderFn,textAttrs:o.fullParams.textAttrs,textStyles:o.fullParams.textStyles});sd(t.containerSelection,c)})})}),()=>{n.next(void 0)}}const Ez=An(kz)(({selection:e,name:t,observer:n,subject:r})=>{const i=new Q,{seriesCenterSelection$:o}=xa({selection:e,pluginName:vu,separateSeries$:n.separateSeries$,seriesLabels$:n.seriesLabels$,seriesContainerPosition$:n.seriesContainerPosition$}),a=[];return o.pipe(D(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const h=j(c[u]),f=n.computedSortedData$.pipe(D(i),L(d=>d[u]??d[0])),p=n.seriesContainerPosition$.pipe(D(i),L(d=>d[u]??d[0]));a[u]=Rz(vu,{containerSelection:h,computedData$:n.computedData$,containerComputedSortedData$:f,SeriesDataMap$:n.SeriesDataMap$,fullParams$:n.fullParams$,fullChartParams$:n.fullChartParams$,seriesHighlight$:n.seriesHighlight$,seriesContainerPosition$:p,event$:r.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Wi="PieLabels",Iz=q(Wi,"label-g"),Bz=q(Wi,"line-g"),Nz=q(Wi,"text"),iS=2,Fz={name:Wi,defaultParams:nd,layerIndex:mu,validator:(e,{validateColumns:t})=>t(e,{outerRadius:{toBeTypes:["number"]},outerRadiusWhileHighlight:{toBeTypes:["number"]},startAngle:{toBeTypes:["number"]},endAngle:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"}})};function zz({pieData:e,arc:t,arcMouseover:n,labelCentroid:r,lineStartCentroid:i,fullParams:o}){return e.map((a,s)=>{const[l,u]=t.centroid(a),[c,h]=n.centroid(a),f=o.labelFn(a.data);return{pieDatum:a,arcIndex:s,arcLabels:f.split(`
|
332
|
+
`),lineStartX:l*i,lineStartY:u*i,lineStartMouseoverX:c*i,lineStartMouseoverY:h*i,x:l*r,y:u*r,mouseoverX:c*r,mouseoverY:h*r,textWidth:0,collisionShiftX:0,collisionShiftY:0,quadrant:l>=0&&u<=0?1:l<0&&u<=0?2:l<0&&u>0?3:4}}).filter(a=>a.pieDatum.data.visible)}function Oz({labelGSelection:e,data:t,fullParams:n,fullChartParams:r,textSizePx:i}){const o=e.selectAll("text").data(t,a=>a.pieDatum.id).join("text").classed(Nz,!0).attr("font-weight","bold").attr("text-anchor",a=>a.quadrant==1||a.quadrant==4?"start":"end").style("dominant-baseline",a=>a.quadrant==1||a.quadrant==2?"auto":"hanging").style("cursor",a=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").attr("font-size",r.styles.textSize).attr("x",0).attr("y",0).attr("fill",(a,s)=>Se({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).each((a,s,l)=>{Hv(j(l[s]),{textArr:a.arcLabels,textSizePx:i,quadrant:a.quadrant})});return o.transition().attr("transform",a=>"translate("+a.x+","+a.y+")"),o}function Gz(e,t,n){const r=e.nodes(),i=n,o=r.map((a,s)=>{const l=a.getBBox(),u=[t[s].x,t[s].y];return{node:a,x:u[0],y:u[1],width:l.width,height:l.height}});for(let a=0;a<o.length;a++){const s=o[a];for(let l=a+1;l<o.length;l++){const u=o[l];t[a].textWidth=s.width;const c=s.x+t[a].collisionShiftX,h=s.y+t[a].collisionShiftY,f=u.x+t[l].collisionShiftX,p=u.y+t[l].collisionShiftY;if(!(c+s.width/2<f-u.width/2||c-s.width/2>f+u.width/2||h+s.height/2<p-u.height/2||h-s.height/2>p+u.height/2)){if(t[l].quadrant==2){const d=p>h?-i*2:-i;t[l].collisionShiftY+=d}else if(t[l].quadrant==4){const d=p>h?i:i*2;t[l].collisionShiftY+=d}}}}for(let a=o.length-1;a>=0;a--){const s=o[a];for(let l=a-1;l>=0;l--){const u=o[l];t[a].textWidth=s.width;const c=s.x+t[a].collisionShiftX,h=s.y+t[a].collisionShiftY,f=u.x+t[l].collisionShiftX,p=u.y+t[l].collisionShiftY;if(!(c+s.width/2<f-u.width/2||c-s.width/2>f+u.width/2||h+s.height/2<p-u.height/2||h-s.height/2>p+u.height/2)){if(t[l].quadrant==1){const d=p>h?-i*2:-i;t[l].collisionShiftY+=d}else if(t[l].quadrant==3){const d=p>h?i:i*2;t[l].collisionShiftY+=d}}}}e.data(t).transition().attr("transform",a=>`translate(${a.x+a.collisionShiftX},${a.y+a.collisionShiftY})`)}function Wz({lineGSelection:e,data:t,fullParams:n,fullChartParams:r}){const i=t.filter(a=>a.collisionShiftX||a.collisionShiftY),o=e.selectAll("polyline").data(i,a=>a.pieDatum.id).join("polyline").attr("stroke",a=>Se({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).attr("stroke-width",1).attr("fill","none").attr("points",a=>[[a.lineStartX,a.lineStartY],[a.lineStartX,a.lineStartY]]);return o.transition().attr("points",a=>{let s=a.x+a.collisionShiftX,l=a.y+a.collisionShiftY;return[[s,l],[a.lineStartX,a.lineStartY]]}),o}function Yz({textSelection:e,lineSelection:t,ids:n,fullChartParams:r}){if(e.interrupt("highlight"),t.interrupt("highlight"),!n.length){e.transition("highlight").duration(200).attr("transform",i=>`translate(${i.x+i.collisionShiftX},${i.y+i.collisionShiftY})`).style("opacity",1),t.transition("highlight").duration(200).style("opacity",1);return}e.each((i,o,a)=>{const s=j(a[o]);n.includes(i.pieDatum.id)?s.style("opacity",1).transition("highlight").duration(200).attr("transform",l=>l.collisionShiftX||l.collisionShiftY?`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`:`translate(${l.mouseoverX+l.collisionShiftX},${l.mouseoverY+l.collisionShiftY})`):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200).attr("transform",l=>`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`)}),t.each((i,o,a)=>{const s=j(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function Vz(e,t){const n=new Q;t.containerSelection.selectAll("g").remove();const r=t.containerSelection.append("g");r.classed(Bz,!0);const i=t.containerSelection.append("g");i.classed(Iz,!0);const o=new Q,a=new Q;let s=[];const l=t.seriesContainerPosition$.pipe(D(n),L(c=>c.width<c.height?c.width:c.height),K()),u=t.fullParams$.pipe(D(n),L(c=>c.labelCentroid>=iS?iS:c.labelCentroid));return G({shorterSideWith:l,containerVisibleComputedSortedData:t.containerVisibleComputedSortedData$,fullParams:t.fullParams$,fullChartParams:t.fullChartParams$,textSizePx:t.textSizePx$,lineStartCentroid:u}).pipe(D(n),z(async c=>c)).subscribe(c=>{const h=du({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadius,padAngle:0,cornerRadius:0}),f=du({axisWidth:c.shorterSideWith,innerRadius:0,outerRadius:c.fullParams.outerRadiusWhileHighlight,padAngle:0,cornerRadius:0}),p=tS({data:c.containerVisibleComputedSortedData,startAngle:c.fullParams.startAngle,endAngle:c.fullParams.endAngle});s=zz({pieData:p,arc:h,arcMouseover:f,labelCentroid:c.fullParams.labelCentroid,lineStartCentroid:c.lineStartCentroid,fullParams:c.fullParams}),r.selectAll("polyline").remove();const d=Oz({labelGSelection:i,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams,textSizePx:c.textSizePx});setTimeout(()=>{Gz(d,s,c.textSizePx);const g=Wz({lineGSelection:r,data:s,fullParams:c.fullParams,fullChartParams:c.fullChartParams});a.next(g)},1e3),o.next(d)}),G({textSelection:o,lineSelection:a,highlight:t.seriesHighlight$.pipe(L(c=>c.map(h=>h.id))),fullChartParams:t.fullChartParams$}).pipe(D(n),z(async c=>c)).subscribe(c=>{Yz({textSelection:c.textSelection,lineSelection:c.lineSelection,ids:c.highlight,fullChartParams:c.fullChartParams})}),()=>{n.next(void 0)}}const jz=An(Fz)(({selection:e,observer:t,subject:n})=>{const r=new Q,{seriesCenterSelection$:i}=xa({selection:e,pluginName:Wi,separateSeries$:t.separateSeries$,seriesLabels$:t.seriesLabels$,seriesContainerPosition$:t.seriesContainerPosition$}),o=[];return i.pipe(D(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,l,u)=>{const c=j(u[l]),h=t.visibleComputedSortedData$.pipe(D(r),L(p=>p[l]??p[0])),f=t.seriesContainerPosition$.pipe(D(r),L(p=>p[l]??p[0]));o[l]=Vz(Wi,{containerSelection:c,containerVisibleComputedSortedData$:h,fullParams$:t.fullParams$,fullChartParams$:t.fullChartParams$,textSizePx$:t.textSizePx$,seriesHighlight$:t.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),ud="Rose",Xz=Math.PI*2,Uz={name:ud,defaultParams:Q2,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{outerRadius:{toBeTypes:["number"]},padAngle:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},strokeWidth:{toBeTypes:["number"]},cornerRadius:{toBeTypes:["number"]},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"},angleIncreaseWhileHighlight:{toBeTypes:["number"]}})};function Hz({cornerRadius:e,outerRadius:t,axisWidth:n,maxValue:r,arcScaleType:i,fullParams:o}){const a=n/2*t,s=i==="area"?.5:1,l=In().domain([0,r]).range([0,a]).exponent(s);return u=>{const c=l(u.prevValue),h=l(u.value),f=sn(c,h);return p=>{const d=f(p);return nu().innerRadius(0).outerRadius(d).padAngle(o.padAngle).padRadius(d).cornerRadius(e)(u)}}}function qz({pathSelection:e,ids:t,fullParams:n,fullChartParams:r,tweenArc:i}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").style("opacity",1).attr("d",o=>i(o)(1));return}e.each((o,a,s)=>{const l=j(s[a]);t.includes(o.data.id)?l.style("opacity",1).transition("highlight").ease(cr).duration(500).attr("d",u=>i({...u,startAngle:u.startAngle-n.angleIncreaseWhileHighlight,endAngle:u.endAngle+n.angleIncreaseWhileHighlight})(1)):l.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").attr("d",u=>i(u)(1))})}function Zz(e,t){const n=new Q,r=q(e,"path");let i=[];const o=t.seriesContainerPosition$.pipe(D(n),L(p=>p.width<p.height?p.width:p.height),K()),a=G({containerVisibleComputedSortedData:t.containerVisibleComputedSortedData$,fullParams:t.fullParams$}).pipe(D(n),z(async p=>p),L(p=>{const d=Xz/p.containerVisibleComputedSortedData.length;return p.containerVisibleComputedSortedData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:d*m,endAngle:d*(m+1),padAngle:p.fullParams.padAngle,prevValue:i[m]&&i[m].id===g.id?i[m].value:0}))})),s=t.fullChartParams$.pipe(D(n),L(p=>p.highlightTarget),K()),l=t.visibleComputedSortedData$.pipe(L(p=>Math.max(...p.flat().map(d=>d.value))),K()),u=G({fullParams:t.fullParams$,axisWidth:o,maxValue:l}).pipe(D(n),z(async p=>p),L(p=>Hz({cornerRadius:p.fullParams.cornerRadius,outerRadius:p.fullParams.outerRadius,axisWidth:p.axisWidth,maxValue:p.maxValue,arcScaleType:p.fullParams.arcScaleType,fullParams:p.fullParams}))),c=t.fullChartParams$.pipe(D(n),L(p=>p.transitionDuration),K()),h=new ku(!1),f=new ge(p=>{G({pieData:a,tweenArc:u,transitionDuration:c,fullParams:t.fullParams$,fullChartParams:t.fullChartParams$}).pipe(D(n),z(async d=>d)).subscribe(d=>{const g=d.pieData.map((b,y)=>(b.prevValue=i[y]&&i[y].id===b.id?i[y].value:0,b));h.next(!0);const m=t.containerSelection.selectAll("path").data(g,b=>b.id).join("path").classed(r,!0).style("cursor","pointer").attr("fill",(b,y)=>b.data.color).attr("stroke",(b,y)=>Se({datum:b.data,colorType:d.fullParams.strokeColorType,fullChartParams:d.fullChartParams})).attr("stroke-width",d.fullParams.strokeWidth);m.interrupt("graphicMove"),m.transition("graphicMove").duration(d.transitionDuration).attrTween("d",d.tweenArc).on("end",()=>{p.next(m),h.next(!1)}),i=Object.assign([],g)})}).pipe(se(1));return G({pathSelection:f,SeriesDataMap:t.SeriesDataMap$,computedData:t.computedData$,highlightTarget:s}).pipe(D(n),z(async p=>p)).subscribe(p=>{p.pathSelection.on("mouseover",(d,g)=>{d.stopPropagation(),t.event$.next({type:"series",eventName:"mouseover",pluginName:e,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mousemove",(d,g)=>{d.stopPropagation(),t.event$.next({type:"series",eventName:"mousemove",pluginName:e,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("mouseout",(d,g)=>{d.stopPropagation(),t.event$.next({type:"series",eventName:"mouseout",pluginName:e,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})}).on("click",(d,g)=>{d.stopPropagation(),t.event$.next({type:"series",eventName:"click",pluginName:e,highlightTarget:p.highlightTarget,datum:g.data,series:p.SeriesDataMap.get(g.data.seriesLabel),seriesIndex:g.data.seriesIndex,seriesLabel:g.data.seriesLabel,event:d,data:p.computedData})})}),G({pathSelection:f,highlight:t.seriesHighlight$.pipe(L(p=>p.map(d=>d.id))),fullParams:t.fullParams$,fullChartParams:t.fullChartParams$,tweenArc:u,isTransitionMoving:h}).pipe(D(n),z(async p=>p),Ir(p=>!p.isTransitionMoving)).subscribe(p=>{qz({pathSelection:p.pathSelection,ids:p.highlight,fullParams:p.fullParams,fullChartParams:p.fullChartParams,tweenArc:p.tweenArc})}),()=>{n.next(void 0)}}const Kz=An(Uz)(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,{seriesCenterSelection$:o}=xa({selection:e,pluginName:ud,separateSeries$:r.separateSeries$,seriesLabels$:r.seriesLabels$,seriesContainerPosition$:r.seriesContainerPosition$}),a=[];return o.pipe(D(i)).subscribe(s=>{a.forEach(l=>l()),s.each((l,u,c)=>{const h=j(c[u]),f=r.visibleComputedSortedData$.pipe(D(i),L(d=>JSON.parse(JSON.stringify(d[u]??d[0])))),p=r.seriesContainerPosition$.pipe(D(i),L(d=>JSON.parse(JSON.stringify(d[u]??d[0]))));a[u]=Zz(ud,{containerSelection:h,computedData$:r.computedData$,visibleComputedData$:r.visibleComputedData$,visibleComputedSortedData$:r.visibleComputedSortedData$,containerVisibleComputedSortedData$:f,SeriesDataMap$:r.SeriesDataMap$,fullParams$:r.fullParams$,fullChartParams$:r.fullChartParams$,seriesHighlight$:r.seriesHighlight$,seriesContainerPosition$:p,event$:n.event$})})}),()=>{i.next(void 0),a.forEach(s=>s())}}),Yi="RoseLabels",Qz=q(Yi,"label-g"),Jz=q(Yi,"line-g"),eO=q(Yi,"text"),oS=2,tO={name:Yi,defaultParams:rd,layerIndex:mu,validator:(e,{validateColumns:t})=>t(e,{outerRadius:{toBeTypes:["number"]},labelCentroid:{toBeTypes:["number"]},labelFn:{toBeTypes:["Function"]},labelColorType:{toBeOption:"ColorType"},arcScaleType:{toBe:'"area" | "radius"',test:r=>r==="area"||r==="radius"}})};function nO({pieData:e,labelCentroid:t,arcScaleType:n,maxValue:r,axisWidth:i,outerRadius:o,lineStartCentroid:a,fullParams:s}){const l=i/2*o,u=n==="area"?.5:1,c=In().domain([0,r]).range([0,l]).exponent(u);return e.map((h,f)=>{const p=c(h.value),d=nu().innerRadius(0).outerRadius(p).padAngle(0).padRadius(p).cornerRadius(0),[g,m]=d.centroid(h),[b,y]=[g,m],x=s.labelFn(h.data);return{pieDatum:h,arcIndex:f,arcLabels:x.split(`
|
333
|
+
`),lineStartX:g*a,lineStartY:m*a,lineStartMouseoverX:b*a,lineStartMouseoverY:y*a,x:g*t,y:m*t,mouseoverX:b*t,mouseoverY:y*t,textWidth:0,collisionShiftX:0,collisionShiftY:0,quadrant:g>=0&&m<=0?1:g<0&&m<=0?2:g<0&&m>0?3:4}}).filter(h=>h.pieDatum.data.visible)}function rO({labelGSelection:e,data:t,fullParams:n,fullChartParams:r,textSizePx:i}){const o=e.selectAll("text").data(t,a=>a.pieDatum.id).join("text").classed(eO,!0).attr("font-weight","bold").attr("text-anchor",a=>a.quadrant==1||a.quadrant==4?"start":"end").style("dominant-baseline",a=>a.quadrant==1||a.quadrant==2?"auto":"hanging").style("cursor",a=>r.highlightTarget&&r.highlightTarget!="none"?"pointer":"none").attr("font-size",r.styles.textSize).attr("fill",(a,s)=>Se({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).each((a,s,l)=>{Hv(j(l[s]),{textArr:a.arcLabels,textSizePx:i,quadrant:a.quadrant})});return o.transition().attr("transform",a=>"translate("+a.x+","+a.y+")"),o}function iO(e,t,n){const r=e.nodes(),i=n,o=r.map((a,s)=>{const l=a.getBBox(),u=[t[s].x,t[s].y];return{node:a,x:u[0],y:u[1],width:l.width,height:l.height}});for(let a=0;a<o.length;a++){const s=o[a];for(let l=a+1;l<o.length;l++){const u=o[l];t[a].textWidth=s.width;const c=s.x+t[a].collisionShiftX,h=s.y+t[a].collisionShiftY,f=u.x+t[l].collisionShiftX,p=u.y+t[l].collisionShiftY;if(!(c+s.width/2<f-u.width/2||c-s.width/2>f+u.width/2||h+s.height/2<p-u.height/2||h-s.height/2>p+u.height/2)){if(t[l].quadrant==2){const d=p>h?-i*2:-i;t[l].collisionShiftY+=d}else if(t[l].quadrant==4){const d=p>h?i:i*2;t[l].collisionShiftY+=d}}}}for(let a=o.length-1;a>=0;a--){const s=o[a];for(let l=a-1;l>=0;l--){const u=o[l];t[a].textWidth=s.width;const c=s.x+t[a].collisionShiftX,h=s.y+t[a].collisionShiftY,f=u.x+t[l].collisionShiftX,p=u.y+t[l].collisionShiftY;if(!(c+s.width/2<f-u.width/2||c-s.width/2>f+u.width/2||h+s.height/2<p-u.height/2||h-s.height/2>p+u.height/2)){if(t[l].quadrant==1){const d=p>h?-i*2:-i;t[l].collisionShiftY+=d}else if(t[l].quadrant==3){const d=p>h?i:i*2;t[l].collisionShiftY+=d}}}}e.data(t).transition().attr("transform",a=>`translate(${a.x+a.collisionShiftX},${a.y+a.collisionShiftY})`)}function oO({lineGSelection:e,data:t,fullParams:n,fullChartParams:r}){const i=t.filter(a=>a.collisionShiftX||a.collisionShiftY),o=e.selectAll("polyline").data(i,a=>a.pieDatum.id).join("polyline").attr("stroke",a=>Se({datum:a.pieDatum.data,colorType:n.labelColorType,fullChartParams:r})).attr("stroke-width",1).attr("fill","none").attr("points",a=>[[a.lineStartX,a.lineStartY],[a.lineStartX,a.lineStartY]]);return o.transition().attr("points",a=>{let s=a.x+a.collisionShiftX,l=a.y+a.collisionShiftY;return[[s,l],[a.lineStartX,a.lineStartY]]}),o}function aO({textSelection:e,lineSelection:t,ids:n,fullChartParams:r}){if(e.interrupt("highlight"),t.interrupt("highlight"),!n.length){e.transition("highlight").duration(200).attr("transform",i=>`translate(${i.x+i.collisionShiftX},${i.y+i.collisionShiftY})`).style("opacity",1),t.transition("highlight").duration(200).style("opacity",1);return}e.each((i,o,a)=>{const s=j(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200).attr("transform",l=>`translate(${l.mouseoverX+l.collisionShiftX},${l.mouseoverY+l.collisionShiftY})`):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200).attr("transform",l=>`translate(${l.x+l.collisionShiftX},${l.y+l.collisionShiftY})`)}),t.each((i,o,a)=>{const s=j(a[o]);n.includes(i.pieDatum.data.id)?s.style("opacity",1).transition("highlight").duration(200):s.style("opacity",r.styles.unhighlightedOpacity).transition("highlight").duration(200)})}function sO(e,t){const n=new Q;t.containerSelection.selectAll("g").remove();const r=t.containerSelection.append("g");r.classed(Jz,!0);const i=t.containerSelection.append("g");i.classed(Qz,!0);const o=new Q,a=new Q;let s=[];const l=t.seriesContainerPosition$.pipe(D(n),L(h=>h.width<h.height?h.width:h.height),K()),u=t.visibleComputedSortedData$.pipe(L(h=>Math.max(...h.flat().map(f=>f.value))),K()),c=t.fullParams$.pipe(D(n),L(h=>h.labelCentroid>=oS?oS:h.labelCentroid));return G({shorterSideWith:l,containerVisibleComputedSortedData:t.containerVisibleComputedSortedData$,maxValue:u,fullParams:t.fullParams$,fullChartParams:t.fullChartParams$,textSizePx:t.textSizePx$,lineStartCentroid:c}).pipe(D(n),z(async h=>h)).subscribe(h=>{const f=Math.PI*2/h.containerVisibleComputedSortedData.length,p=h.containerVisibleComputedSortedData.map((g,m)=>({id:g.id,data:g,index:m,value:g.value,startAngle:f*m,endAngle:f*(m+1),padAngle:0}));s=nO({pieData:p,labelCentroid:h.fullParams.labelCentroid,arcScaleType:h.fullParams.arcScaleType,maxValue:h.maxValue,axisWidth:h.shorterSideWith,outerRadius:h.fullParams.outerRadius,lineStartCentroid:h.lineStartCentroid,fullParams:h.fullParams}),r.selectAll("polyline").remove();const d=rO({labelGSelection:i,data:s,fullParams:h.fullParams,fullChartParams:h.fullChartParams,textSizePx:h.textSizePx});setTimeout(()=>{iO(d,s,h.textSizePx);const g=oO({lineGSelection:r,data:s,fullParams:h.fullParams,fullChartParams:h.fullChartParams});a.next(g)},1e3),o.next(d)}),G({textSelection:o,lineSelection:a,highlight:t.seriesHighlight$.pipe(L(h=>h.map(f=>f.id))),fullChartParams:t.fullChartParams$}).pipe(D(n),z(async h=>h)).subscribe(h=>{aO({textSelection:h.textSelection,lineSelection:h.lineSelection,ids:h.highlight,fullChartParams:h.fullChartParams})}),()=>{n.next(void 0)}}const lO=An(tO)(({selection:e,observer:t,subject:n})=>{const r=new Q,{seriesCenterSelection$:i}=xa({selection:e,pluginName:Yi,separateSeries$:t.separateSeries$,seriesLabels$:t.seriesLabels$,seriesContainerPosition$:t.seriesContainerPosition$}),o=[];return i.pipe(D(r)).subscribe(a=>{o.forEach(s=>s()),a.each((s,l,u)=>{const c=j(u[l]),h=t.visibleComputedSortedData$.pipe(D(r),L(p=>JSON.parse(JSON.stringify(p[l]??p[0])))),f=t.seriesContainerPosition$.pipe(D(r),L(p=>JSON.parse(JSON.stringify(p[l]??p[0]))));o[l]=sO(Yi,{containerSelection:c,visibleComputedSortedData$:t.visibleComputedSortedData$,containerVisibleComputedSortedData$:h,fullParams$:t.fullParams$,fullChartParams$:t.fullChartParams$,textSizePx$:t.textSizePx$,seriesHighlight$:t.seriesHighlight$,seriesContainerPosition$:f,event$:n.event$})})}),()=>{r.next(void 0)}}),aS="SeriesLegend",uO=An({name:aS,defaultParams:J2,layerIndex:Ei,validator:(e,{validateColumns:t})=>t(e,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:e,rootSelection:t,observer:n,subject:r})=>{const i=new Q,o=n.SeriesDataMap$.pipe(D(i),L(l=>Array.from(l.keys()))),a=n.fullParams$.pipe(D(i),L(l=>{const u=[{listRectWidth:l.listRectWidth,listRectHeight:l.listRectHeight,listRectRadius:l.listRectRadius}];return{...l,labelList:u}})),s=Bi(aS,{rootSelection:t,legendLabels$:o,fullParams$:a,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),s()}}),sS="SeriesTooltip",cO=An({name:sS,defaultParams:id,layerIndex:Ii,validator:(e,{validateColumns:t})=>t(e,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=Fi(sS,{rootSelection:t,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}}),cd={paddingInner:2,paddingOuter:2,labelColorType:"labelContrast",squarifyRatio:1.618034,sort:(e,t)=>t.value-e.value};cd.sort.toString=()=>"(a, b) => b.value - a.value";const lS={placement:"right-end",padding:28,backgroundFill:"none",backgroundStroke:"none",gap:10,listRectWidth:14,listRectHeight:14,listRectRadius:0,textColorType:"primary"},fd={backgroundColorType:"background",strokeColorType:"primary",backgroundOpacity:.8,textColorType:"primary",offset:[20,5],padding:10,renderFn:(e,{styles:t,utils:n})=>{const r=!!e.categoryLabel,i=!!e.datum.label,o=n.toCurrency(e.datum.value),a=t.textSizePx*.7,s=t.textSizePx/2-a/2,l=r?`<rect width="${a}" height="${a}" x="${s}" y="${s-1}" rx="${a/2}" fill="${e.datum.color}"></rect>
|
334
|
+
<text x="${t.textSizePx*1.5}" font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
335
|
+
<tspan>${e.categoryLabel}</tspan>
|
336
|
+
</text>`:"",u=i?`<tspan>${e.datum.label}</tspan> `:"",c=r?n.measureTextWidth(`${e.categoryLabel}${o}`,t.textSizePx)+t.textSizePx*1.5:0,h=i?n.measureTextWidth(`${e.datum.label}${o}`,t.textSizePx):0,f=Math.max(c,h),p=i?f+t.textSizePx*.5:0,d=i?"end":"start",g=`<text font-size="${t.textSizePx}" dominant-baseline="hanging" fill="${t.textColor}">
|
337
|
+
${u}<tspan font-weight="bold" text-anchor="${d}" x="${p}">${o}</tspan>
|
338
|
+
</text>`;return`${l}
|
339
|
+
<g ${r?`transform="translate(0, ${t.textSizePx*2})"`:""}>
|
340
|
+
${g}
|
341
|
+
</g>`}};fd.renderFn.toString=()=>`(eventData, { styles, utils }) => {
|
283
342
|
const hasCategoryLabel = eventData.categoryLabel ? true : false
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
</
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
</
|
343
|
+
const hasDatumLabel = eventData.datum.label ? true : false
|
344
|
+
const valueText = utils.toCurrency(eventData.datum.value)
|
345
|
+
const bulletWidth = styles.textSizePx * 0.7
|
346
|
+
const offset = (styles.textSizePx / 2) - (bulletWidth / 2)
|
347
|
+
const categorySvg = hasCategoryLabel
|
348
|
+
? \`<rect width="\${bulletWidth}" height="\${bulletWidth}" x="\${offset}" y="\${offset - 1}" rx="\${bulletWidth / 2}" fill="\${eventData.datum.color}"></rect>
|
349
|
+
<text x="\${styles.textSizePx * 1.5}" font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
350
|
+
<tspan>\${eventData.categoryLabel}</tspan>
|
351
|
+
</text>\`
|
352
|
+
: ''
|
353
|
+
const datumLabelSvg = hasDatumLabel
|
354
|
+
? \`<tspan>\${eventData.datum.label}</tspan> \`
|
355
|
+
: ''
|
356
|
+
const categoryLabelTextWidth = hasCategoryLabel
|
357
|
+
? utils.measureTextWidth(\`\${eventData.categoryLabel}\${valueText}\`, styles.textSizePx) + styles.textSizePx * 1.5
|
358
|
+
: 0
|
359
|
+
const datumLabelTextWidth = hasDatumLabel
|
360
|
+
? utils.measureTextWidth(\`\${eventData.datum.label}\${valueText}\`, styles.textSizePx)
|
361
|
+
: 0
|
362
|
+
const maxTextWidth = Math.max(categoryLabelTextWidth, datumLabelTextWidth)
|
363
|
+
const lineEndX = hasDatumLabel
|
364
|
+
? maxTextWidth + styles.textSizePx * 0.5
|
365
|
+
: 0
|
366
|
+
const valueTextAnchor = hasDatumLabel ? 'end' : 'start'
|
367
|
+
const datumSvg = \`<text font-size="\${styles.textSizePx}" dominant-baseline="hanging" fill="\${styles.textColor}">
|
368
|
+
\${datumLabelSvg}<tspan font-weight="bold" text-anchor="\${valueTextAnchor}" x="\${lineEndX}">\${valueText}</tspan>
|
369
|
+
</text>\`
|
310
370
|
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
}`;const
|
371
|
+
return \`\${categorySvg}
|
372
|
+
<g \${hasCategoryLabel ? \`transform="translate(0, \${styles.textSizePx * 2})"\` : ''}>
|
373
|
+
\${datumSvg}
|
374
|
+
</g>\`
|
375
|
+
}`;const uS="TreeLegend",fO=$c({name:uS,defaultParams:lS,layerIndex:Ei,validator:(e,{validateColumns:t})=>t(e,{placement:{toBe:'"top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end"',test:r=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(r)},padding:{toBeTypes:["number"]},backgroundFill:{toBeOption:"ColorType"},backgroundStroke:{toBeOption:"ColorType"},gap:{toBeTypes:["number"]},listRectWidth:{toBeTypes:["number"]},listRectHeight:{toBeTypes:["number"]},listRectRadius:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"}})})(({selection:e,rootSelection:t,observer:n,subject:r})=>{const i=new Q,o=n.fullParams$.pipe(D(i),L(s=>{const l=[{listRectWidth:s.listRectWidth,listRectHeight:s.listRectHeight,listRectRadius:s.listRectRadius}];return{...s,labelList:l}})),a=Bi(uS,{rootSelection:t,legendLabels$:n.categoryLabels$,fullParams$:o,layout$:n.layout$,fullChartParams$:n.fullChartParams$,textSizePx$:n.textSizePx$});return()=>{i.next(void 0),a()}}),Dr="TreeMap",cS=q(Dr,"tree"),fS=q(Dr,"tile"),hO={name:Dr,defaultParams:cd,layerIndex:ht,validator:(e,{validateColumns:t})=>t(e,{paddingInner:{toBeTypes:["number"]},paddingOuter:{toBeTypes:["number"]},labelColorType:{toBeOption:"ColorType"},squarifyRatio:{toBeTypes:["number"]},sort:{toBeTypes:["Function"]}})};function pO({selection:e,treeData:t,fullParams:n,fullChartParams:r,textSizePx:i}){const o=i/2,a=i,s=e.selectAll(`g.${cS}`).data(t,l=>l.data.id).join("g").attr("class",cS);return s.attr("transform",l=>!l.x0||!l.y0?null:`translate(${l.x0},${l.y0})`).each((l,u,c)=>{const h=j(c[u]);h.selectAll(`rect.${fS}`).data([l],f=>f.data.id).join("rect").attr("id",f=>f.data.id).attr("class",fS).attr("cursor","pointer").attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).attr("fill",f=>f.data.color).attr("data-name",f=>f.data.label).attr("data-category",f=>f.data.categoryLabel).attr("data-value",f=>f.data.value),h.selectAll("g").data([l]).join("g").each((f,p,d)=>{j(d[p]).selectAll("text").data([f]).join("text").text(m=>m.data.label).attr("dominant-baseline","hanging").attr("x",o).attr("y",o).attr("font-size",r.styles.textSize).each(function(m){const b=j(this),y=m.data.label.split(/\s+/).reverse();let x,$=[];const S=b.attr("x");let A=b.attr("y"),_=0,P=b.text(null).append("tspan").attr("cursor","pointer").attr("fill",Se({colorType:n.labelColorType,datum:m.data,fullChartParams:r})).attr("font-size",r.styles.textSize).attr("x",S).attr("y",A);for(;x=y.pop();)$.push(x),P.text($.join(" ")),P.node().getComputedTextLength()>m.x1-m.x0-o&&($.pop(),P.text($.join(" ")),$=[x],_+=a,P=b.append("tspan").attr("cursor","pointer").attr("fill",Se({colorType:n.labelColorType,datum:m.data,fullChartParams:r})).attr("font-size",r.styles.textSize).attr("x",S).attr("y",A).attr("dy",_+"px").text(x))})})}),s}function dO({selection:e,ids:t,fullChartParams:n}){if(e.interrupt("highlight"),!t.length){e.transition("highlight").duration(200).style("opacity",1);return}e.each((r,i,o)=>{t.includes(r.data.id)?j(o[i]).style("opacity",1):j(o[i]).style("opacity",n.styles.unhighlightedOpacity)})}const gO=$c(hO)(({selection:e,name:t,subject:n,observer:r})=>{const i=new Q,o=G({layout:r.layout$,visibleComputedData:r.visibleComputedData$,fullParams:r.fullParams$,fullDataFormatter:r.fullDataFormatter$,fullChartParams:r.fullChartParams$}).pipe(D(i),z(async l=>l),L(l=>{const u=Xb().size([l.layout.width,l.layout.height]).paddingInner(l.fullParams.paddingInner).paddingOuter(l.fullParams.paddingOuter).round(!0).tile(Wh.ratio(l.fullParams.squarifyRatio)),c=El(l.visibleComputedData).sum(f=>f.value).sort(l.fullParams.sort);return u(c),c.leaves()})),a=G({selection:Wt(e),treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,textSizePx:r.textSizePx$}).pipe(D(i),z(async l=>l),L(l=>pO({selection:e,treeData:l.treeData,fullParams:l.fullParams,fullChartParams:l.fullChartParams,textSizePx:l.textSizePx}))),s=r.fullChartParams$.pipe(D(i),L(l=>l.highlightTarget),K());return G({cellSelection:a,computedData:r.computedData$,treeData:o,fullParams:r.fullParams$,fullChartParams:r.fullChartParams$,highlightTarget:s,CategoryDataMap:r.CategoryDataMap$}).pipe(D(i),z(async l=>l)).subscribe(l=>{l.cellSelection.on("mouseover",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseover",pluginName:Dr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})}).on("mousemove",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"mousemove",pluginName:Dr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})}).on("mouseout",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"mouseout",pluginName:Dr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})}).on("click",(u,c)=>{u.stopPropagation(),n.event$.next({type:"tree",eventName:"click",pluginName:Dr,highlightTarget:l.highlightTarget,datum:c.data,category:l.CategoryDataMap.get(c.data.categoryLabel),categoryIndex:c.data.categoryIndex,categoryLabel:c.data.categoryLabel,event:u,data:l.computedData})})}),G({cellSelection:a,highlight:r.treeHighlight$.pipe(L(l=>l.map(u=>u.id))),fullChartParams:r.fullChartParams$}).pipe(D(i),z(async l=>l)).subscribe(l=>{dO({selection:l.cellSelection,ids:l.highlight,fullChartParams:l.fullChartParams})}),()=>{i.next(void 0)}}),hS="TreeTooltip",mO=$c({name:hS,defaultParams:fd,layerIndex:Ii,validator:(e,{validateColumns:t})=>t(e,{backgroundColorType:{toBeOption:"ColorType"},backgroundOpacity:{toBeTypes:["number"]},strokeColorType:{toBeOption:"ColorType"},offset:{toBe:"[number, number]",test:r=>Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"},padding:{toBeTypes:["number"]},textColorType:{toBeOption:"ColorType"},renderFn:{toBeTypes:["Function"]}})})(({selection:e,rootSelection:t,name:n,subject:r,observer:i})=>{const o=new Q,a=Fi(hS,{rootSelection:t,fullParams$:i.fullParams$,fullChartParams$:i.fullChartParams$,layout$:i.layout$,event$:r.event$});return()=>{o.next(void 0),a()}});X.Bars=sB,X.BarsPN=lB,X.BarsTriangle=_B,X.Bubbles=Tz,X.CONTAINER_PLUGIN_PARAMS=TF,X.DEFAULT_BARS_DIVERGING_PARAMS=pS,X.DEFAULT_BARS_PARAMS=va,X.DEFAULT_BARS_TRIANGLE_PARAMS=gd,X.DEFAULT_BUBBLES_PARAMS=Z2,X.DEFAULT_DOTS_PARAMS=pd,X.DEFAULT_FORCE_DIRECTED_BUBBLES_PARAMS=Gi,X.DEFAULT_FORCE_DIRECTED_PARAMS=Oi,X.DEFAULT_GRID_LEGEND_PARAMS=bd,X.DEFAULT_GRID_TOOLTIP_PARAMS=wu,X.DEFAULT_GRID_ZOOM_PARAMS=yd,X.DEFAULT_GROUP_AUX_PARAMS=Su,X.DEFAULT_GROUP_AXIS_PARAMS=_u,X.DEFAULT_LINES_PARAMS=Mr,X.DEFAULT_LINE_AREAS_PARAMS=hd,X.DEFAULT_MULTI_BARS_PARAMS=n2,X.DEFAULT_MULTI_BARS_TRIANGLE_PARAMS=i2,X.DEFAULT_MULTI_DOTS_PARAMS=s2,X.DEFAULT_MULTI_GRID_LEGEND_PARAMS=t2,X.DEFAULT_MULTI_GRID_TOOLTIP_PARAMS=Rp,X.DEFAULT_MULTI_GROUP_AXIS_PARAMS=Lp,X.DEFAULT_MULTI_LINES_PARAMS=o2,X.DEFAULT_MULTI_LINE_AREAS_PARAMS=a2,X.DEFAULT_MULTI_STACKED_BAR_PARAMS=r2,X.DEFAULT_MULTI_STACKED_VALUE_AXIS_PARAMS=KB,X.DEFAULT_MULTI_VALUE_AXIS_PARAMS=ma,X.DEFAULT_MULTI_VALUE_LEGEND_PARAMS=S2,X.DEFAULT_MULTI_VALUE_TOOLTIP_PARAMS=jp,X.DEFAULT_OVERLAPPING_STACKED_VALUE_AXES_PARAMS=l2,X.DEFAULT_OVERLAPPING_VALUE_AXES_PARAMS=kp,X.DEFAULT_PIE_EVENT_TEXTS_PARAMS=td,X.DEFAULT_PIE_LABELS_PARAMS=nd,X.DEFAULT_PIE_PARAMS=K2,X.DEFAULT_RACING_BARS_PARAMS=Xp,X.DEFAULT_RACING_COUNTER_TEXTS_PARAMS=_2,X.DEFAULT_RACING_VALUE_AXIS_PARAMS=Up,X.DEFAULT_RELATIONSHIP_LEGEND_PARAMS=R2,X.DEFAULT_RELATIONSHIP_TOOLTIP_PARAMS=ed,X.DEFAULT_ROSE_LABELS_PARAMS=rd,X.DEFAULT_ROSE_PARAMS=Q2,X.DEFAULT_SCATTER_BUBBLES_PARAMS=T2,X.DEFAULT_SCATTER_PARAMS=w2,X.DEFAULT_SERIES_LEGEND_PARAMS=J2,X.DEFAULT_SERIES_TOOLTIP_PARAMS=id,X.DEFAULT_STACKED_BAR_PARAMS=dd,X.DEFAULT_STACKED_VALUE_AXIS_PARAMS=md,X.DEFAULT_TREE_LEGEND_PARAMS=lS,X.DEFAULT_TREE_MAP_PARAMS=cd,X.DEFAULT_TREE_TOOLTIP_PARAMS=fd,X.DEFAULT_VALUE_AXIS_PARAMS=Sa,X.DEFAULT_X_AXIS_PARAMS=Hp,X.DEFAULT_X_Y_AUX_PARAMS=bu,X.DEFAULT_X_Y_AXES_PARAMS=xu,X.DEFAULT_X_Y_ZOOM_PARAMS=A2,X.Dots=PB,X.ForceDirected=UF,X.ForceDirectedBubbles=dz,X.GridLegend=MB,X.GridTooltip=GB,X.GroupAux=ZB,X.GroupAxis=EB,X.GroupZoom=WB,X.LineAreas=eB,X.Lines=UI,X.MultiBars=JB,X.MultiBarsTriangle=tN,X.MultiDots=iN,X.MultiGridLegend=QB,X.MultiGridTooltip=sN,X.MultiGroupAxis=oN,X.MultiLineAreas=rN,X.MultiLines=nN,X.MultiStackedBars=eN,X.MultiStackedValueAxis=lN,X.MultiValueAxis=aN,X.MultiValueLegend=fN,X.MultiValueTooltip=hN,X.OverlappingStackedValueAxes=cN,X.OverlappingValueAxes=uN,X.Pie=Lz,X.PieEventTexts=Ez,X.PieLabels=jz,X.RacingBars=IN,X.RacingCounterTexts=ON,X.RacingValueAxis=HN,X.RelationshipLegend=gz,X.RelationshipTooltip=mz,X.Rose=Kz,X.RoseLabels=lO,X.Scatter=JN,X.ScatterBubbles=oF,X.SeriesLegend=uO,X.SeriesTooltip=cO,X.StackedBars=gB,X.StackedValueAxis=zB,X.TOOLTIP_PARAMS=k2,X.TreeLegend=fO,X.TreeMap=gO,X.TreeTooltip=mO,X.ValueAxis=FB,X.XAxis=aF,X.XYAux=dF,X.XYAxes=_F,X.XZoom=wF,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
|