@antv/g2 5.0.0-beta.1 → 5.0.0-beta.11
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/dist/g2-lite.min.js +5 -2
- package/dist/g2.min.js +5 -2
- package/esm/animation/morphing.js +32 -10
- package/esm/animation/morphing.js.map +1 -1
- package/esm/animation/waveIn.js +1 -12
- package/esm/animation/waveIn.js.map +1 -1
- package/esm/api/chart.d.ts +16 -7
- package/esm/api/chart.js +66 -29
- package/esm/api/chart.js.map +1 -1
- package/esm/api/composition/base.d.ts +21 -0
- package/esm/api/composition/base.js +59 -0
- package/esm/api/composition/base.js.map +1 -0
- package/esm/api/composition/facetCircle.d.ts +2 -3
- package/esm/api/composition/facetCircle.js +2 -2
- package/esm/api/composition/facetCircle.js.map +1 -1
- package/esm/api/composition/facetRect.d.ts +2 -3
- package/esm/api/composition/facetRect.js +2 -2
- package/esm/api/composition/facetRect.js.map +1 -1
- package/esm/api/composition/geoPath.d.ts +5 -7
- package/esm/api/composition/geoPath.js +4 -5
- package/esm/api/composition/geoPath.js.map +1 -1
- package/esm/api/composition/geoView.d.ts +4 -6
- package/esm/api/composition/geoView.js +4 -5
- package/esm/api/composition/geoView.js.map +1 -1
- package/esm/api/composition/index.d.ts +2 -1
- package/esm/api/composition/index.js +2 -1
- package/esm/api/composition/index.js.map +1 -1
- package/esm/api/composition/repeatMatrix.d.ts +2 -3
- package/esm/api/composition/repeatMatrix.js +2 -2
- package/esm/api/composition/repeatMatrix.js.map +1 -1
- package/esm/api/composition/spaceFlex.d.ts +2 -3
- package/esm/api/composition/spaceFlex.js +2 -2
- package/esm/api/composition/spaceFlex.js.map +1 -1
- package/esm/api/composition/spaceLayer.d.ts +2 -3
- package/esm/api/composition/spaceLayer.js +2 -2
- package/esm/api/composition/spaceLayer.js.map +1 -1
- package/esm/api/composition/timingKeyframe.d.ts +2 -3
- package/esm/api/composition/timingKeyframe.js +2 -2
- package/esm/api/composition/timingKeyframe.js.map +1 -1
- package/esm/api/composition/view.d.ts +5 -5
- package/esm/api/composition/view.js +6 -6
- package/esm/api/composition/view.js.map +1 -1
- package/esm/api/mark/base.d.ts +22 -0
- package/esm/api/mark/base.js +54 -0
- package/esm/api/mark/base.js.map +1 -0
- package/esm/api/mark/mark.d.ts +29 -29
- package/esm/api/mark/mark.js +32 -29
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +5 -2
- package/esm/api/node.d.ts +2 -1
- package/esm/api/node.js +8 -9
- package/esm/api/node.js.map +1 -1
- package/esm/api/props.js +3 -22
- package/esm/api/props.js.map +1 -1
- package/esm/component/axis.d.ts +5 -8
- package/esm/component/axis.js +182 -234
- package/esm/component/axis.js.map +1 -1
- package/esm/component/axisArc.d.ts +7 -0
- package/esm/component/axisArc.js +9 -0
- package/esm/component/axisArc.js.map +1 -0
- package/esm/component/axisRadar.d.ts +9 -0
- package/esm/component/axisRadar.js +45 -0
- package/esm/component/axisRadar.js.map +1 -0
- package/esm/component/axisX.d.ts +2 -1
- package/esm/component/axisX.js +5 -4
- package/esm/component/axisX.js.map +1 -1
- package/esm/component/axisY.d.ts +1 -1
- package/esm/component/axisY.js +4 -4
- package/esm/component/axisY.js.map +1 -1
- package/esm/component/index.d.ts +14 -0
- package/esm/component/index.js +9 -0
- package/esm/component/index.js.map +1 -1
- package/esm/component/legendCategory.d.ts +5 -4
- package/esm/component/legendCategory.js +87 -55
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.d.ts +4 -2
- package/esm/component/legendContinuous.js +87 -25
- package/esm/component/legendContinuous.js.map +1 -1
- package/esm/component/legendContinuousBlock.d.ts +4 -0
- package/esm/component/legendContinuousBlock.js +6 -0
- package/esm/component/legendContinuousBlock.js.map +1 -0
- package/esm/component/legendContinuousBlockSize.d.ts +4 -0
- package/esm/component/legendContinuousBlockSize.js +6 -0
- package/esm/component/legendContinuousBlockSize.js.map +1 -0
- package/esm/component/legendContinuousSize.d.ts +4 -0
- package/esm/component/legendContinuousSize.js +10 -0
- package/esm/component/legendContinuousSize.js.map +1 -0
- package/esm/component/scrollbar.d.ts +9 -0
- package/esm/component/scrollbar.js +36 -0
- package/esm/component/scrollbar.js.map +1 -0
- package/esm/component/scrollbarX.d.ts +7 -0
- package/esm/component/scrollbarX.js +9 -0
- package/esm/component/scrollbarX.js.map +1 -0
- package/esm/component/scrollbarY.d.ts +7 -0
- package/esm/component/scrollbarY.js +9 -0
- package/esm/component/scrollbarY.js.map +1 -0
- package/esm/component/slider.d.ts +9 -0
- package/esm/component/slider.js +47 -0
- package/esm/component/slider.js.map +1 -0
- package/esm/component/sliderX.d.ts +7 -0
- package/esm/component/sliderX.js +9 -0
- package/esm/component/sliderX.js.map +1 -0
- package/esm/component/sliderY.d.ts +7 -0
- package/esm/component/sliderY.js +9 -0
- package/esm/component/sliderY.js.map +1 -0
- package/esm/component/title.js +47 -23
- package/esm/component/title.js.map +1 -1
- package/esm/component/utils.d.ts +13 -0
- package/esm/component/utils.js +50 -0
- package/esm/component/utils.js.map +1 -1
- package/esm/composition/facetCircle.js +2 -2
- package/esm/composition/facetCircle.js.map +1 -1
- package/esm/composition/facetRect.js +6 -8
- package/esm/composition/facetRect.js.map +1 -1
- package/esm/composition/mark.js +5 -3
- package/esm/composition/mark.js.map +1 -1
- package/esm/composition/repeatMatrix.js +4 -4
- package/esm/composition/repeatMatrix.js.map +1 -1
- package/esm/composition/view.js +3 -3
- package/esm/composition/view.js.map +1 -1
- package/esm/coordinate/fisheye.js +1 -1
- package/esm/coordinate/fisheye.js.map +1 -1
- package/esm/coordinate/index.d.ts +5 -13
- package/esm/coordinate/index.js +4 -8
- package/esm/coordinate/index.js.map +1 -1
- package/esm/coordinate/polar.d.ts +6 -0
- package/esm/coordinate/polar.js +18 -6
- package/esm/coordinate/polar.js.map +1 -1
- package/esm/coordinate/radar.d.ts +7 -0
- package/esm/coordinate/radar.js +14 -0
- package/esm/coordinate/radar.js.map +1 -0
- package/esm/coordinate/radial.d.ts +6 -0
- package/esm/coordinate/radial.js +19 -6
- package/esm/coordinate/radial.js.map +1 -1
- package/esm/coordinate/theta.d.ts +7 -0
- package/esm/coordinate/theta.js +16 -4
- package/esm/coordinate/theta.js.map +1 -1
- package/esm/coordinate/transpose.js +1 -1
- package/esm/coordinate/transpose.js.map +1 -1
- package/esm/data/filter.d.ts +3 -3
- package/esm/data/filter.js.map +1 -1
- package/esm/data/fold.js +4 -10
- package/esm/data/fold.js.map +1 -1
- package/esm/data/index.d.ts +5 -3
- package/esm/data/index.js +2 -1
- package/esm/data/index.js.map +1 -1
- package/esm/data/pick.js +10 -2
- package/esm/data/pick.js.map +1 -1
- package/esm/data/slice.d.ts +8 -0
- package/esm/data/slice.js +10 -0
- package/esm/data/slice.js.map +1 -0
- package/esm/data/sort.d.ts +8 -0
- package/esm/data/sort.js +12 -0
- package/esm/data/sort.js.map +1 -0
- package/esm/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/esm/geo/d3Projection.js.map +1 -0
- package/esm/geo/geoView.js +4 -4
- package/esm/geo/geoView.js.map +1 -1
- package/esm/interaction/action/service/legendItemSelection.js.map +1 -1
- package/esm/interaction/action/transformer/setItemState.js.map +1 -1
- package/esm/interaction/builtin/activeRegion.d.ts +0 -2
- package/esm/interaction/builtin/brush.d.ts +1 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/builtin/brushVisible.d.ts +1 -1
- package/esm/interaction/builtin/elementHighlight.d.ts +2 -0
- package/esm/interaction/builtin/elementHighlightByColor.d.ts +2 -0
- package/esm/interaction/builtin/elementHighlightByX.d.ts +2 -0
- package/esm/interaction/builtin/ellipsisText.d.ts +0 -3
- package/esm/interaction/builtin/fisheye.d.ts +6 -6
- package/esm/interaction/builtin/tooltip.d.ts +4 -8
- package/esm/interaction/index.d.ts +13 -0
- package/esm/interaction/index.js +12 -30
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushAxisHighlight.d.ts +27 -0
- package/esm/interaction/native/brushAxisHighlight.js +167 -0
- package/esm/interaction/native/brushAxisHighlight.js.map +1 -0
- package/esm/interaction/native/brushFilter.d.ts +14 -0
- package/esm/interaction/native/brushFilter.js +122 -0
- package/esm/interaction/native/brushFilter.js.map +1 -0
- package/esm/interaction/native/brushHighlight.d.ts +41 -0
- package/esm/interaction/native/brushHighlight.js +349 -0
- package/esm/interaction/native/brushHighlight.js.map +1 -0
- package/esm/interaction/native/brushXFilter.d.ts +1 -0
- package/esm/interaction/native/brushXFilter.js +6 -0
- package/esm/interaction/native/brushXFilter.js.map +1 -0
- package/esm/interaction/native/brushXHighlight.d.ts +6 -0
- package/esm/interaction/native/brushXHighlight.js +9 -0
- package/esm/interaction/native/brushXHighlight.js.map +1 -0
- package/esm/interaction/native/brushYFilter.d.ts +1 -0
- package/esm/interaction/native/brushYFilter.js +6 -0
- package/esm/interaction/native/brushYFilter.js.map +1 -0
- package/esm/interaction/native/brushYHighlight.d.ts +6 -0
- package/esm/interaction/native/brushYHighlight.js +9 -0
- package/esm/interaction/native/brushYHighlight.js.map +1 -0
- package/esm/interaction/native/elementHighlight.d.ts +10 -2
- package/esm/interaction/native/elementHighlight.js +87 -24
- package/esm/interaction/native/elementHighlight.js.map +1 -1
- package/esm/interaction/native/elementHighlightByColor.d.ts +0 -3
- package/esm/interaction/native/elementHighlightByColor.js +3 -9
- package/esm/interaction/native/elementHighlightByColor.js.map +1 -1
- package/esm/interaction/native/elementHighlightByX.d.ts +1 -8
- package/esm/interaction/native/elementHighlightByX.js +4 -11
- package/esm/interaction/native/elementHighlightByX.js.map +1 -1
- package/esm/interaction/native/elementSelect.d.ts +7 -2
- package/esm/interaction/native/elementSelect.js +59 -27
- package/esm/interaction/native/elementSelect.js.map +1 -1
- package/esm/interaction/native/elementSelectByColor.js +3 -6
- package/esm/interaction/native/elementSelectByColor.js.map +1 -1
- package/esm/interaction/native/elementSelectByX.js +3 -6
- package/esm/interaction/native/elementSelectByX.js.map +1 -1
- package/esm/interaction/native/fisheye.js +6 -4
- package/esm/interaction/native/fisheye.js.map +1 -1
- package/esm/interaction/native/legendFilter.d.ts +14 -0
- package/esm/interaction/native/legendFilter.js +195 -0
- package/esm/interaction/native/legendFilter.js.map +1 -0
- package/esm/interaction/native/legendHighlight.d.ts +1 -0
- package/esm/interaction/native/legendHighlight.js +87 -0
- package/esm/interaction/native/legendHighlight.js.map +1 -0
- package/esm/interaction/native/poptip.d.ts +5 -0
- package/esm/interaction/native/poptip.js +91 -0
- package/esm/interaction/native/poptip.js.map +1 -0
- package/esm/interaction/native/sliderFilter.d.ts +5 -0
- package/esm/interaction/native/sliderFilter.js +87 -0
- package/esm/interaction/native/sliderFilter.js.map +1 -0
- package/esm/interaction/native/tooltip.d.ts +2 -2
- package/esm/interaction/native/tooltip.js +157 -48
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +24 -5
- package/esm/interaction/native/utils.js +248 -42
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +48 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -8
- package/esm/label-transform/index.js +4 -4
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +18 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +24 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/mark/area.js +3 -2
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/box.js +1 -0
- package/esm/mark/box.js.map +1 -1
- package/esm/mark/boxplot.js +6 -21
- package/esm/mark/boxplot.js.map +1 -1
- package/esm/mark/cell.js +2 -1
- package/esm/mark/cell.js.map +1 -1
- package/esm/mark/connector.js +1 -0
- package/esm/mark/connector.js.map +1 -1
- package/esm/mark/forceGraph.js +1 -1
- package/esm/mark/forceGraph.js.map +1 -1
- package/esm/mark/image.js +1 -0
- package/esm/mark/image.js.map +1 -1
- package/esm/mark/interval.js +1 -0
- package/esm/mark/interval.js.map +1 -1
- package/esm/mark/line.js +2 -1
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/lineX.js +1 -0
- package/esm/mark/lineX.js.map +1 -1
- package/esm/mark/lineY.js +1 -0
- package/esm/mark/lineY.js.map +1 -1
- package/esm/mark/link.js +1 -0
- package/esm/mark/link.js.map +1 -1
- package/esm/mark/pack.js +1 -2
- package/esm/mark/pack.js.map +1 -1
- package/esm/mark/path.js +1 -0
- package/esm/mark/path.js.map +1 -1
- package/esm/mark/point.js +1 -0
- package/esm/mark/point.js.map +1 -1
- package/esm/mark/polygon.js +1 -0
- package/esm/mark/polygon.js.map +1 -1
- package/esm/mark/range.js +1 -0
- package/esm/mark/range.js.map +1 -1
- package/esm/mark/rangeX.js +1 -0
- package/esm/mark/rangeX.js.map +1 -1
- package/esm/mark/rangeY.js +1 -0
- package/esm/mark/rangeY.js.map +1 -1
- package/esm/mark/rect.js +1 -0
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/sankey.js +1 -1
- package/esm/mark/sankey.js.map +1 -1
- package/esm/mark/shape.js +1 -0
- package/esm/mark/shape.js.map +1 -1
- package/esm/mark/text.js +1 -0
- package/esm/mark/text.js.map +1 -1
- package/esm/mark/tree.js +1 -1
- package/esm/mark/tree.js.map +1 -1
- package/esm/mark/treemap.js +1 -2
- package/esm/mark/treemap.js.map +1 -1
- package/esm/mark/vector.js +1 -0
- package/esm/mark/vector.js.map +1 -1
- package/esm/mark/wordCloud.js +1 -1
- package/esm/mark/wordCloud.js.map +1 -1
- package/esm/runtime/component.d.ts +4 -1
- package/esm/runtime/component.js +274 -106
- package/esm/runtime/component.js.map +1 -1
- package/esm/runtime/coordinate.d.ts +12 -0
- package/esm/runtime/coordinate.js +47 -16
- package/esm/runtime/coordinate.js.map +1 -1
- package/esm/runtime/layout.d.ts +1 -1
- package/esm/runtime/layout.js +145 -76
- package/esm/runtime/layout.js.map +1 -1
- package/esm/runtime/mark.js +7 -4
- package/esm/runtime/mark.js.map +1 -1
- package/esm/runtime/plot.d.ts +1 -1
- package/esm/runtime/plot.js +199 -88
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/render.d.ts +0 -1
- package/esm/runtime/render.js +22 -47
- package/esm/runtime/render.js.map +1 -1
- package/esm/runtime/scale.d.ts +3 -1
- package/esm/runtime/scale.js +61 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +18 -9
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +38 -11
- package/esm/runtime/types/component.d.ts +13 -8
- package/esm/runtime/types/mark.d.ts +4 -4
- package/esm/runtime/types/options.d.ts +16 -12
- package/esm/runtime/types/scale.d.ts +18 -0
- package/esm/runtime/types/scale.js +19 -0
- package/esm/runtime/types/scale.js.map +1 -0
- package/esm/runtime/types/theme.d.ts +8 -5
- package/esm/scale/constant.d.ts +4 -0
- package/esm/scale/constant.js +6 -0
- package/esm/scale/constant.js.map +1 -0
- package/esm/scale/index.d.ts +2 -0
- package/esm/scale/index.js +1 -0
- package/esm/scale/index.js.map +1 -1
- package/esm/shape/area/curve.js +17 -17
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/area/hv.d.ts +3 -0
- package/esm/shape/area/hv.js +9 -0
- package/esm/shape/area/hv.js.map +1 -0
- package/esm/shape/area/hvh.d.ts +3 -0
- package/esm/shape/area/{step.js → hvh.js} +3 -3
- package/esm/shape/area/hvh.js.map +1 -0
- package/esm/shape/area/vh.d.ts +3 -0
- package/esm/shape/area/vh.js +9 -0
- package/esm/shape/area/vh.js.map +1 -0
- package/esm/shape/box/box.js +1 -1
- package/esm/shape/box/box.js.map +1 -1
- package/esm/shape/connector/connector.js +3 -3
- package/esm/shape/connector/connector.js.map +1 -1
- package/esm/shape/image/image.js +2 -2
- package/esm/shape/image/image.js.map +1 -1
- package/esm/shape/index.d.ts +6 -2
- package/esm/shape/index.js +3 -1
- package/esm/shape/index.js.map +1 -1
- package/esm/shape/interval/color.d.ts +1 -0
- package/esm/shape/interval/color.js +68 -50
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/label/label.js +3 -3
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +18 -0
- package/esm/shape/label/position/default.js +107 -0
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +18 -0
- package/esm/shape/label/position/outside.js +67 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +7 -0
- package/esm/shape/label/position/spider.js +34 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +35 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/shape/line/curve.js +24 -13
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/line/line.js +6 -2
- package/esm/shape/line/line.js.map +1 -1
- package/esm/shape/line/smooth.js +6 -2
- package/esm/shape/line/smooth.js.map +1 -1
- package/esm/shape/lineXY/line.js +2 -2
- package/esm/shape/lineXY/line.js.map +1 -1
- package/esm/shape/link/arc.js +2 -2
- package/esm/shape/link/arc.js.map +1 -1
- package/esm/shape/link/link.js +2 -2
- package/esm/shape/link/link.js.map +1 -1
- package/esm/shape/link/smooth.js +2 -2
- package/esm/shape/link/smooth.js.map +1 -1
- package/esm/shape/link/vhv.js +2 -2
- package/esm/shape/link/vhv.js.map +1 -1
- package/esm/shape/point/color.js +1 -1
- package/esm/shape/point/color.js.map +1 -1
- package/esm/shape/polygon/polygon.js +3 -3
- package/esm/shape/polygon/polygon.js.map +1 -1
- package/esm/shape/polygon/ribbon.js +3 -3
- package/esm/shape/polygon/ribbon.js.map +1 -1
- package/esm/shape/text/advance.js +3 -3
- package/esm/shape/text/advance.js.map +1 -1
- package/esm/shape/text/badge.js +3 -3
- package/esm/shape/text/badge.js.map +1 -1
- package/esm/shape/text/text.js +1 -1
- package/esm/shape/text/text.js.map +1 -1
- package/esm/shape/utils.d.ts +5 -0
- package/esm/shape/utils.js +14 -2
- package/esm/shape/utils.js.map +1 -1
- package/esm/shape/vector/vector.js +3 -3
- package/esm/shape/vector/vector.js.map +1 -1
- package/esm/spec/composition.d.ts +9 -7
- package/esm/spec/coordinate.d.ts +17 -33
- package/esm/spec/data.d.ts +32 -10
- package/esm/spec/geometry.d.ts +24 -9
- package/esm/spec/interaction.d.ts +81 -27
- package/esm/spec/labelTransform.d.ts +24 -11
- package/esm/spec/scale.d.ts +4 -3
- package/esm/spec/theme.d.ts +5 -2
- package/esm/spec/transform.d.ts +27 -4
- package/esm/spec/utils.d.ts +7 -0
- package/esm/spec/utils.js +2 -0
- package/esm/spec/utils.js.map +1 -0
- package/esm/stdlib/index.js +12 -18
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.d.ts +3 -0
- package/esm/theme/academy.js +404 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/dark.js +163 -100
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.js +177 -101
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/filter.d.ts +7 -0
- package/esm/transform/filter.js +42 -0
- package/esm/transform/filter.js.map +1 -0
- package/esm/transform/groupN.js +2 -0
- package/esm/transform/groupN.js.map +1 -1
- package/esm/transform/index.d.ts +10 -6
- package/esm/transform/index.js +5 -3
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/maybeTooltip.js +3 -1
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/transform/sample.d.ts +8 -0
- package/esm/transform/sample.js +64 -0
- package/esm/transform/sample.js.map +1 -0
- package/esm/transform/{Select.js → select.js} +2 -14
- package/esm/transform/select.js.map +1 -0
- package/esm/transform/{SelectX.js → selectX.js} +3 -3
- package/esm/transform/selectX.js.map +1 -0
- package/esm/transform/{SelectY.js → selectY.js} +3 -3
- package/esm/transform/selectY.js.map +1 -0
- package/esm/transform/sort.d.ts +1 -1
- package/esm/transform/sort.js +39 -21
- package/esm/transform/sort.js.map +1 -1
- package/esm/transform/utils/lttb.d.ts +5 -0
- package/esm/transform/utils/lttb.js +56 -0
- package/esm/transform/utils/lttb.js.map +1 -0
- package/esm/utils/angle.d.ts +2 -0
- package/esm/utils/angle.js +7 -0
- package/esm/utils/angle.js.map +1 -0
- package/esm/utils/array.d.ts +8 -0
- package/esm/utils/array.js +35 -0
- package/esm/utils/array.js.map +1 -1
- package/esm/utils/bounds.d.ts +26 -0
- package/esm/utils/bounds.js +41 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/coordinate.d.ts +5 -0
- package/esm/utils/coordinate.js +31 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/event.d.ts +0 -2
- package/esm/utils/event.js +0 -18
- package/esm/utils/event.js.map +1 -1
- package/esm/utils/helper.d.ts +2 -0
- package/esm/utils/helper.js +10 -2
- package/esm/utils/helper.js.map +1 -1
- package/esm/utils/scale.d.ts +3 -0
- package/esm/utils/scale.js +30 -0
- package/esm/utils/scale.js.map +1 -0
- package/esm/utils/selection.d.ts +1 -0
- package/esm/utils/selection.js +5 -2
- package/esm/utils/selection.js.map +1 -1
- package/esm/utils/size.js +1 -1
- package/esm/utils/size.js.map +1 -1
- package/esm/utils/vector.d.ts +1 -1
- package/esm/utils/vector.js +1 -1
- package/lib/animation/morphing.js +32 -10
- package/lib/animation/morphing.js.map +1 -1
- package/lib/animation/waveIn.js +1 -12
- package/lib/animation/waveIn.js.map +1 -1
- package/lib/api/chart.d.ts +16 -7
- package/lib/api/chart.js +67 -27
- package/lib/api/chart.js.map +1 -1
- package/lib/api/composition/base.d.ts +21 -0
- package/lib/api/composition/base.js +62 -0
- package/lib/api/composition/base.js.map +1 -0
- package/lib/api/composition/facetCircle.d.ts +2 -3
- package/lib/api/composition/facetCircle.js +2 -2
- package/lib/api/composition/facetCircle.js.map +1 -1
- package/lib/api/composition/facetRect.d.ts +2 -3
- package/lib/api/composition/facetRect.js +2 -2
- package/lib/api/composition/facetRect.js.map +1 -1
- package/lib/api/composition/geoPath.d.ts +5 -7
- package/lib/api/composition/geoPath.js +4 -5
- package/lib/api/composition/geoPath.js.map +1 -1
- package/lib/api/composition/geoView.d.ts +4 -6
- package/lib/api/composition/geoView.js +4 -5
- package/lib/api/composition/geoView.js.map +1 -1
- package/lib/api/composition/index.d.ts +2 -1
- package/lib/api/composition/index.js +3 -1
- package/lib/api/composition/index.js.map +1 -1
- package/lib/api/composition/repeatMatrix.d.ts +2 -3
- package/lib/api/composition/repeatMatrix.js +2 -2
- package/lib/api/composition/repeatMatrix.js.map +1 -1
- package/lib/api/composition/spaceFlex.d.ts +2 -3
- package/lib/api/composition/spaceFlex.js +2 -2
- package/lib/api/composition/spaceFlex.js.map +1 -1
- package/lib/api/composition/spaceLayer.d.ts +2 -3
- package/lib/api/composition/spaceLayer.js +2 -2
- package/lib/api/composition/spaceLayer.js.map +1 -1
- package/lib/api/composition/timingKeyframe.d.ts +2 -3
- package/lib/api/composition/timingKeyframe.js +2 -2
- package/lib/api/composition/timingKeyframe.js.map +1 -1
- package/lib/api/composition/view.d.ts +5 -5
- package/lib/api/composition/view.js +6 -6
- package/lib/api/composition/view.js.map +1 -1
- package/lib/api/mark/base.d.ts +22 -0
- package/lib/api/mark/base.js +58 -0
- package/lib/api/mark/base.js.map +1 -0
- package/lib/api/mark/mark.d.ts +29 -29
- package/lib/api/mark/mark.js +32 -29
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +5 -2
- package/lib/api/node.d.ts +2 -1
- package/lib/api/node.js +8 -9
- package/lib/api/node.js.map +1 -1
- package/lib/api/props.js +3 -22
- package/lib/api/props.js.map +1 -1
- package/lib/component/axis.d.ts +5 -8
- package/lib/component/axis.js +181 -234
- package/lib/component/axis.js.map +1 -1
- package/lib/component/axisArc.d.ts +7 -0
- package/lib/component/axisArc.js +13 -0
- package/lib/component/axisArc.js.map +1 -0
- package/lib/component/axisRadar.d.ts +9 -0
- package/lib/component/axisRadar.js +49 -0
- package/lib/component/axisRadar.js.map +1 -0
- package/lib/component/axisX.d.ts +2 -1
- package/lib/component/axisX.js +6 -4
- package/lib/component/axisX.js.map +1 -1
- package/lib/component/axisY.d.ts +1 -1
- package/lib/component/axisY.js +3 -3
- package/lib/component/axisY.js.map +1 -1
- package/lib/component/index.d.ts +14 -0
- package/lib/component/index.js +20 -1
- package/lib/component/index.js.map +1 -1
- package/lib/component/legendCategory.d.ts +5 -4
- package/lib/component/legendCategory.js +87 -55
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.d.ts +4 -2
- package/lib/component/legendContinuous.js +87 -25
- package/lib/component/legendContinuous.js.map +1 -1
- package/lib/component/legendContinuousBlock.d.ts +4 -0
- package/lib/component/legendContinuousBlock.js +10 -0
- package/lib/component/legendContinuousBlock.js.map +1 -0
- package/lib/component/legendContinuousBlockSize.d.ts +4 -0
- package/lib/component/legendContinuousBlockSize.js +10 -0
- package/lib/component/legendContinuousBlockSize.js.map +1 -0
- package/lib/component/legendContinuousSize.d.ts +4 -0
- package/lib/component/legendContinuousSize.js +14 -0
- package/lib/component/legendContinuousSize.js.map +1 -0
- package/lib/component/scrollbar.d.ts +9 -0
- package/lib/component/scrollbar.js +40 -0
- package/lib/component/scrollbar.js.map +1 -0
- package/lib/component/scrollbarX.d.ts +7 -0
- package/lib/component/scrollbarX.js +13 -0
- package/lib/component/scrollbarX.js.map +1 -0
- package/lib/component/scrollbarY.d.ts +7 -0
- package/lib/component/scrollbarY.js +13 -0
- package/lib/component/scrollbarY.js.map +1 -0
- package/lib/component/slider.d.ts +9 -0
- package/lib/component/slider.js +51 -0
- package/lib/component/slider.js.map +1 -0
- package/lib/component/sliderX.d.ts +7 -0
- package/lib/component/sliderX.js +13 -0
- package/lib/component/sliderX.js.map +1 -0
- package/lib/component/sliderY.d.ts +7 -0
- package/lib/component/sliderY.js +13 -0
- package/lib/component/sliderY.js.map +1 -0
- package/lib/component/title.js +47 -23
- package/lib/component/title.js.map +1 -1
- package/lib/component/utils.d.ts +13 -0
- package/lib/component/utils.js +55 -1
- package/lib/component/utils.js.map +1 -1
- package/lib/composition/facetCircle.js +2 -2
- package/lib/composition/facetCircle.js.map +1 -1
- package/lib/composition/facetRect.js +6 -8
- package/lib/composition/facetRect.js.map +1 -1
- package/lib/composition/mark.js +5 -3
- package/lib/composition/mark.js.map +1 -1
- package/lib/composition/repeatMatrix.js +4 -4
- package/lib/composition/repeatMatrix.js.map +1 -1
- package/lib/composition/view.js +3 -3
- package/lib/composition/view.js.map +1 -1
- package/lib/coordinate/fisheye.js +1 -1
- package/lib/coordinate/fisheye.js.map +1 -1
- package/lib/coordinate/index.d.ts +5 -13
- package/lib/coordinate/index.js +6 -11
- package/lib/coordinate/index.js.map +1 -1
- package/lib/coordinate/polar.d.ts +6 -0
- package/lib/coordinate/polar.js +20 -7
- package/lib/coordinate/polar.js.map +1 -1
- package/lib/coordinate/radar.d.ts +7 -0
- package/lib/coordinate/radar.js +18 -0
- package/lib/coordinate/radar.js.map +1 -0
- package/lib/coordinate/radial.d.ts +6 -0
- package/lib/coordinate/radial.js +21 -7
- package/lib/coordinate/radial.js.map +1 -1
- package/lib/coordinate/theta.d.ts +7 -0
- package/lib/coordinate/theta.js +18 -5
- package/lib/coordinate/theta.js.map +1 -1
- package/lib/coordinate/transpose.js +1 -1
- package/lib/coordinate/transpose.js.map +1 -1
- package/lib/data/filter.d.ts +3 -3
- package/lib/data/filter.js.map +1 -1
- package/lib/data/fold.js +4 -10
- package/lib/data/fold.js.map +1 -1
- package/lib/data/index.d.ts +5 -3
- package/lib/data/index.js +5 -3
- package/lib/data/index.js.map +1 -1
- package/lib/data/pick.js +10 -2
- package/lib/data/pick.js.map +1 -1
- package/lib/data/slice.d.ts +8 -0
- package/lib/data/slice.js +14 -0
- package/lib/data/slice.js.map +1 -0
- package/lib/data/sort.d.ts +8 -0
- package/lib/data/sort.js +17 -0
- package/lib/data/sort.js.map +1 -0
- package/lib/geo/{d3-projection.js → d3Projection.js} +1 -1
- package/lib/geo/d3Projection.js.map +1 -0
- package/lib/geo/geoView.js +4 -4
- package/lib/geo/geoView.js.map +1 -1
- package/lib/interaction/action/service/legendItemSelection.js.map +1 -1
- package/lib/interaction/action/transformer/setItemState.js.map +1 -1
- package/lib/interaction/builtin/activeRegion.d.ts +0 -2
- package/lib/interaction/builtin/brush.d.ts +1 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/builtin/brushVisible.d.ts +1 -1
- package/lib/interaction/builtin/elementHighlight.d.ts +2 -0
- package/lib/interaction/builtin/elementHighlightByColor.d.ts +2 -0
- package/lib/interaction/builtin/elementHighlightByX.d.ts +2 -0
- package/lib/interaction/builtin/ellipsisText.d.ts +0 -3
- package/lib/interaction/builtin/fisheye.d.ts +6 -6
- package/lib/interaction/builtin/tooltip.d.ts +4 -8
- package/lib/interaction/index.d.ts +13 -0
- package/lib/interaction/index.js +25 -31
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushAxisHighlight.d.ts +27 -0
- package/lib/interaction/native/brushAxisHighlight.js +172 -0
- package/lib/interaction/native/brushAxisHighlight.js.map +1 -0
- package/lib/interaction/native/brushFilter.d.ts +14 -0
- package/lib/interaction/native/brushFilter.js +127 -0
- package/lib/interaction/native/brushFilter.js.map +1 -0
- package/lib/interaction/native/brushHighlight.d.ts +41 -0
- package/lib/interaction/native/brushHighlight.js +355 -0
- package/lib/interaction/native/brushHighlight.js.map +1 -0
- package/lib/interaction/native/brushXFilter.d.ts +1 -0
- package/lib/interaction/native/brushXFilter.js +10 -0
- package/lib/interaction/native/brushXFilter.js.map +1 -0
- package/lib/interaction/native/brushXHighlight.d.ts +6 -0
- package/lib/interaction/native/brushXHighlight.js +14 -0
- package/lib/interaction/native/brushXHighlight.js.map +1 -0
- package/lib/interaction/native/brushYFilter.d.ts +1 -0
- package/lib/interaction/native/brushYFilter.js +10 -0
- package/lib/interaction/native/brushYFilter.js.map +1 -0
- package/lib/interaction/native/brushYHighlight.d.ts +6 -0
- package/lib/interaction/native/brushYHighlight.js +14 -0
- package/lib/interaction/native/brushYHighlight.js.map +1 -0
- package/lib/interaction/native/elementHighlight.d.ts +10 -2
- package/lib/interaction/native/elementHighlight.js +86 -23
- package/lib/interaction/native/elementHighlight.js.map +1 -1
- package/lib/interaction/native/elementHighlightByColor.d.ts +0 -3
- package/lib/interaction/native/elementHighlightByColor.js +1 -7
- package/lib/interaction/native/elementHighlightByColor.js.map +1 -1
- package/lib/interaction/native/elementHighlightByX.d.ts +1 -8
- package/lib/interaction/native/elementHighlightByX.js +2 -9
- package/lib/interaction/native/elementHighlightByX.js.map +1 -1
- package/lib/interaction/native/elementSelect.d.ts +7 -2
- package/lib/interaction/native/elementSelect.js +58 -26
- package/lib/interaction/native/elementSelect.js.map +1 -1
- package/lib/interaction/native/elementSelectByColor.js +1 -4
- package/lib/interaction/native/elementSelectByColor.js.map +1 -1
- package/lib/interaction/native/elementSelectByX.js +1 -4
- package/lib/interaction/native/elementSelectByX.js.map +1 -1
- package/lib/interaction/native/fisheye.js +6 -4
- package/lib/interaction/native/fisheye.js.map +1 -1
- package/lib/interaction/native/legendFilter.d.ts +14 -0
- package/lib/interaction/native/legendFilter.js +205 -0
- package/lib/interaction/native/legendFilter.js.map +1 -0
- package/lib/interaction/native/legendHighlight.d.ts +1 -0
- package/lib/interaction/native/legendHighlight.js +91 -0
- package/lib/interaction/native/legendHighlight.js.map +1 -0
- package/lib/interaction/native/poptip.d.ts +5 -0
- package/lib/interaction/native/poptip.js +95 -0
- package/lib/interaction/native/poptip.js.map +1 -0
- package/lib/interaction/native/sliderFilter.d.ts +5 -0
- package/lib/interaction/native/sliderFilter.js +91 -0
- package/lib/interaction/native/sliderFilter.js.map +1 -0
- package/lib/interaction/native/tooltip.d.ts +2 -2
- package/lib/interaction/native/tooltip.js +154 -45
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +24 -5
- package/lib/interaction/native/utils.js +258 -44
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +52 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -8
- package/lib/label-transform/index.js +9 -9
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +22 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +28 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/mark/area.js +3 -2
- package/lib/mark/area.js.map +1 -1
- package/lib/mark/box.js +1 -0
- package/lib/mark/box.js.map +1 -1
- package/lib/mark/boxplot.js +6 -21
- package/lib/mark/boxplot.js.map +1 -1
- package/lib/mark/cell.js +2 -1
- package/lib/mark/cell.js.map +1 -1
- package/lib/mark/connector.js +1 -0
- package/lib/mark/connector.js.map +1 -1
- package/lib/mark/forceGraph.js +1 -1
- package/lib/mark/forceGraph.js.map +1 -1
- package/lib/mark/image.js +1 -0
- package/lib/mark/image.js.map +1 -1
- package/lib/mark/interval.js +1 -0
- package/lib/mark/interval.js.map +1 -1
- package/lib/mark/line.js +2 -1
- package/lib/mark/line.js.map +1 -1
- package/lib/mark/lineX.js +1 -0
- package/lib/mark/lineX.js.map +1 -1
- package/lib/mark/lineY.js +1 -0
- package/lib/mark/lineY.js.map +1 -1
- package/lib/mark/link.js +1 -0
- package/lib/mark/link.js.map +1 -1
- package/lib/mark/pack.js +1 -2
- package/lib/mark/pack.js.map +1 -1
- package/lib/mark/path.js +1 -0
- package/lib/mark/path.js.map +1 -1
- package/lib/mark/point.js +1 -0
- package/lib/mark/point.js.map +1 -1
- package/lib/mark/polygon.js +1 -0
- package/lib/mark/polygon.js.map +1 -1
- package/lib/mark/range.js +1 -0
- package/lib/mark/range.js.map +1 -1
- package/lib/mark/rangeX.js +1 -0
- package/lib/mark/rangeX.js.map +1 -1
- package/lib/mark/rangeY.js +1 -0
- package/lib/mark/rangeY.js.map +1 -1
- package/lib/mark/rect.js +1 -0
- package/lib/mark/rect.js.map +1 -1
- package/lib/mark/sankey.js +1 -1
- package/lib/mark/sankey.js.map +1 -1
- package/lib/mark/shape.js +1 -0
- package/lib/mark/shape.js.map +1 -1
- package/lib/mark/text.js +1 -0
- package/lib/mark/text.js.map +1 -1
- package/lib/mark/tree.js +1 -1
- package/lib/mark/tree.js.map +1 -1
- package/lib/mark/treemap.js +1 -2
- package/lib/mark/treemap.js.map +1 -1
- package/lib/mark/vector.js +1 -0
- package/lib/mark/vector.js.map +1 -1
- package/lib/mark/wordCloud.js +1 -1
- package/lib/mark/wordCloud.js.map +1 -1
- package/lib/runtime/component.d.ts +4 -1
- package/lib/runtime/component.js +276 -108
- package/lib/runtime/component.js.map +1 -1
- package/lib/runtime/coordinate.d.ts +12 -0
- package/lib/runtime/coordinate.js +51 -17
- package/lib/runtime/coordinate.js.map +1 -1
- package/lib/runtime/layout.d.ts +1 -1
- package/lib/runtime/layout.js +146 -77
- package/lib/runtime/layout.js.map +1 -1
- package/lib/runtime/mark.js +7 -4
- package/lib/runtime/mark.js.map +1 -1
- package/lib/runtime/plot.d.ts +1 -1
- package/lib/runtime/plot.js +196 -85
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/render.d.ts +0 -1
- package/lib/runtime/render.js +24 -47
- package/lib/runtime/render.js.map +1 -1
- package/lib/runtime/scale.d.ts +3 -1
- package/lib/runtime/scale.js +63 -5
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +18 -9
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +38 -11
- package/lib/runtime/types/component.d.ts +13 -8
- package/lib/runtime/types/mark.d.ts +4 -4
- package/lib/runtime/types/options.d.ts +16 -12
- package/lib/runtime/types/scale.d.ts +18 -0
- package/lib/runtime/types/scale.js +22 -0
- package/lib/runtime/types/scale.js.map +1 -0
- package/lib/runtime/types/theme.d.ts +8 -5
- package/lib/scale/constant.d.ts +4 -0
- package/lib/scale/constant.js +10 -0
- package/lib/scale/constant.js.map +1 -0
- package/lib/scale/index.d.ts +2 -0
- package/lib/scale/index.js +3 -1
- package/lib/scale/index.js.map +1 -1
- package/lib/shape/area/curve.js +16 -16
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/area/hv.d.ts +3 -0
- package/lib/shape/area/hv.js +13 -0
- package/lib/shape/area/hv.js.map +1 -0
- package/lib/shape/area/hvh.d.ts +3 -0
- package/lib/shape/area/{step.js → hvh.js} +5 -5
- package/lib/shape/area/hvh.js.map +1 -0
- package/lib/shape/area/vh.d.ts +3 -0
- package/lib/shape/area/vh.js +13 -0
- package/lib/shape/area/vh.js.map +1 -0
- package/lib/shape/box/box.js +1 -1
- package/lib/shape/box/box.js.map +1 -1
- package/lib/shape/connector/connector.js +3 -3
- package/lib/shape/connector/connector.js.map +1 -1
- package/lib/shape/image/image.js +2 -2
- package/lib/shape/image/image.js.map +1 -1
- package/lib/shape/index.d.ts +6 -2
- package/lib/shape/index.js +7 -3
- package/lib/shape/index.js.map +1 -1
- package/lib/shape/interval/color.d.ts +1 -0
- package/lib/shape/interval/color.js +70 -51
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/label/label.js +3 -3
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +18 -0
- package/lib/shape/label/{position.js → position/default.js} +24 -81
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +18 -0
- package/lib/shape/label/position/outside.js +75 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +7 -0
- package/lib/shape/label/position/spider.js +38 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +39 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/shape/line/curve.js +22 -11
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/line/line.js +5 -1
- package/lib/shape/line/line.js.map +1 -1
- package/lib/shape/line/smooth.js +5 -1
- package/lib/shape/line/smooth.js.map +1 -1
- package/lib/shape/lineXY/line.js +2 -2
- package/lib/shape/lineXY/line.js.map +1 -1
- package/lib/shape/link/arc.js +2 -2
- package/lib/shape/link/arc.js.map +1 -1
- package/lib/shape/link/link.js +2 -2
- package/lib/shape/link/link.js.map +1 -1
- package/lib/shape/link/smooth.js +2 -2
- package/lib/shape/link/smooth.js.map +1 -1
- package/lib/shape/link/vhv.js +2 -2
- package/lib/shape/link/vhv.js.map +1 -1
- package/lib/shape/point/color.js +1 -1
- package/lib/shape/point/color.js.map +1 -1
- package/lib/shape/polygon/polygon.js +3 -3
- package/lib/shape/polygon/polygon.js.map +1 -1
- package/lib/shape/polygon/ribbon.js +3 -3
- package/lib/shape/polygon/ribbon.js.map +1 -1
- package/lib/shape/text/advance.js +3 -3
- package/lib/shape/text/advance.js.map +1 -1
- package/lib/shape/text/badge.js +3 -3
- package/lib/shape/text/badge.js.map +1 -1
- package/lib/shape/text/text.js +1 -1
- package/lib/shape/text/text.js.map +1 -1
- package/lib/shape/utils.d.ts +5 -0
- package/lib/shape/utils.js +15 -2
- package/lib/shape/utils.js.map +1 -1
- package/lib/shape/vector/vector.js +3 -3
- package/lib/shape/vector/vector.js.map +1 -1
- package/lib/spec/composition.d.ts +9 -7
- package/lib/spec/coordinate.d.ts +17 -33
- package/lib/spec/data.d.ts +32 -10
- package/lib/spec/geometry.d.ts +24 -9
- package/lib/spec/interaction.d.ts +81 -27
- package/lib/spec/labelTransform.d.ts +24 -11
- package/lib/spec/scale.d.ts +4 -3
- package/lib/spec/theme.d.ts +5 -2
- package/lib/spec/transform.d.ts +27 -4
- package/lib/spec/utils.d.ts +7 -0
- package/lib/spec/utils.js +3 -0
- package/lib/spec/utils.js.map +1 -0
- package/lib/stdlib/index.js +3 -4
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.d.ts +3 -0
- package/lib/theme/academy.js +408 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/dark.js +163 -100
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.js +177 -101
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/filter.d.ts +7 -0
- package/lib/transform/filter.js +46 -0
- package/lib/transform/filter.js.map +1 -0
- package/lib/transform/groupN.js +2 -0
- package/lib/transform/groupN.js.map +1 -1
- package/lib/transform/index.d.ts +10 -6
- package/lib/transform/index.js +11 -7
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/maybeTooltip.js +3 -1
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/transform/sample.d.ts +8 -0
- package/lib/transform/sample.js +68 -0
- package/lib/transform/sample.js.map +1 -0
- package/lib/transform/{Select.js → select.js} +2 -14
- package/lib/transform/select.js.map +1 -0
- package/lib/transform/{SelectX.js → selectX.js} +3 -3
- package/lib/transform/selectX.js.map +1 -0
- package/lib/transform/{SelectY.js → selectY.js} +3 -3
- package/lib/transform/selectY.js.map +1 -0
- package/lib/transform/sort.d.ts +1 -1
- package/lib/transform/sort.js +38 -20
- package/lib/transform/sort.js.map +1 -1
- package/lib/transform/utils/lttb.d.ts +5 -0
- package/lib/transform/utils/lttb.js +60 -0
- package/lib/transform/utils/lttb.js.map +1 -0
- package/lib/utils/angle.d.ts +2 -0
- package/lib/utils/angle.js +12 -0
- package/lib/utils/angle.js.map +1 -0
- package/lib/utils/array.d.ts +8 -0
- package/lib/utils/array.js +38 -1
- package/lib/utils/array.js.map +1 -1
- package/lib/utils/bounds.d.ts +26 -0
- package/lib/utils/bounds.js +48 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/coordinate.d.ts +5 -0
- package/lib/utils/coordinate.js +37 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/event.d.ts +0 -2
- package/lib/utils/event.js +1 -21
- package/lib/utils/event.js.map +1 -1
- package/lib/utils/helper.d.ts +2 -0
- package/lib/utils/helper.js +12 -2
- package/lib/utils/helper.js.map +1 -1
- package/lib/utils/scale.d.ts +3 -0
- package/lib/utils/scale.js +36 -0
- package/lib/utils/scale.js.map +1 -0
- package/lib/utils/selection.d.ts +1 -0
- package/lib/utils/selection.js +5 -2
- package/lib/utils/selection.js.map +1 -1
- package/lib/utils/size.js +1 -1
- package/lib/utils/size.js.map +1 -1
- package/lib/utils/vector.d.ts +1 -1
- package/lib/utils/vector.js +1 -1
- package/package.json +9 -8
- package/src/animation/morphing.ts +35 -10
- package/src/animation/waveIn.ts +0 -1
- package/src/api/chart.ts +78 -37
- package/src/api/composition/base.ts +56 -0
- package/src/api/composition/facetCircle.ts +2 -3
- package/src/api/composition/facetRect.ts +2 -3
- package/src/api/composition/geoPath.ts +6 -9
- package/src/api/composition/geoView.ts +6 -9
- package/src/api/composition/index.ts +2 -0
- package/src/api/composition/repeatMatrix.ts +2 -3
- package/src/api/composition/spaceFlex.ts +2 -3
- package/src/api/composition/spaceLayer.ts +2 -3
- package/src/api/composition/timingKeyframe.ts +2 -3
- package/src/api/composition/view.ts +10 -8
- package/src/api/mark/base.ts +58 -0
- package/src/api/mark/mark.ts +34 -30
- package/src/api/mark/types.ts +5 -2
- package/src/api/node.ts +9 -11
- package/src/api/props.ts +4 -25
- package/src/component/axis.ts +341 -366
- package/src/component/axisArc.ts +16 -0
- package/src/component/axisRadar.ts +72 -0
- package/src/component/axisX.ts +7 -4
- package/src/component/axisY.ts +4 -4
- package/src/component/index.ts +14 -0
- package/src/component/legendCategory.ts +182 -76
- package/src/component/legendContinuous.ts +133 -33
- package/src/component/legendContinuousBlock.ts +17 -0
- package/src/component/legendContinuousBlockSize.ts +22 -0
- package/src/component/legendContinuousSize.ts +27 -0
- package/src/component/scrollbar.ts +41 -0
- package/src/component/scrollbarX.ts +16 -0
- package/src/component/scrollbarY.ts +16 -0
- package/src/component/slider.ts +52 -0
- package/src/component/sliderX.ts +16 -0
- package/src/component/sliderY.ts +16 -0
- package/src/component/title.ts +70 -31
- package/src/component/utils.ts +51 -0
- package/src/composition/facetCircle.ts +2 -2
- package/src/composition/facetRect.ts +6 -6
- package/src/composition/mark.ts +8 -4
- package/src/composition/repeatMatrix.ts +10 -3
- package/src/composition/view.ts +13 -1
- package/src/coordinate/fisheye.ts +1 -1
- package/src/coordinate/index.ts +5 -13
- package/src/coordinate/polar.ts +19 -11
- package/src/coordinate/radar.ts +24 -0
- package/src/coordinate/radial.ts +21 -11
- package/src/coordinate/theta.ts +18 -9
- package/src/coordinate/transpose.ts +1 -1
- package/src/data/filter.ts +3 -3
- package/src/data/fold.ts +6 -10
- package/src/data/index.ts +5 -3
- package/src/data/pick.ts +11 -2
- package/src/data/slice.ts +15 -0
- package/src/data/sort.ts +18 -0
- package/src/geo/geoView.ts +4 -4
- package/src/interaction/action/service/legendItemSelection.ts +1 -2
- package/src/interaction/action/transformer/setItemState.ts +2 -3
- package/src/interaction/index.ts +29 -16
- package/src/interaction/native/brushAxisHighlight.ts +207 -0
- package/src/interaction/native/brushFilter.ts +143 -0
- package/src/interaction/native/brushHighlight.ts +447 -0
- package/src/interaction/native/brushXFilter.ts +10 -0
- package/src/interaction/native/brushXHighlight.ts +13 -0
- package/src/interaction/native/brushYFilter.ts +10 -0
- package/src/interaction/native/brushYHighlight.ts +13 -0
- package/src/interaction/native/elementHighlight.ts +99 -15
- package/src/interaction/native/elementHighlightByColor.ts +3 -20
- package/src/interaction/native/elementHighlightByX.ts +4 -23
- package/src/interaction/native/elementSelect.ts +79 -20
- package/src/interaction/native/elementSelectByColor.ts +3 -16
- package/src/interaction/native/elementSelectByX.ts +3 -16
- package/src/interaction/native/fisheye.ts +6 -4
- package/src/interaction/native/legendFilter.ts +214 -0
- package/src/interaction/native/legendHighlight.ts +100 -0
- package/src/interaction/native/poptip.ts +87 -0
- package/src/interaction/native/sliderFilter.ts +112 -0
- package/src/interaction/native/tooltip.ts +201 -50
- package/src/interaction/native/utils.ts +298 -44
- package/src/label-transform/contrastReverse.ts +56 -0
- package/src/label-transform/index.ts +8 -8
- package/src/label-transform/overflowHide.ts +23 -0
- package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +7 -7
- package/src/label-transform/overlapHide.ts +32 -0
- package/src/mark/area.ts +3 -2
- package/src/mark/box.ts +1 -0
- package/src/mark/boxplot.ts +4 -4
- package/src/mark/cell.ts +2 -1
- package/src/mark/connector.ts +1 -0
- package/src/mark/forceGraph.ts +1 -1
- package/src/mark/image.ts +1 -0
- package/src/mark/interval.ts +1 -0
- package/src/mark/line.ts +2 -1
- package/src/mark/lineX.ts +1 -0
- package/src/mark/lineY.ts +1 -0
- package/src/mark/link.ts +1 -0
- package/src/mark/pack.ts +1 -2
- package/src/mark/path.ts +1 -0
- package/src/mark/point.ts +1 -0
- package/src/mark/polygon.ts +1 -0
- package/src/mark/range.ts +1 -0
- package/src/mark/rangeX.ts +1 -0
- package/src/mark/rangeY.ts +1 -0
- package/src/mark/rect.ts +1 -0
- package/src/mark/sankey.ts +1 -1
- package/src/mark/shape.ts +1 -0
- package/src/mark/text.ts +1 -0
- package/src/mark/tree.ts +1 -1
- package/src/mark/treemap.ts +1 -2
- package/src/mark/vector.ts +1 -0
- package/src/mark/wordCloud.ts +1 -1
- package/src/runtime/component.ts +393 -143
- package/src/runtime/coordinate.ts +46 -16
- package/src/runtime/layout.ts +206 -97
- package/src/runtime/mark.ts +7 -3
- package/src/runtime/plot.ts +318 -142
- package/src/runtime/render.ts +33 -72
- package/src/runtime/scale.ts +72 -7
- package/src/runtime/transform.ts +23 -8
- package/src/runtime/types/common.ts +50 -20
- package/src/runtime/types/component.ts +18 -11
- package/src/runtime/types/mark.ts +4 -4
- package/src/runtime/types/options.ts +32 -22
- package/src/runtime/types/scale.ts +20 -0
- package/src/runtime/types/theme.ts +8 -5
- package/src/scale/constant.ts +11 -0
- package/src/scale/index.ts +2 -0
- package/src/shape/area/curve.ts +22 -17
- package/src/shape/area/hv.ts +20 -0
- package/src/shape/area/{step.ts → hvh.ts} +3 -3
- package/src/shape/area/vh.ts +20 -0
- package/src/shape/box/box.ts +6 -6
- package/src/shape/connector/connector.ts +3 -4
- package/src/shape/image/image.ts +2 -2
- package/src/shape/index.ts +7 -2
- package/src/shape/interval/color.ts +97 -58
- package/src/shape/label/label.ts +4 -3
- package/src/shape/label/position/area.ts +39 -0
- package/src/shape/label/position/bottom.ts +1 -0
- package/src/shape/label/position/bottomLeft.ts +1 -0
- package/src/shape/label/position/bottomRight.ts +1 -0
- package/src/shape/label/{position.ts → position/default.ts} +26 -110
- package/src/shape/label/position/index.ts +13 -0
- package/src/shape/label/position/inside.ts +1 -0
- package/src/shape/label/position/left.ts +1 -0
- package/src/shape/label/position/outside.ts +121 -0
- package/src/shape/label/position/right.ts +1 -0
- package/src/shape/label/position/spider.ts +39 -0
- package/src/shape/label/position/surround.ts +40 -0
- package/src/shape/label/position/top.ts +1 -0
- package/src/shape/label/position/topLeft.ts +1 -0
- package/src/shape/label/position/topRight.ts +1 -0
- package/src/shape/line/curve.ts +28 -13
- package/src/shape/line/line.ts +6 -2
- package/src/shape/line/smooth.ts +11 -2
- package/src/shape/lineXY/line.ts +2 -2
- package/src/shape/link/arc.ts +2 -2
- package/src/shape/link/link.ts +2 -2
- package/src/shape/link/smooth.ts +2 -2
- package/src/shape/link/vhv.ts +2 -2
- package/src/shape/point/color.ts +6 -5
- package/src/shape/polygon/polygon.ts +3 -3
- package/src/shape/polygon/ribbon.ts +3 -3
- package/src/shape/text/advance.ts +6 -3
- package/src/shape/text/badge.ts +8 -3
- package/src/shape/text/text.ts +1 -1
- package/src/shape/utils.ts +16 -6
- package/src/shape/vector/vector.ts +3 -3
- package/src/spec/action.ts +0 -1
- package/src/spec/composition.ts +8 -8
- package/src/spec/coordinate.ts +25 -51
- package/src/spec/data.ts +36 -11
- package/src/spec/geometry.ts +29 -14
- package/src/spec/interaction.ts +120 -50
- package/src/spec/labelTransform.ts +29 -11
- package/src/spec/scale.ts +6 -1
- package/src/spec/theme.ts +6 -2
- package/src/spec/transform.ts +47 -3
- package/src/spec/utils.ts +7 -0
- package/src/stdlib/index.ts +75 -27
- package/src/theme/academy.ts +410 -0
- package/src/theme/dark.ts +164 -101
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +177 -102
- package/src/transform/filter.ts +48 -0
- package/src/transform/groupN.ts +2 -0
- package/src/transform/index.ts +10 -6
- package/src/transform/maybeTooltip.ts +3 -1
- package/src/transform/sample.ts +80 -0
- package/src/transform/select.ts +1 -2
- package/src/transform/selectX.ts +2 -2
- package/src/transform/selectY.ts +2 -2
- package/src/transform/sort.ts +53 -21
- package/src/transform/utils/lttb.ts +73 -0
- package/src/utils/angle.ts +7 -0
- package/src/utils/array.ts +39 -0
- package/src/utils/bounds.ts +52 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/coordinate.ts +41 -0
- package/src/utils/event.ts +0 -26
- package/src/utils/helper.ts +17 -2
- package/src/utils/scale.ts +31 -0
- package/src/utils/selection.ts +7 -2
- package/src/utils/size.ts +1 -1
- package/src/utils/vector.ts +1 -1
- package/esm/coordinate/fisheyeX.d.ts +0 -7
- package/esm/coordinate/fisheyeX.js +0 -6
- package/esm/coordinate/fisheyeX.js.map +0 -1
- package/esm/coordinate/fisheyeY.d.ts +0 -7
- package/esm/coordinate/fisheyeY.js +0 -6
- package/esm/coordinate/fisheyeY.js.map +0 -1
- package/esm/coordinate/reflect.d.ts +0 -7
- package/esm/coordinate/reflect.js +0 -10
- package/esm/coordinate/reflect.js.map +0 -1
- package/esm/coordinate/reflectX.d.ts +0 -7
- package/esm/coordinate/reflectX.js +0 -10
- package/esm/coordinate/reflectX.js.map +0 -1
- package/esm/coordinate/reflectY.d.ts +0 -7
- package/esm/coordinate/reflectY.js +0 -10
- package/esm/coordinate/reflectY.js.map +0 -1
- package/esm/data/subset.d.ts +0 -7
- package/esm/data/subset.js +0 -26
- package/esm/data/subset.js.map +0 -1
- package/esm/geo/d3-projection.js.map +0 -1
- package/esm/label-transform/dodgeY.d.ts +0 -7
- package/esm/label-transform/dodgeY.js.map +0 -1
- package/esm/label-transform/hideOverlap.d.ts +0 -4
- package/esm/label-transform/hideOverlap.js +0 -48
- package/esm/label-transform/hideOverlap.js.map +0 -1
- package/esm/label-transform/spider.d.ts +0 -7
- package/esm/label-transform/spider.js +0 -30
- package/esm/label-transform/spider.js.map +0 -1
- package/esm/label-transform/surround.d.ts +0 -7
- package/esm/label-transform/surround.js +0 -30
- package/esm/label-transform/surround.js.map +0 -1
- package/esm/shape/area/step.d.ts +0 -3
- package/esm/shape/area/step.js.map +0 -1
- package/esm/shape/label/position.d.ts +0 -25
- package/esm/shape/label/position.js +0 -169
- package/esm/shape/label/position.js.map +0 -1
- package/esm/transform/Select.js.map +0 -1
- package/esm/transform/SelectX.js.map +0 -1
- package/esm/transform/SelectY.js.map +0 -1
- package/lib/coordinate/fisheyeX.d.ts +0 -7
- package/lib/coordinate/fisheyeX.js +0 -10
- package/lib/coordinate/fisheyeX.js.map +0 -1
- package/lib/coordinate/fisheyeY.d.ts +0 -7
- package/lib/coordinate/fisheyeY.js +0 -10
- package/lib/coordinate/fisheyeY.js.map +0 -1
- package/lib/coordinate/reflect.d.ts +0 -7
- package/lib/coordinate/reflect.js +0 -14
- package/lib/coordinate/reflect.js.map +0 -1
- package/lib/coordinate/reflectX.d.ts +0 -7
- package/lib/coordinate/reflectX.js +0 -14
- package/lib/coordinate/reflectX.js.map +0 -1
- package/lib/coordinate/reflectY.d.ts +0 -7
- package/lib/coordinate/reflectY.js +0 -14
- package/lib/coordinate/reflectY.js.map +0 -1
- package/lib/data/subset.d.ts +0 -7
- package/lib/data/subset.js +0 -30
- package/lib/data/subset.js.map +0 -1
- package/lib/geo/d3-projection.js.map +0 -1
- package/lib/label-transform/dodgeY.d.ts +0 -7
- package/lib/label-transform/dodgeY.js.map +0 -1
- package/lib/label-transform/hideOverlap.d.ts +0 -4
- package/lib/label-transform/hideOverlap.js +0 -52
- package/lib/label-transform/hideOverlap.js.map +0 -1
- package/lib/label-transform/spider.d.ts +0 -7
- package/lib/label-transform/spider.js +0 -34
- package/lib/label-transform/spider.js.map +0 -1
- package/lib/label-transform/surround.d.ts +0 -7
- package/lib/label-transform/surround.js +0 -34
- package/lib/label-transform/surround.js.map +0 -1
- package/lib/shape/area/step.d.ts +0 -3
- package/lib/shape/area/step.js.map +0 -1
- package/lib/shape/label/position.d.ts +0 -25
- package/lib/shape/label/position.js.map +0 -1
- package/lib/transform/Select.js.map +0 -1
- package/lib/transform/SelectX.js.map +0 -1
- package/lib/transform/SelectY.js.map +0 -1
- package/src/coordinate/fisheyeX.ts +0 -15
- package/src/coordinate/fisheyeY.ts +0 -15
- package/src/coordinate/reflect.ts +0 -15
- package/src/coordinate/reflectX.ts +0 -15
- package/src/coordinate/reflectY.ts +0 -15
- package/src/data/subset.ts +0 -35
- package/src/label-transform/hideOverlap.ts +0 -62
- package/src/label-transform/spider.ts +0 -37
- package/src/label-transform/surround.ts +0 -37
- /package/esm/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- /package/esm/transform/{Select.d.ts → select.d.ts} +0 -0
- /package/esm/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
- /package/esm/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
- /package/lib/geo/{d3-projection.d.ts → d3Projection.d.ts} +0 -0
- /package/lib/transform/{Select.d.ts → select.d.ts} +0 -0
- /package/lib/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
- /package/lib/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
- /package/src/geo/{d3-projection.ts → d3Projection.ts} +0 -0
package/dist/g2-lite.min.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(g,F,v){"use strict";const k="main-layer",tt="label-layer",et="element",C="view",nt="plot",rt="component",it="label",at="area";var L=1e-6,O="undefined"!=typeof Float32Array?Float32Array:Array;function j(){var t=new O(9);return O!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var z=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],y=n[4],g=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+y*o+g*c,t[4]=p*i+y*s+g*u,t[5]=p*a+y*l+g*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function W(){var t=new O(16);return O!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function H(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function V(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=y,t[15]=g,t}function G(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function q(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function Y(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,M=i*c-a*l,k=u*y-f*p,O=u*g-h*p,_=u*e-d*p,S=f*g-h*y,E=f*e-d*y,A=h*e-d*g,P=m*A-v*E+b*S+x*_-w*O+M*k;return P?(t[0]=(s*A-l*E+c*S)*(P=1/P),t[1]=(i*E-r*A-a*S)*P,t[2]=(y*M-g*w+e*x)*P,t[3]=(h*w-f*M-d*x)*P,t[4]=(l*_-o*A-c*O)*P,t[5]=(n*A-i*_+a*O)*P,t[6]=(g*b-p*M-e*v)*P,t[7]=(u*M-h*b+d*v)*P,t[8]=(o*E-s*_+c*k)*P,t[9]=(r*_-n*E-a*k)*P,t[10]=(p*w-y*b+e*m)*P,t[11]=(f*b-u*w-d*m)*P,t[12]=(s*O-o*S-l*k)*P,t[13]=(n*S-r*O+i*k)*P,t[14]=(y*v-p*x-g*m)*P,t[15]=(u*x-f*v+h*m)*P,t):null}function U(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];return(e*o-n*a)*(f*t-h*y)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*y-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*y-f*d)+(r*l-i*s)*(c*p-u*d)}function X(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],y=e[12],g=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*y,t[1]=v*i+b*l+x*h+w*g,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*y,t[5]=v*i+b*l+x*h+w*g,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*y,t[9]=v*i+b*l+x*h+w*g,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*y,t[13]=v*i+b*l+x*h+w*g,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function $(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,y=n[0],g=n[1],n=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*y+s*g+f*n+e[12],t[13]=i*y+l*g+h*n+e[13],t[14]=a*y+c*g+d*n+e[14],t[15]=o*y+u*g+p*n+e[15]),t}function Z(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ot(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function st(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function lt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ct(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ut(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ft(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function ht(t,e){var n=new O(3),r=(ft(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function dt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],y=i[0],g=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+y-(m*y+h*g+p*i),t[13]=n[1]+g-(v*y+e*g+a*i),t[14]=n[2]+i-(u*y+s*g+c*i),t[15]=1,t}function pt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function yt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function gt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var mt=gt;function vt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<L&&Math.abs(c-d)<L&&Math.abs(e-n)<L?G(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function bt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var xt=Object.freeze({__proto__:null,create:W,clone:function(t){var e=new O(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:H,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y){var g=new O(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=f,g[12]=h,g[13]=d,g[14]=p,g[15]=y,g},set:V,identity:G,transpose:q,invert:Y,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(h*e-d*g)-f*(l*e-c*g)+y*(l*d-c*h),t[1]=-(r*(h*e-d*g)-f*(i*e-a*g)+y*(i*d-a*h)),t[2]=r*(l*e-c*g)-s*(i*e-a*g)+y*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*g)-u*(l*e-c*g)+p*(l*d-c*h)),t[5]=n*(h*e-d*g)-u*(i*e-a*g)+p*(i*d-a*h),t[6]=-(n*(l*e-c*g)-o*(i*e-a*g)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*y)-u*(s*e-c*y)+p*(s*d-c*f),t[9]=-(n*(f*e-d*y)-u*(r*e-a*y)+p*(r*d-a*f)),t[10]=n*(s*e-c*y)-o*(r*e-a*y)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*g-h*y)-u*(s*g-l*y)+p*(s*h-l*f)),t[13]=n*(f*g-h*y)-u*(r*g-i*y)+p*(r*h-i*f),t[14]=-(n*(s*g-l*y)-o*(r*g-i*y)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:U,multiply:X,translate:$,scale:Z,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,y,g,m,v,b,x,w,M,k,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<L?null:(O*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],y=e[10],g=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,M=_*r*i-O*S,k=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+y*r,t[3]=l*n+h*m+g*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+y*x,t[7]=l*v+h*b+g*x,t[8]=a*w+c*M+d*k,t[9]=o*w+u*M+p*k,t[10]=s*w+f*M+y*k,t[11]=l*w+h*M+g*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:ot,rotateY:st,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:lt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<L?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:ct,fromQuat2:function(t,e){var n=new O(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),ct(t,e,n),t},getTranslation:ut,getScaling:ft,getRotation:ht,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:dt,fromQuat:pt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:yt,perspective:yt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:gt,ortho:mt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:vt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:bt,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],y=t[13],g=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],M=e[5],k=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],P=e[12],N=e[13],T=e[14],e=e[15];return Math.abs(n-m)<=L*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=L*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=L*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=L*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=L*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-M)<=L*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(l-k)<=L*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(c-O)<=L*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=L*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=L*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=L*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=L*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-P)<=L*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(y-N)<=L*Math.max(1,Math.abs(y),Math.abs(N))&&Math.abs(g-T)<=L*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(t-e)<=L*Math.max(1,Math.abs(t),Math.abs(e))},mul:X,sub:bt});function m(){var t=new O(3);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function wt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function b(t,e,n){var r=new O(3);return r[0]=t,r[1]=e,r[2]=n,r}function Mt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function kt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ot(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function _t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function St(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Et(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function At(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Pt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Nt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Tt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Lt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=L*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=L*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=L*Math.max(1,Math.abs(t),Math.abs(e))}var Ct=_t,jt=wt;function Ft(){var t=new O(4);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function It(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Rt(){var t=new O(4);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Bt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Dt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function zt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function Wt(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}m(),Ft();var Ht=function(t,e,n,r){var i=new O(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},Vt=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Gt=Dt,qt=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function Yt(t,e){var n=new O(2);return n[0]=t,n[1]=e,n}function Ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Xt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function $t(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function Zt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Kt(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function Jt(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}m(),b(1,0,0),b(0,1,0),Rt(),Rt(),j();var Qt=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function te(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new O(2),O!=Float32Array&&(e[0]=0,e[1]=0);var ee=function(t,e){return(ee=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var _=function(){return(_=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function K(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ne(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function re(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var ie={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var ae={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function oe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return ae[e]===t.length-1&&"achlmqstvz".includes(e)})}function se(t){return oe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function le(t){return se(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ce(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ae[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,ae[n]))),ae[n]););}function ue(t){return 48<=t&&t<=57}function fe(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function he(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=ae[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,fe(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(ue(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&ue(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&ue(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;ue(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&ue(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&ue(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),fe(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,fe(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ce(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var de=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function pe(t){var o,s,l,c;return se(t)?te(t):(t=function(t){if(oe(t))return te(t);var e=new de(t);for(fe(e);e.index<e.max&&!e.err.length;)he(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function ye(t){if(le(t))return te(t);for(var e,n,r,i,a,o,s,l=pe(t),c=_({},ie),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function ge(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function me(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function ve(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function be(t,e,n,r,i){var a=ve([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=me([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function xe(t,e,n,r){var t=[t,e],e=[n,r],i=me(t,e,.5),e=me(e,i,.5),a=me(i,e,.5),o=me(e,a,.5),s=me(a,o,.5),t=be(t[0],t[1],i[0],i[1],a[0]).point,i=be(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function we(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(g=ge(e,n,-h)).x,n=g.y,1<(p=(y=(e-(l=(g=ge(l,c,-h)).x))/2)*y/(r*r)+(g=(n-(c=g.y))/2)*g/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*g*g-m*y*y)/(p*g*g+m*y*y))))*r*g/i+(e+l)/2,b=o*-i*y/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),y=(Math.abs(p)>f&&(m=w,g=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,g,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),g=Math.tan(p/4),o=4/3*r*g,m=4/3*i*g,v=[e,n],b=[e+o*f,n-m*y],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var M=[],k=0,O=(d=b.concat(x,w,d)).length;k<O;k+=1)M[k]=k%2?ge(d[k-1],d[k],h).y:ge(d[k],d[k+1],h).x;return M}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(xe(h,d,u,f));case"Z":return h===p&&d===y?["C",h,d,p,y,p,y]:["C"].concat(xe(h,d,p,y))}return t}function Me(t,e){var n;if(void 0===e&&(e=!1),le(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=te(t),e?[n,[]]:n;for(var r,i=ye(t),a=_({},ie),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=we(i[u],a),h=(i[u]=f,g=y=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var y=h[p],g=p;y.length;)d[p]="A",h.splice(g+=1,0,["C"].concat(y.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function ke(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,y=t,g=e,m=0,v=[y,g,m],b=[y,g],x={x:0,y:0},w=[{x:y,y:g}];p&&l<=0&&(x={x:y,y:g});for(var M,k,O,_,S,E,A,P,N,T,L=0;L<=d;L+=1)M=t,k=e,O=n,_=r,S=i,E=a,A=o,P=s,T=void 0,T=1-(N=L/d),y=(M={x:Math.pow(T,3)*M+3*Math.pow(T,2)*N*O+3*T*Math.pow(N,2)*S+Math.pow(N,3)*A,y:Math.pow(T,3)*k+3*Math.pow(T,2)*N*_+3*T*Math.pow(N,2)*E+Math.pow(N,3)*P}).x,g=M.y,f&&w.push({x:y,y:g}),h&&(m+=ve(b,[y,g])),b=[y,g],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[y,g,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Oe(t){return(c=l=s=0)<=Me(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function _e(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?ke(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=me(n,i,r),i=me(i,a,r),a=me(a,e,r),o=me(n,i,r),i=me(i,a,r),r=me(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}function Se(t){return Array.isArray?Array.isArray(t):Ne(t,"Array")}function Ee(t){var e=typeof t;return null!==t&&"object"==e||"function"==e}var Ae=function(t){return null==t},Pe={}.toString,Ne=function(t,e){return Pe.call(t)==="[object "+e+"]"},Te=function(t){if(Se(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Le=function(t){if(Se(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Ce=function(t){return Ne(t,"String")},je=function(t,e,n){return t<e?e:n<t?n:t},Fe=function(t){return Ne(t,"Number")};function Ie(a,o){if("function"!=typeof a)throw new TypeError("Expected a function");function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}return s.cache=new Map,s}var Re=function(t,e){return(t%e+e)%e},Be=function(t){return Ne(t,"Boolean")},De=function(t){return void 0===t};function ze(t,e,n){(t.prototype=e.prototype=n).constructor=t}function We(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function He(){}var e="\\s*([+-]?\\d+)\\s*",Ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ge=/^#([0-9a-f]{3,8})$/,qe=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Ye=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),Ue=new RegExp("^rgba\\("+[e,e,e,Ve]+"\\)$"),Xe=new RegExp("^rgba\\("+[n,n,n,Ve]+"\\)$"),$e=new RegExp("^hsl\\("+[Ve,n,n]+"\\)$"),Ze=new RegExp("^hsla\\("+[Ve,n,n,Ve]+"\\)$"),Ke={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Je(){return this.rgb().formatHex()}function Qe(){return this.rgb().formatRgb()}function tn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ge.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?en(e):3===n?new rn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?nn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?nn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=qe.exec(t))?new rn(e[1],e[2],e[3],1):(e=Ye.exec(t))?new rn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ue.exec(t))?nn(e[1],e[2],e[3],e[4]):(e=Xe.exec(t))?nn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$e.exec(t))?ln(e[1],e[2]/100,e[3]/100,1):(e=Ze.exec(t))?ln(e[1],e[2]/100,e[3]/100,e[4]):Ke.hasOwnProperty(t)?en(Ke[t]):"transparent"===t?new rn(NaN,NaN,NaN,0):null}function en(t){return new rn(t>>16&255,t>>8&255,255&t,1)}function nn(t,e,n,r){return new rn(t=r<=0?e=n=NaN:t,e,n,r)}function rn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function an(){return"#"+sn(this.r)+sn(this.g)+sn(this.b)}function on(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function sn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ln(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new un(t,e,n,r)}function cn(t){var e,n,r,i,a,o,s,l;return t instanceof un?new un(t.h,t.s,t.l,t.opacity):(t=t instanceof He?t:tn(t))?t instanceof un?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new un(o,s,l,t.opacity)):new un}function un(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function hn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function dn(t,e){return Math.abs(t-e)<.001}function pn(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function yn(t){return(t+2*Math.PI)%(2*Math.PI)}ze(He,tn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Je,formatHex:Je,formatHsl:function(){return cn(this).formatHsl()},formatRgb:Qe,toString:Qe}),ze(rn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof He?i:tn(i))?new rn((i=i.rgb()).r,i.g,i.b,i.opacity):new rn:new rn(t,e,n,null==r?1:r);var i},We(He,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new rn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:an,formatHex:an,formatRgb:on,toString:on})),ze(un,function(t,e,n,r){return 1===arguments.length?cn(t):new un(t,e,n,null==r?1:r)},We(He,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new rn(fn(240<=t?t-240:120+t,n,e),fn(t,n,e),fn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var gn={box:function(t,e,n,r){return pn([t,n],[e,r])},length:hn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?hn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?hn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(Jt(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function mn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=hn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(f<1e-4);y++){var g=o-f,m=o+f,v=[i.apply(void 0,t.concat([g])),i.apply(void 0,e.concat([g]))],v=hn(l[0],l[1],v[0],v[1]);0<=g&&v<s?(o=g,s=v):(g=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=hn(l[0],l[1],g[0],g[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function vn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function bn(t,e,n){n=t+n-2*e;return dn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function xn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function wn(t,e,n,r,i,a,o){var s=vn(t,n,i,o),l=vn(e,r,a,o),c=gn.pointAt(t,e,n,r,o),n=gn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function Mn(t,e,n,r,i,a,o){return 0===o?(hn(t,e,n,r)+hn(n,r,i,a)+hn(t,e,i,a))/2:(e=(t=wn(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),Mn.apply(void 0,e)+Mn.apply(void 0,n))}var kn={box:function(t,e,n,r,i,a){var o=bn(t,n,i)[0],s=bn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(vn(t,n,i,o)),void 0!==s&&c.push(vn(e,r,a,s)),pn(l,c)},length:function(t,e,n,r,i,a){return Mn(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return mn([t,n,i],[e,r,a],o,s,vn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return hn(t.x,t.y,o,s)},interpolationAt:vn,pointAt:function(t,e,n,r,i,a,o){return{x:vn(t,n,i,o),y:vn(e,r,a,o)}},divide:wn,tangentAngle:function(t,e,n,r,i,a,o){t=xn(t,n,i,o),n=xn(e,r,a,o);return yn(Math.atan2(n,t))}};function On(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function _n(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function Sn(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return dn(r,0)?dn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):dn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function En(t,e,n,r,i,a,o,s,l){var c=On(t,n,i,o,l),u=On(e,r,a,s,l),f=gn.pointAt(t,e,n,r,l),n=gn.pointAt(n,r,i,a,l),r=gn.pointAt(i,a,o,s,l),i=gn.pointAt(f.x,f.y,n.x,n.y,l),a=gn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function An(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=hn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=En(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return An.apply(void 0,e)+An.apply(void 0,n)}var Pn={extrema:Sn,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Sn(t,n,i,o),f=Sn(e,r,a,s),h=0;h<u.length;h++)l.push(On(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(On(e,r,a,s,f[d]));return pn(l,c)},length:function(t,e,n,r,i,a,o,s){return An(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return mn([t,n,i,o],[e,r,a,s],l,c,On,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return hn(t.x,t.y,l,c)},interpolationAt:On,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:On(t,n,i,o,l),y:On(e,r,a,s,l)}},divide:En,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=_n(t,n,i,o,l),n=_n(e,r,a,s,l);return yn(Math.atan2(n,t))}};function Nn(t,e){t=Math.abs(t);return 0<e?t:-1*t}var Tn=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,y=0;y<4;y++){var d=o*Math.cos(h),p=s*Math.sin(h),g=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-g,b=p-m,g=l-g,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,g);h+=x*Math.asin((v*m-b*g)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+Nn(d,n),y:e+Nn(p,r)}};function Ln(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Cn(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function jn(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Fn(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var In={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=Ln(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=y+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var M=Cn(0,e,n,r,i,v[w]);M<g&&(g=M),m<M&&(m=M)}return{x:l,y:g,width:c-l,height:m-g}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=Fn(s-t,l-e,-i),l=s[0],s=s[1],l=Tn(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=jn(n,r,a):o<c&&(l=jn(n,r,o)),Fn(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return hn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:Ln(t,0,n,r,i,o),y:Cn(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return yn(Math.atan2(i,s))}};function Rn(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=hn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Bn,Dn,zn={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return pn(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=hn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=Rn(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=gn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=gn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Rn(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function Wn(){}function Hn(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Vn(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new Hn(n,r||t,i),r=Dn?Dn+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Gn(t,e){0==--t._eventsCount?t._events=new Wn:delete t._events[e]}function qn(){this._events=new Wn,this._eventsCount=0}n=e,Bn=Object.prototype.hasOwnProperty,Dn="~",Object.create&&(Wn.prototype=Object.create(null),(new Wn).__proto__||(Dn=!1)),qn.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Bn.call(t,e)&&n.push(Dn?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},qn.prototype.listeners=function(t){var t=Dn?Dn+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},qn.prototype.listenerCount=function(t){t=Dn?Dn+t:t,t=this._events[t];return t?t.fn?1:t.length:0},qn.prototype.emit=function(t,e,n,r,i,a){var o=Dn?Dn+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},qn.prototype.on=function(t,e,n){return Vn(this,t,e,n,!1)},qn.prototype.once=function(t,e,n){return Vn(this,t,e,n,!0)},qn.prototype.removeListener=function(t,e,n,r){t=Dn?Dn+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Gn(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:Gn(this,t)}}else Gn(this,t);return this},qn.prototype.removeAllListeners=function(t){return t?(t=Dn?Dn+t:t,this._events[t]&&Gn(this,t)):(this._events=new Wn,this._eventsCount=0),this},qn.prototype.off=qn.prototype.removeListener,qn.prototype.addListener=qn.prototype.on,qn.prefixed=Dn,n.exports=qn.EventEmitter=qn;var Yn=e.exports,Ve="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let Un=1;const Xn="object"==typeof self&&self.self==self?self:"object"==typeof Ve&&Ve.global==Ve?Ve:{},$n=Date.now();let Zn={},Kn=Date.now();const Jn=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Kn,r=16<e?0:16-e,i=Un++;return Zn[i]=t,1<Object.keys(Zn).length||setTimeout(()=>{Kn=n;const e=Zn;Zn={},Object.keys(e).forEach(t=>e[t](Xn.performance&&"function"==typeof Xn.performance.now?Xn.performance.now():Date.now()-$n))},r),i}:""===t?Xn.requestAnimationFrame:Xn[t+"RequestAnimationFrame"],Qn=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Jn(t)),tr=Jn(Qn),er="string"!=typeof(n=Qn)?t=>{delete Zn[t]}:""===n?Xn.cancelAnimationFrame:Xn[n+"CancelAnimationFrame"]||Xn[n+"CancelRequestAnimationFrame"];Xn.requestAnimationFrame=tr,Xn.cancelAnimationFrame=er,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:tr,cancelAnimationFrame:er}),(e=u=u||{}).COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>";var x,nr=function(){function g(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}g.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=g.prototype;return t.update=function(t,e){Mt(this.center,t),Mt(this.halfExtents,e),Ct(this.min,this.center,this.halfExtents),Ot(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Ot(this.center,e,t),St(this.center,this.center,.5),Ct(this.halfExtents,e,t),St(this.halfExtents,this.halfExtents,.5),Mt(this.min,t),Mt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],y=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=y-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=y+u)&&(d=p),(y=h-(f=t[2]))<(u=a-o)&&(u=y),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(y=l-c)<(a=n-i)?y:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),y=Math.abs(o),g=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),M=Math.abs(d);kt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),kt(r,p*t[0]+y*t[1]+g*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+M*t[2]),this.min=Ct(this.min,n,r),this.max=Ot(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new g,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Mt(m(),this.min):272===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):b(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Mt(m(),this.max):272===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):b(this.min[0],this.min[1],this.min[2])},g}(),rr=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||b(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return At(t,this.normal)-this.distance},e.normalize=function(){var t=1/jt(this.normal);St(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),ir=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new rr)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];kt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,kt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,kt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,kt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,kt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-y,kt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),ar=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),or=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),sr=((n=x=x||{}).GROUP="g",n.CIRCLE="circle",n.ELLIPSE="ellipse",n.IMAGE="image",n.RECT="rect",n.LINE="line",n.POLYLINE="polyline",n.POLYGON="polygon",n.TEXT="text",n.PATH="path",n.HTML="html",n.MESH="mesh",Ie(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function lr(t){if(!t)throw new Error}function cr(t,e){if(t===e)throw new Error}function ur(t){return"function"==typeof t}var fr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},hr=Ie(function(t){var t=sr(t),e=fr[t];return(null==e?void 0:e.alias)||t});var s,dr,pr,yr,gr="Method not implemented.";function mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vr(t,e,n){e&&mr(t.prototype,e),n&&mr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function br(){return(br=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function xr(t,e){t.prototype=Object.create(e.prototype),wr(t.prototype.constructor=t,e)}function wr(t,e){return(wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Or(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?kr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=s=s||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(n=dr=dr||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(e=pr=pr||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",(n=yr=yr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo";function _r(t){return t?"number"===t?s.kNumber:"percent"===t||"%"===t?s.kPercentage:(e=t,Tr.find(function(t){return t.name===e}).unit_type):s.kUnknown;var e}function Sr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function Er(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var Ar,Pr,Nr,l,Tr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],n=((e=Ar=Ar||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(pr.kNo,yr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Ar.kUnitType&&this.getType()<=Ar.kClampType},t}()),e=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}xr(t,n);var e=t.prototype;return e.getType=function(){return Ar.kColorType},e.to=function(t){return this},t}(n),Lr=((r=Pr=Pr||{})[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}xr(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Ar.kColorType},t}(n)),Cr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}xr(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Ar.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);(r=Nr=Nr||{}).kAdd="+",r.kSubtract="-",r.kMultiply="*",r.kDivide="/",r.kMin="min",r.kMax="max",r.kClamp="clamp",r.kInvalid="",(r=l=l||{})[r.kLength=0]="kLength",r[r.kAngle=1]="kAngle",r[r.kTime=2]="kTime",r[r.kFrequency=3]="kFrequency",r[r.kResolution=4]="kResolution",r[r.kFlex=5]="kFlex",r[r.kPercent=6]="kPercent",r[r.kNumBaseTypes=7]="kNumBaseTypes";function jr(t){return"number"==typeof t?new Hr(t,s.kNumber):t}var Fr=function(){function t(t,e){void 0===t&&(t=s.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=l.kPercent,this.hasPercentHint=!1,this.exponents=new Array(l.kNumBaseTypes).fill(0),t!==s.kNumber&&this.setExponent(function(t){switch(cr(t,s.kNumber),t){case s.kEms:case s.kPixels:case s.kRems:return l.kLength;case s.kMilliseconds:case s.kSeconds:return l.kTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return l.kAngle;case s.kPercentage:return l.kPercent;default:return l.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){cr(t,l.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(l.kPercent)),this.setExponent(l.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return cr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return cr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesBaseTypePercentage=function(t){return cr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(l.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<l.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==l.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<l.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),r=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}xr(d,n);var t=d.prototype;return t.getType=function(){return Ar.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ir(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kSumType,r,this),Dr(r,Nr.kAdd));return i||$r.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Ir(e)).map(function(t){return t.negate()}),i=(Rr(Ar.kSumType,r,this),Dr(r,Nr.kAdd));return i||$r.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kProductType,r,this),zr(r));return i||Zr.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Ir(e)).map(function(t){return t.invert()}),i=(Rr(Ar.kProductType,r,this),zr(r));return i||Zr.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kMinType,r,this),Dr(r,Nr.kMin));return i||Ur.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kMaxType,r,this),Dr(r,Nr.kMax));return i||Xr.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Br(e[0]))?(t="string"==typeof t?_r(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!d.isValidUnit(_r(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],l=Or(o);!(c=l()).done;){var c=Br(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),lr(!!(o=$r.create(s))),o;for(var u=[],f=0,h=e;f<h.length;f++)!function(){var t=h[f],r=_r(t),t=(lr(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new Hr(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return $r.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(l.kLength);return e&&(t.length=e),(e=this.type_.exponent(l.kAngle))&&(t.angle=e),(e=this.type_.exponent(l.kTime))&&(t.time=e),(e=this.type_.exponent(l.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(l.kResolution))&&(t.resolution=e),(e=this.type_.exponent(l.kFlex))&&(t.flex=e),(e=this.type_.exponent(l.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case l.kLength:return"length";case l.kAngle:return"angle";case l.kTime:return"time";case l.kFrequency:return"frequency";case l.kResolution:return"resolution";case l.kFlex:return"flex";case l.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===s.kNumber||t==s.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Gr.create(this)},t.invert=function(){return Vr.create(this)},d}(n);function Ir(t){return t.map(jr)}function Rr(t,e,n){lr(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Br(t){return 0===Object.keys(t.units).length?new Hr(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Hr(t.value,Number(Object.keys(t.units)[0])):null}function Dr(t,e){lr(!!t.length);var n=t[0]instanceof Hr?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof Hr?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Nr.kAdd?r+=a.value:e===Nr.kMax?r=Math.max(r,a.value):e===Nr.kMin&&(r=Math.min(r,a.value))}return new Hr(r,n.unit)}function zr(t){lr(!!t.length);for(var e=s.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Hr?t[r]:null;if(!i)return null;if(i.unit!==s.kNumber){if(e!==s.kNumber)return null;e=i.unit}n*=i.value}return new Hr(n,e)}function Wr(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return dr.kUNumber;case s.kPercentage:return dr.kUPercent;case s.kPixels:return dr.kULength;case s.kMilliseconds:case s.kSeconds:return dr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return dr.kUAngle;default:return dr.kUOther}}(t)){case dr.kUNumber:return s.kNumber;case dr.kULength:return s.kPixels;case dr.kUPercent:return s.kPercentage;case dr.kUTime:return s.kSeconds;case dr.kUAngle:return s.kDegrees;default:return s.kUnknown}}var Hr=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?s.kNumber:e)?_r(e):e;return(n=r.call(this,new Fr(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}xr(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Wr(this.unit))!==Wr(t)||e===s.kUnknown?null:(e=Sr(this.unit)/Sr(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Ar.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==s.kNumber&&(r[t=this.unit,(e=Wr(t))===s.kUnknown?t:e]=1),n.push({value:this.value*Sr(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===s.kNumber?0===this.value?null:new n(1/this.value,this.unit):Vr.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=Er(this.unit);i=a<-999999||999999<a?(r=Er(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(lr(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(r),n=function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.isUnitValue=function(){return!1},e}(r),Vr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}xr(e,n),e.create=function(t){return new e(t,Fr.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Ar.kInvertType},t.equals=function(t){return t.getType()===Ar.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==yr.kNo&&(n+=t===pr.kYes?"(":"calc("),n=this.value.buildCSSText(pr.kYes,yr.kNo,n+="1 / "),e===yr.kNo&&(n+=")"),n},e}(n),Gr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}xr(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Ar.kNegateType},t.equals=function(t){return t.getType()===Ar.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==yr.kNo&&(n+=t===pr.kYes?"(":"calc("),n=this.value.buildCSSText(pr.kYes,yr.kNo,n+="-"),e===yr.kNo&&(n+=")"),n},e}(n);function qr(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function Yr(t){return ei[t]||(ei[t]=new Cr(t)),ei[t]}var r=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}xr(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(n),Ur=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}xr(e,i),e.create=function(t){return new e(t,qr(t,Fr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Ar.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Or(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,a=Or(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(pr.kYes,yr.kYes,n);return n+=")"},e}(r),Xr=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}xr(e,i),e.create=function(t){return new e(t,qr(t,Fr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Ar.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Or(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,a=Or(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(pr.kYes,yr.kYes,n);return n+=")"},e}(r),$r=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}xr(e,i),e.create=function(t){return new e(t,qr(t,Fr.add))},e.numericTypeFromUnitMap=function(n){var r=new Fr;return Object.keys(n).forEach(function(t){var e=n[t];r=Fr.multiply(r,new Fr(Number(t),e),!1),lr(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(lr(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Fr.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Ar.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(br({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==yr.kNo&&(n+=t===pr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(pr.kYes,yr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Ar.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(pr.kYes,yr.kNo,n)}return e===yr.kNo&&(n+=")"),n},e}(r),Zr=function(i){function a(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}xr(a,i),a.create=function(t){return new a(t,qr(t,Fr.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){cr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=a.prototype;return t.clone=function(){return new a(this.values,this.type_)},t.getType=function(){return Ar.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==yr.kNo&&(n+=t===pr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(pr.kYes,yr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Ar.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(pr.kYes,yr.kNo,n)}return e===yr.kNo&&(n+=")"),n},a}(r),Kr=new Hr(0,"px"),Jr=(new Hr(1,"px"),new Hr(0,"deg")),Qr=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}xr(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(e),ti=new Cr("unset"),n=new Cr("initial"),r=new Cr("inherit"),ei={"":ti,unset:ti,initial:n,inherit:r},ni=new Qr(0,0,0,0,!0),ri=new Qr(0,0,0,0),ii=Ie(function(t,e,n,r){return new Qr(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ai=Ie(function(t,e){return void 0===e&&(e=s.kNumber),new Hr(t,e)},function(t,e){return""+t+(e=void 0===e?s.kNumber:e)}),oi=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,si=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,li=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ci=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ui={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},fi=Ie(function(t){t="angular"===t.type?Number(t.value):ui[t.value]||0;return ai(t,"deg")}),hi=Ie(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:ai(n,i),cy:ai(r,a)}}),di=Ie(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Ya(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!Ae(c)&&!Ae(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:ai(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Lr(Pr.LinearGradient,{angle:n?fi(n):Jr,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=hi(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?Yr(n):ai(n,f)),new Lr(Pr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=oi.exec(t);if(n)return r=(null==(r=n[2].match(ci))?void 0:r.map(function(t){return t.split(":")}))||[],[new Lr(Pr.LinearGradient,{angle:ai(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ai(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=si.exec(t);if(t)return t=(null==(t=t[4].match(ci))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ai(50,"%"),cy:ai(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ai(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!Ce(n))return[new Lr(Pr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=li.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});var pi=Ie(function(t){var e;return Ee(e=t)&&e.image?br({repetition:"repeat"},t):"transparent"===(t=Ae(t)?"":t)?ri:di(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=tn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),ii.apply(void 0,e))});function yi(t,e){if(t instanceof Qr&&e instanceof Qr)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(je(e[n],0,255));return e[3]=je(e[3],0,1),"rgba("+e.join(",")+")"}]}function gi(t,e){if(Ae(e))return ai(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ai(Number(e),"px");if(0<="deg".search(t))return ai(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ai(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var mi=Ie(function(t){return gi(new RegExp("px","g"),t)}),vi=(Ie(function(t){return gi(new RegExp("%","g"),t)}),Ie(function(t){return Fe(t)||isFinite(Number(t))?ai(Number(t),"px"):gi(new RegExp("px|%|em|rem","g"),t)})),bi=Ie(function(t){return gi(new RegExp("deg|rad|grad|turn","g"),t)});function xi(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=Ia(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function wi(t){return Ce(t)?t.split(" ").map(function(t){return vi(t)}):t.map(function(t){return vi(t.toString())})}function Mi(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,nr.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var ki=function(t){return gi(/deg|rad|grad|turn|px|%/g,t)},Oi=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function _i(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Oi.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return ki(t)||pi(t)})}),n.lastIndex===t.length)return r}return[]}function Si(t){return t.toString()}var Ei=Ie(function(t){return"number"==typeof t?ai(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ai(Number(t)):ai(0)});function Ai(t,e){return[t,e,Si]}function Pi(n,r){return function(t,e){return[t,e,function(t){return Si(je(t,n,r))}]}}function Ni(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Ie(function(t){return(Ce(t)?t.split(" "):t).map(Ei)});var Ti=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=ye(e)}catch(t){n=ye(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=Re(Fa(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=Mo([1,0],p),f=Mo(p,u);wo(p,u)<=-1&&(f=Math.PI);1<=wo(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:po(t,[c,e])?0:n,ry:po(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&po(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,y,g,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=go((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(y=go((p=e[s-1]).currentPoint,b),g=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-y[0],b[1]-y[1]]):(u.command="SQ",u.startTangent=[b[0]-g[0],b[1]-g[1]]),u.endTangent=[n[0]-g[0],n[1]-g[1]]):"A"===c&&(y=bo(u,0),b=y.x,g=y.y,c=bo(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,g],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=kn.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=Pn.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=In.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=Le(n),d=Le(r),p=Te(n),y=Te(r);if(0!==i.length)for(var g=0;g<i.length;g++){var m=i[g],v=m.currentPoint,b=void 0;v[0]===h?(b=yo(m,e),h-=b.xExtra):v[0]===p&&(b=yo(m,e),p+=b.xExtra),v[1]===d?(b=yo(m,e),d-=b.yExtra):v[1]===y&&(b=yo(m,e),y+=b.yExtra)}return{x:h,y:d,width:p-h,height:y-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},Li=Ie(Ti);function Ci(t,e){t=(Ce(t)?Li:Ti)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function ji(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Me(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Me(e.absolutePath,!1),e.curve=d),[h,d]),h=Oe((t=h.length!==d.length?function t(e,n,r){var i,e=_e(e),n=_e(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Oe(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):te(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=ve(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Fi(t,e){var n,r,i=Ce(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=zn.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=gn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var Ii=null;function Ri(t){return function(e){var n=0;return t.map(function(t){return t===Ii?e[n++]:t})}}function Bi(t){return t}var Di={matrix:["NNNNNN",[Ii,Ii,0,0,Ii,Ii,0,0,0,0,1,0,Ii,Ii,0,1],Bi],matrix3d:["NNNNNNNNNNNNNNNN",Bi],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Ri([Ii,Ii,new Hr(1)]),Bi],scalex:["N",Ri([Ii,new Hr(1),new Hr(1)]),Ri([Ii,new Hr(1)])],scaley:["N",Ri([new Hr(1),Ii,new Hr(1)]),Ri([new Hr(1),Ii])],scalez:["N",Ri([new Hr(1),new Hr(1),Ii])],scale3d:["NNN",Bi],skew:["Aa",null,Bi],skewx:["A",null,Ri([Ii,Jr])],skewy:["A",null,Ri([Jr,Ii])],translate:["Tt",Ri([Ii,Ii,Kr]),Bi],translatex:["T",Ri([Ii,Kr,Kr]),Ri([Ii,Kr])],translatey:["T",Ri([Kr,Ii,Kr]),Ri([Kr,Ii])],translatez:["L",Ri([Kr,Kr,Ii])],translate3d:["TTL",Bi]};function zi(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=Di[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Jr:bi(t)},N:Ei,T:vi,L:mi}[h.toUpperCase()](f):{a:Jr,n:c[0],t:Kr}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Wi(t){switch(t.t){case"rotatex":return i=Fa(xi(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Fa(xi(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Fa(xi(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Fa(xi(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=Fa(xi(t.d[0])),a=Fa(xi(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Fa(xi(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Fa(xi(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Mi(t.d[0],0,null)||0,n=Mi(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Mi(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Mi(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Mi(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Mi(t.d[0],0,null)||0,n=Mi(t.d[1],0,null)||0,r=Mi(t.d[2],0,null)||0,1];case"perspective":a=Mi(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function Hi(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Vi(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Da,t))return;if(H(za,Da),za[3]=0,za[7]=0,za[11]=0,za[15]=1,Math.abs(U(za))<1e-8)return;var t=Da[3],o=Da[7],s=Da[11],l=Da[12],c=Da[13],u=Da[14],f=Da[15];if(0!==t||0!==o||0!==s){if(Wa[0]=t,Wa[1]=o,Wa[2]=s,Wa[3]=f,!Y(za,za))return;q(za,za),It(i,Wa,za)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,Da),n[0]=wt(d[0]),Et(d[0],d[0]),r[0]=At(d[0],d[1]),Va(d[1],d[1],d[0],1,-r[0]),n[1]=wt(d[1]),Et(d[1],d[1]),r[0]/=n[1],r[1]=At(d[0],d[2]),Va(d[2],d[2],d[0],1,-r[1]),r[2]=At(d[1],d[2]),Va(d[2],d[2],d[1],1,-r[2]),n[2]=wt(d[2]),Et(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Pt(Ha,d[1],d[2]),At(d[0],Ha)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Wi).reduce(Hi),e,n,r,i,a),[[e,n,r,a,i]]}var Gi=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=qi(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=qi(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=qi(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=qi(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function qi(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Yi(t){return t.toFixed(6).replace(".000000","")}function Ui(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Vi(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Vi(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=je(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return Gi(t[0],t[1],t[2],e,t[4]).map(Yi).join(",")}])}function Xi(t){return t.replace(/[xy]/,"")}function $i(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var Zi=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function Ki(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ai(n):ai(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=Ui(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=Di[u],y=Di[f],g=void 0;if(Zi(u,f)){var m=Ui([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)g=u;else if(p[2]&&y[2]&&Xi(u)===Xi(f))g=Xi(u),h=p[2](h),d=y[2](d);else{if(!p[1]||!y[1]||$i(u)!==$i(f)){m=Ui(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}g=$i(u),h=p[1](h),d=y[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var M=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Wr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=Er(t.unit)):(Hr.isLength(t.unit)||Hr.isLength(e.unit))&&(o=Mi(t,i,n),s=Mi(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=M[0],b[w]=M[1],x.push(M[2])}a.push(v),o.push(b),s.push([g,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var Ji=Ie(function(t){var e;return Ce(t)?"text-anchor"===t?[ai(0,"px"),ai(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[vi(Qi(e[0])),vi(Qi(e[1]))]):[ai(t[0]||0,"px"),ai(t[1]||0,"px")]});function Qi(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=bi,this.mixer=Ai}return t.prototype.calculator=function(t,e,n,r){return xi(n)},t}(),n=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Cr&&(n=null),w.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&w.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=pi,this.mixer=yi}return t.prototype.calculator=function(t,e,n,r){return n instanceof Cr?"none"===n.value?ni:ri:n},t}(),ta=function(){function t(){this.parser=_i}return t.prototype.calculator=function(t,e,n){return n instanceof Cr?[]:n},t}();function ea(t){t=t.parsedStyle.fontSize;return Ae(t)?null:t}function na(){this.parser=Ji}var ra,ia,a=function(){function t(){this.parser=vi,this.mixer=Ai}return t.prototype.calculator=function(t,e,n,r,i){if(!Hr.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=ea(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=ea(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),aa=function(){function t(){this.mixer=Ni}var e=t.prototype;return e.parser=function(t){t=wi(Fe(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),oa=function(){function t(){this.mixer=Ni}var e=t.prototype;return e.parser=function(t){t=wi(Fe(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),sa=function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;Ae(a)||(l=a),Ae(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:Ae(t.parsedStyle.x)||(l=t.parsedStyle.x),Ae(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),Ae(l)&&Ae(c)&&Ae(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(Ae(l)?e:l,Ae(c)?n:c,Ae(u)?r:u))},e}(a),la=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Cr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),o=function(){function t(){this.mixer=Ai,this.parser=Ei}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ca=function(){function t(){this.parser=Ei,this.mixer=Pi(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),c=function(){function t(){this.parser=Ei,this.mixer=Pi(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ua=function(){function t(){this.parser=Ci,this.mixer=ji}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Cr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new or(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===x.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),fa=function(){function t(){this.parser=Fi}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),ha=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=Pi(0,1/0),t}return xr(t,i),t}(a),da=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Cr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),pa=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),ya=function(){function t(){this.tmpMat4=W(),this.parser=zi,this.mixer=Ki}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Cr?[]:n},e.postProcessor=function(t){!function(t,l){var c=this;{var u,f;t&&t.length&&(f=u=0,l?(u=l.parsedStyle.defX||0,f=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(u,f)):l=new Na({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[Kr,Kr],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[Kr],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[Kr],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[Kr],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[Kr,Kr,Kr],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Jr],l.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[Jr],l.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[Jr],l.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[Jr],l.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Fa(o[0]),Fa(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Fa(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Fa(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(V(c.tmpMat4,e,n,0,0,r,i,0,0,0,0,1,0,a+u,o+f,0,1))):"matrix3d"===s&&(V.apply(xt,[c.tmpMat4].concat(t.map(function(t){return t.value}))),c.tmpMat4[12]+=u,c.tmpMat4[13]+=f,l.setLocalTransform(c.tmpMat4)))}))}l.getLocalTransform()}(t.parsedStyle.transform,t)},t}(),ga=function(){function t(){this.parser=Ei}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),ma=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new ar,this.page=new ar,this.canvas=new ar,this.viewport=new ar,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(gr)},vr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),va=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Mr(n),e),n}return xr(t,r),t}(ma),ba=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}xr(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(gr)},t.lookupNamespaceURI=function(t){throw new Error(gr)},t.lookupPrefix=function(t){throw new Error(gr)},t.normalize=function(){throw new Error(gr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},vr(d,[{key:"textContent",get:function(){var t="";this.nodeName===x.TEXT&&(t+=this.style.text);for(var e=Or(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===x.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===x.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new Yn}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=Be(n)&&n||Ee(n)&&n.capture,n=Ee(n)&&n.once,s=ur(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=ur(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=Be(n)&&n||Ee(n)&&n.capture,i=ur(e)?void 0:e;return e=ur(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new va(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof ma))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),xa=(ba.DOCUMENT_POSITION_DISCONNECTED=1,ba.DOCUMENT_POSITION_PRECEDING=2,ba.DOCUMENT_POSITION_FOLLOWING=4,ba.DOCUMENT_POSITION_CONTAINS=8,ba.DOCUMENT_POSITION_CONTAINED_BY=16,ba.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,ra=ra||{},ra[ra.Standard=0]="Standard",(_a=ia=ia||{}).DESTROY="destroy",_a.ATTR_MODIFIED="DOMAttrModified",_a.INSERTED="DOMNodeInserted",_a.REMOVED="removed",_a.MOUNTED="DOMNodeInsertedIntoDocument",_a.UNMOUNTED="DOMNodeRemovedFromDocument",_a.BOUNDS_CHANGED="bounds-changed",_a.RENDER_ORDER_CHANGED="render-order-changed",_a.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return xr(t,c),t}(ma)),wa=(xa.ADDITION=2,xa.MODIFICATION=1,xa.REMOVAL=3,0),Ma=new xa(ia.INSERTED,null,"","","",0,"",""),ka=new xa(ia.REMOVED,null,"","","",0,"",""),Oa=new va(ia.DESTROY),_a=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=wa++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:ra.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:b(0,0,0),localRotation:Ht(0,0,0,1),localScale:b(1,1,1),localTransform:W(),localSkew:Yt(0,0),position:b(0,0,0),rotation:Ht(0,0,0,1),scaling:b(1,1,1),worldTransform:W(),origin:b(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:ti,opacity:ti,fillOpacity:ti,strokeOpacity:ti,fill:ti,stroke:ti,transform:ti,transformOrigin:ti,visibility:ti,pointerEvents:ti,lineWidth:ti,lineCap:ti,lineJoin:ti,increasedLineWidthForHitTesting:ti,fontSize:ti,fontFamily:ti,fontStyle:ti,fontWeight:ti,fontVariant:ti,textAlign:ti,textBaseline:ti,textTransform:ti,zIndex:ti,filter:ti,shadowType:ti},t.parsedStyle={},t.attributes={},t}xr(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(gr)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return w.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Ma.relatedNode=this,t.dispatchEvent(Ma),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return ka.relatedNode=this,t.dispatchEvent(ka),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),w.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return w.sceneGraphService.matches(t,this)},e.getElementById=function(t){return w.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return w.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return w.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return w.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return w.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return w.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(w.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Oa),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return w.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return w.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return w.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return w.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return w.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e=this.attributes[t];return void 0===e&&(t=hr(t),e=this.attributes[t],Ae(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(gr)},e.getAttributeNode=function(t){throw new Error(gr)},e.getAttributeNodeNS=function(t,e){throw new Error(gr)},e.hasAttributeNS=function(t,e){throw new Error(gr)},e.removeAttributeNS=function(t,e){throw new Error(gr)},e.removeAttributeNode=function(t){throw new Error(gr)},e.setAttributeNS=function(t,e,n){throw new Error(gr)},e.setAttributeNode=function(t){throw new Error(gr)},e.setAttributeNodeNS=function(t){throw new Error(gr)},e.toggleAttribute=function(t,e){throw new Error(gr)},vr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(ba),Sa=new xa(ia.ATTR_MODIFIED,null,null,null,null,xa.MODIFICATION,null,null),Ea={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Aa={anchor:[0,0],fill:ni,stroke:ni,transform:[],zIndex:0,filter:[],shadowType:"outer"},Pa=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],Na=function(i){function o(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||x.GROUP,r.config.style=br({},r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,Aa,r.config.initialParsedStyle),Object.assign(r.attributes,Ea),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),w.displayObjectPool.add(r.entity,Mr(r)),r}xr(o,i);var t=o.prototype;return t.destroy=function(){i.prototype.destroy.call(this),w.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=br({},this.attributes);for(n in r){var i=r[n];i instanceof o&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a},t.initAttributes=function(t){var e=this.renderable;w.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:Pa}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=hr(t);De(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},t.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(w.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Sa.relatedNode=this,Sa.prevValue=i,Sa.newValue=e,Sa.attrName=t,Sa.prevParsedValue=a,Sa.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Sa):(Sa.target=this).ownerDocument.defaultView.dispatchEvent(Sa,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},t.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new or(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return w.sceneGraphService.setOrigin(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return w.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return w.sceneGraphService.setPosition(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return w.sceneGraphService.setLocalPosition(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return w.sceneGraphService.translate(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return w.sceneGraphService.translateLocal(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return w.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return w.sceneGraphService.getLocalPosition(this)},t.scale=function(t,e,n){return this.scaleLocal(t,e,n)},t.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ja(t,e=e||t,n=n||t)),w.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ja(t,e=e||t,n=n||t)),w.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return w.sceneGraphService.getLocalScale(this)},t.getScale=function(){return w.sceneGraphService.getScale(this)},t.getEulerAngles=function(){return Ia(Ra(m(),w.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return Ia(Ra(m(),w.sceneGraphService.getLocalRotation(this))[2])},t.setEulerAngles=function(t){return w.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return w.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return Ae(e)&&Ae(n)?w.sceneGraphService.rotateLocal(this,0,0,t):w.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return Ae(e)&&Ae(n)?w.sceneGraphService.rotate(this,0,0,t):w.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return w.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return w.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return w.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return w.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return w.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return w.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return w.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return w.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return w.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){w.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},t.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},t.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},t.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},t.getConfig=function(){return this.config},t.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?Ee(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=ut(m(),t),n=e[0],e=e[1],r=ft(m(),t),i=r[0],r=r[1],t=ht(Rt(),t),t=Ra(m(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new O(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=Ba(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},t.setLocalMatrix=function(t){var t=Ba(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.getCount=function(){return this.childElementCount},t.getParent=function(){return this.parentElement},t.getChildren=function(){return this.children},t.getFirst=function(){return this.firstElementChild},t.getLast=function(){return this.lastElementChild},t.getChildByIndex=function(t){return this.children[t]||null},t.add=function(t,e){return this.appendChild(t,e)},t.setClip=function(t){this.style.clipPath=t},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},t.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.setZIndex=function(t){return this.style.zIndex=t,this},vr(o,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),o}(_a),Ta={},La=[],ba=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Ta[t]},e.getAll=function(){return Object.keys(Ta).map(function(t){return Ta[t]})},e.add=function(t,e){(Ta[t]=e).nodeName===x.HTML&&La.push(e)},e.remove=function(t){var e=Ta[t];e&&(delete Ta[t],e.nodeName===x.HTML)&&(t=La.indexOf(e),La.splice(t,1))},e.getHTMLs=function(){return La},t}();function Ca(t){return void 0===t?0:360<t||t<-360?t%360:t}function ja(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),Fe(t)?b(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new O(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):b(t[0],t[1]||e,t[2]||n)}function Fa(t){return t*(Math.PI/180)}function Ia(t){return t*(180/Math.PI)}function Ra(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=ft(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Ba(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=Ia(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Da=W(),za=W(),Wa=Ft(),d=[m(),m(),m()],Ha=m();function Va(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}Ga={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},qa="";var Ga,qa,Ya=function(t){return qa=t,Xa()};function Ua(t){throw new Error(qa+": "+t)}function Xa(){var t=io($a);return 0<qa.length&&Ua("Invalid input not EOF"),t}function $a(){return Za("linear-gradient",Ga.linearGradient,Ja)||Za("repeating-linear-gradient",Ga.repeatingLinearGradient,Ja)||Za("radial-gradient",Ga.radialGradient,Qa)||Za("repeating-radial-gradient",Ga.repeatingRadialGradient,Qa)||Za("conic-gradient",Ga.conicGradient,Qa)}function Za(n,t,r){return Ka(t,function(t){var e=r();return e&&!fo(Ga.comma)&&Ua("Missing comma before color stops"),{type:n,orientation:e,colorStops:io(ao)}})}function Ka(t,e){t=fo(t);if(t)return fo(Ga.startCall)||Ua("Missing ("),e=e(t),fo(Ga.endCall)||Ua("Missing )"),e}function Ja(){return uo("directional",Ga.sideOrCorner,1)||uo("angular",Ga.angleValue,1)}function Qa(){var t,e,n=to();return n&&((t=[]).push(n),e=qa,fo(Ga.comma))&&((n=to())?t.push(n):qa=e),t}function to(){var t,e=function(){var t=uo("shape",/^(circle)/i,0);t&&(t.style=co()||eo());return t}()||function(){var t=uo("shape",/^(ellipse)/i,0);t&&(t.style=so()||eo());return t}();return e?e.at=no():(t=eo())?(e=t,(t=no())&&(e.at=t)):(t=ro())&&(e={type:"default-radial",at:t}),e}function eo(){return uo("extent-keyword",Ga.extentKeywords,1)}function no(){var t;if(uo("position",/^at/,0))return(t=ro())||Ua("Missing positioning value"),t}function ro(){var t={x:so(),y:so()};if(t.x||t.y)return{type:"position",value:t}}function io(t){var e=t(),n=[];if(e)for(n.push(e);fo(Ga.comma);)(e=t())?n.push(e):Ua("One extra comma");return n}function ao(){var t=uo("hex",Ga.hexColor,1)||Ka(Ga.rgbaColor,function(){return{type:"rgba",value:io(oo)}})||Ka(Ga.rgbColor,function(){return{type:"rgb",value:io(oo)}})||uo("literal",Ga.literalColor,0);return t||Ua("Expected color definition"),t.length=so(),t}function oo(){return fo(Ga.number)[1]}function so(){return uo("%",Ga.percentageValue,1)||lo()||co()}function lo(){return uo("position-keyword",Ga.positionKeywords,1)}function co(){return uo("px",Ga.pixelValue,1)||uo("em",Ga.emValue,1)}function uo(t,e,n){e=fo(e);if(e)return{type:t,value:e[n]}}function fo(t){var e=/^[\n\r\t\s]+/.exec(qa),e=(e&&ho(e[0].length),t.exec(qa));return e&&ho(e[0].length),e}function ho(t){qa=qa.substring(t)}function po(t,e){return t[0]===e[0]&&t[1]===e[1]}function yo(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function go(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function mo(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=Fa(r=Re(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=vo({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=vo(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var vo=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function bo(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=mo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=mo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function xo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function wo(t,e){return xo(t)*xo(e)?(t[0]*e[0]+t[1]*e[1])/(xo(t)*xo(e)):1}function Mo(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(wo(t,e))}_a=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Or(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(_a)),new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(_a)),new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(_a));new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(_a));var ko=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Oo=/([\"\'])[^\'\"]+\1/;var _o,So,Eo,Ao=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:u.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:u.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:u.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:u.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:u.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:u.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:u.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:u.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:u.FILTER},{n:"clipPath",syntax:u.DEFINED_PATH},{n:"textPath",syntax:u.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:u.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:u.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:u.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:u.COORDINATE},{n:"cy",int:!0,d:"0",syntax:u.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:u.COORDINATE},{n:"y",int:!0,d:"0",syntax:u.COORDINATE},{n:"z",int:!0,d:"0",syntax:u.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:u.COORDINATE},{n:"y1",int:!0,l:!0,syntax:u.COORDINATE},{n:"z1",int:!0,l:!0,syntax:u.COORDINATE},{n:"x2",int:!0,l:!0,syntax:u.COORDINATE},{n:"y2",int:!0,l:!0,syntax:u.COORDINATE},{n:"z2",int:!0,l:!0,syntax:u.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:u.PATH,p:50},{n:"points",l:!0,syntax:u.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:u.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:u.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:u.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:u.MARKER},{n:"markerEnd",syntax:u.MARKER},{n:"markerMid",syntax:u.MARKER},{n:"markerStartOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"}],Po={},No=new WeakMap,To={},Lo=Ie(function(t){return t.sort(function(t,e){return To[t]-To[e]})}),Co=m(),jo=m(),Fo=m(),_a=function(){function t(){var e=this;Ao.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){To[t]=(Po[t]=e).p||0})},e.unregisterMetadata=function(t){delete Po[t]},e.getPropertySyntax=function(t){return w.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,o=Object.keys(r);o.forEach(function(t){var e=hr(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=Po[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=Lo(null!=t&&t.length?Array.from(new Set(o.concat(t))):o)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),o.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&o.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=Po[t],i=e;return"unset"===(e=""!==e&&!Ae(e)?e:"unset")||"initial"===e||"inherit"===e?i=Yr(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Yr(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=Po[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Cr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))Ae(r)||(e=this.parseProperty(t,ur(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),Ae(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Cr?e.value:e}return a},e.postProcessProperty=function(t,e){var t=Po[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=No.get(t);n||(No.set(t,[]),n=No.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=No.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=No.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),No.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,y,g,m,v=w.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new nr),s.renderBounds||(s.renderBounds=new nr),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=kt(Co,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,g=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===x.TEXT&&delete e.anchor,d=kt(jo,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),f=t.nodeName===x.POLYLINE||t.nodeName===x.POLYGON||t.nodeName===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&Ot(p,p,kt(Fo,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),y&&g&&"inner"!==g&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,y=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Ot(s.renderBounds.halfExtents,s.renderBounds.halfExtents,b(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,g=(n?-1:1)*Mi(a[0],0,t),m=(r?-1:1)*Mi(a[1],1,t),g-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),w.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=Po[t];return!!t&&t.inh},t}();(Ro=_o=_o||{})[Ro.ORBITING=0]="ORBITING",Ro[Ro.EXPLORING=1]="EXPLORING",Ro[Ro.TRACKING=2]="TRACKING",(Ro=So=So||{})[Ro.DEFAULT=0]="DEFAULT",Ro[Ro.ROTATIONAL=1]="ROTATIONAL",Ro[Ro.TRANSLATIONAL=2]="TRANSLATIONAL",Ro[Ro.CINEMATIC=3]="CINEMATIC",(Ro=Eo=Eo||{})[Ro.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Ro[Ro.PERSPECTIVE=1]="PERSPECTIVE";var Io="updated",Ro=function(){function t(){this.canvas=void 0,this.eventEmitter=new Yn,this.matrix=W(),this.right=b(1,0,0),this.up=b(0,1,0),this.forward=b(0,0,1),this.position=b(0,0,1),this.focalPoint=b(0,0,0),this.distanceVector=b(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=W(),this.projectionMatrixInverse=W(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=_o.EXPLORING,this.trackingMode=So.DEFAULT,this.projectionMode=Eo.PERSPECTIVE,this.frustum=new ir,this.orthoMatrix=W()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Eo.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===_o.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===_o.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==_o.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return Y(W(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=lt(W(),[t,e,0]);this.jitteredProjectionMatrix=X(W(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Eo.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Eo.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=b(t.x-r,t.y-n,0),e=At(i,this.right)/wt(this.right),r=At(i,this.up)/wt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Eo.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(Fa(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,Z(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Eo.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),mt(this.projectionMatrix,s,n,r,e,i,a),Z(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ja(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=b(0,1,0);return this.focalPoint=ja(t,e,n),this.trackingMode===So.CINEMATIC&&(t=(r=_t(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=wt(r),e=Ia(Math.asin(e/r)),r=90+Ia(Math.atan2(n,t)),st(n=W(),n,Fa(r)),ot(n,n,Fa(e)),i=Nt(m(),[0,1,0],n)),Y(this.matrix,vt(W(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=Ca(t),this.computeMatrix(),this._getAxes(),this.type===_o.ORBITING||this.type===_o.EXPLORING?this._getPosition():this.type===_o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=Ca(t),this.computeMatrix(),this._getAxes(),this.type===_o.ORBITING||this.type===_o.EXPLORING?this._getPosition():this.type===_o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=Ca(t),this.computeMatrix(),this._getAxes(),this.type===_o.ORBITING||this.type===_o.EXPLORING?this._getPosition():this.type===_o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Bt(Rt(),[0,0,1],Fa(this.roll)),e=(G(this.matrix),Bt(Rt(),[1,0,0],Fa((this.rotateWorld&&this.type!==_o.TRACKING||this.type===_o.TRACKING?1:-1)*this.elevation))),n=Bt(Rt(),[0,1,0],Fa((this.rotateWorld&&this.type!==_o.TRACKING||this.type===_o.TRACKING?1:-1)*this.azimuth)),n=Dt(Rt(),n,e),n=Dt(Rt(),n,t),e=pt(W(),n);this.type===_o.ORBITING||this.type===_o.EXPLORING?($(this.matrix,this.matrix,this.focalPoint),X(this.matrix,this.matrix,e),$(this.matrix,this.matrix,[0,0,this.distance])):this.type===_o.TRACKING&&($(this.matrix,this.matrix,this.position),X(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ja(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Mt(this.right,ja(It(Ft(),[1,0,0,0],this.matrix))),Mt(this.up,ja(It(Ft(),[0,1,0,0],this.matrix))),Mt(this.forward,ja(It(Ft(),[0,0,1,0],this.matrix))),Et(this.right,this.right),Et(this.up,this.up),Et(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=wt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===_o.TRACKING||this.rotateWorld?(this.elevation=Ia(Math.asin(e/r)),this.azimuth=Ia(Math.atan2(-t,-n))):(this.elevation=-Ia(Math.asin(e/r)),this.azimuth=-Ia(Math.atan2(-t,-n)))},e._getPosition=function(){Mt(this.position,ja(It(Ft(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Tt(this.distanceVector,[0,0,-this.distance],(t=j(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Ot(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=_t(m(),this.focalPoint,this.position),this.distance=wt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Eo.ORTHOGRAPHIC&&(t=this.position,e=Bt(Rt(),[0,0,1],-this.roll*Math.PI/180),dt(this.orthoMatrix,e,b((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),b(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=X(W(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Io))},e.rotate=function(t,e,n){throw new Error(gr)},e.pan=function(t,e){throw new Error(gr)},e.dolly=function(t){throw new Error(gr)},e.createLandmark=function(t,e){throw new Error(gr)},e.gotoLandmark=function(t,e){throw new Error(gr)},t}(),Bo=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Do=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),zo=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),Wo=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Ho=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),Vo=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!Ce(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Go=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!Ae(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),qo=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),Yo=(0,/\[\s*(.*)=(.*)\s*\]/),Uo=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(Yo),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!Ae(t))&&t.toString?t.toString():""},t}(),Xo=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,y=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new va(ia.BOUNDS_CHANGED),this.rotate=(o=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Wt(r=Rt(),e[0],e[1],e[2]),i=y.getRotation(t),a=y.getRotation(t.parentNode),Vt(o,a),zt(o,o),Dt(r,o,r),Dt(n.localRotation,r,i),qt(n.localRotation,n.localRotation),y.dirtifyLocal(t,n)):y.rotateLocal(t,e)}),this.rotateLocal=(i=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Wt(i,e[0],e[1],e[2]),Gt(n.localRotation,n.localRotation,i),y.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Wt(n.localRotation,e[0],e[1],e[2]),r=y.getRotation(t.parentNode),Vt(a,zt(Rt(),r)),Gt(n.localRotation,n.localRotation,a),y.dirtifyLocal(t,n)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Lt(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Ot(n.localPosition,n.localPosition,e),y.dirtifyLocal(t,n))},this.setPosition=(r=W(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Lt(y.getPosition(t),s)||(Mt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,H(r,e.worldTransform),Y(r,r),Nt(n.localPosition,s,r)):Mt(n.localPosition,s),y.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Lt(n.localPosition,l)||(Mt(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),f=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Lt(e="number"==typeof e?kt(u,e,n,r):e,c)||(Ot(f,y.getPosition(t),e),y.setPosition(t,f))}),this.setRotation=function(){var o=Rt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=Ht(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),Vt(o,n),zt(o,o),Dt(a.localRotation,o,e),qt(a.localRotation,a.localRotation),y.dirtifyLocal(t,a)):y.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=W(),h=m(),d=Ht(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(dt(t.localTransform,t.localRotation,t.localPosition,b(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=G(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),X(t.localTransform,t.localTransform,e)),e=dt(n,d,h,t.localScale,t.origin),X(t.localTransform,t.localTransform,e)):dt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Ae(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Lt(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Wt(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=b(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=b(e[0],e[1],e[2]||n.localScale[2]);Lt(e,n.localScale)||(Mt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=Ht(e,n,r,i));n=t.transformable;Vt(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=Yt(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new xa(ia.ATTR_MODIFIED,t,n,n,e,xa.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return ut(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return ht(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return ft(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=ut(m(),e),r=ht(Rt(),e),e=ft(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return nr.isEmpty(e)?null:((n=n||new nr).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new nr},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new nr).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new nr)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=W(),r=(t.parentNode.transformable&&(n=Y(W(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!nr.isEmpty(r))return(e=new nr).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(nr.isEmpty(i)||(r=new nr).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new or(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new or((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?X(e.worldTransform,n.worldTransform,e.localTransform):H(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),$o={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Zo=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Ko=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Jo=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Qo=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Jo.exec(e)&&!Ko.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,$o.MetricsString+$o.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText($o.BaselineSymbol).width),s=$o.HeightMultiplier*o,o=o*$o.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=Fe(e)&&e+"px"||"16px",a=Ce(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!Oo.test(s)&&ko.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(y.length),m=0;if(!u){for(var v=0;v<y.length;v++){var b=p.measureText(y[v]).width+(y[v].length-1)*c;g[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(y.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:y,lineWidths:g,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:g.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new or(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength(),u.getPoint(0);for(var M=0;M<y.length;M++)p.measureText(y[M]).width,y[M].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},y=function(t){return r.getFromCache(t,a,p,l)},g=Array.from(u).reduce(function(t,e){return t+y(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],M=y(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+M){if(s<=h+1){if(e.isOverflowing=!0,0<g&&g<=c){for(var k=0,O=0,_=0;_<f[h].length;_++){var S=y(f[h][_]);if(c<k+S+g){O=_;break}k+=S}f[h]=(f[h]||"").slice(0,O)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=y(x||""))}d+=M,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=$o.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=$o.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!Zo.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!Zo.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),w={},Bo=(Vo=new Vo,Ho=new Ho,(hc={})[x.CIRCLE]=new Bo,hc[x.ELLIPSE]=new Do,hc[x.RECT]=Vo,hc[x.IMAGE]=Vo,hc[x.GROUP]=Vo,hc[x.LINE]=new zo,hc[x.TEXT]=new Go(w),hc[x.POLYLINE]=Ho,hc[x.POLYGON]=Ho,hc[x.PATH]=new Wo,hc[x.HTML]=null,hc[x.MESH]=null,hc),Go=(Do=new r,Vo=new a,(zo={})[u.PERCENTAGE]=null,zo[u.NUMBER]=new o,zo[u.ANGLE]=new e,zo[u.DEFINED_PATH]=new n,zo[u.PAINT]=Do,zo[u.COLOR]=Do,zo[u.FILTER]=new ta,zo[u.LENGTH]=Vo,zo[u.LENGTH_PERCENTAGE]=Vo,zo[u.LENGTH_PERCENTAGE_12]=new aa,zo[u.LENGTH_PERCENTAGE_14]=new oa,zo[u.COORDINATE]=new sa,zo[u.OFFSET_DISTANCE]=new ca,zo[u.OPACITY_VALUE]=new c,zo[u.PATH]=new ua,zo[u.LIST_OF_POINTS]=new fa,zo[u.SHADOW_BLUR]=new ha,zo[u.TEXT]=new da,zo[u.TEXT_TRANSFORM]=new pa,zo[u.TRANSFORM]=new ya,zo[u.TRANSFORM_ORIGIN]=new na,zo[u.Z_INDEX]=new ga,zo[u.MARKER]=new la,zo),Ho=(w.CameraContribution=Ro,w.AnimationTimeline=null,w.EasingFunction=null,w.offscreenCanvas=new qo,w.displayObjectPool=new ba,w.sceneGraphSelector=new Uo,w.sceneGraphService=new Xo(w),w.textService=new Qo(w),w.geometryUpdaterFactory=Bo,w.CSSPropertySyntaxFactory=Go,w.styleValueRegistry=new _a,w.layoutRegistry=null,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function ts(){ts=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(M([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(g),a(g,i,"Generator"),a(g,r,function(){return this}),a(g,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function es(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function ns(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){es(r,e,n,i,a,"next",t)}function a(t){es(r,e,n,i,a,"throw",t)}i(void 0)})}}function rs(){return(rs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function is(t,e){return(is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(Wo=Ab=Ab||{}).READY="ready",Wo.BEFORE_RENDER="beforerender",Wo.AFTER_RENDER="afterrender",Wo.BEFORE_DESTROY="beforedestroy",Wo.AFTER_DESTROY="afterdestroy",Wo.RESIZE="resize",Wo.DIRTY_RECTANGLE="dirtyrectangle",new va(ia.MOUNTED),new va(ia.UNMOUNTED),new va(Ab.BEFORE_RENDER),new va(Ab.AFTER_RENDER);var as=function(){function a(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return a.prototype.apply=function(t){function e(t){var e,a,o,s,l,c,u=t.target,f=u===d,h=f&&i?d:u.closest&&u.closest("[draggable=true]");h&&(e=function(){var e=ns(ts().mark(function t(e){var n,r,i;return ts().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=ve([e.clientX,e.clientY],s),n<=m||r<=g)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,y=t.isDocumentDroppable,g=t.dragstartDistanceThreshold,m=t.dragstartTimeThreshold;n.hooks.init.tapPromise(a.tag,ns(ts().mark(function t(){return ts().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(a.tag,function(){r.removeEventListener("pointerdown",e)})},a}(),os=(as.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),is(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new as(rs({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(Ho)),ss=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},ls={}.toString,cs=function(t,e){return ls.call(t)==="[object "+e+"]"},us=function(t){return cs(t,"Function")},fs=function(t){return null==t},hs=function(t){return Array.isArray?Array.isArray(t):cs(t,"Array")},ds=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function ps(t,e){if(t)if(hs(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(ds(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function ys(t){if(hs(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])}function gs(t){if(hs(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])}var ms=function(t){return"object"==typeof t&&null!==t},vs=function(t){if(!ms(t)||!cs(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},bs=function(t){return cs(t,"String")};function xs(t,e,n){return t<e?e:n<t?n:t}var ws=function(t){return cs(t,"Number")},Ms=1e-5;function ks(t,e,n){return void 0===n&&(n=Ms),Math.abs(t-e)<n}function Os(t){return(t=As(t)).charAt(0).toLowerCase()+t.substring(1)}var _s=function(t,e){if(hs(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=us(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}},Ss=function(t,e){if(hs(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=us(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},Es=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return ps(n,function(t,e){us(n)&&"prototype"===e||r.push(t)}),r},As=function(t){return fs(t)?"":t.toString()};function Ps(t){return null===t}function Ns(t){return void 0===t}function Ts(t){return t instanceof Element||t instanceof HTMLDocument}var Ls=function(t){t=As(t);return t.charAt(0).toUpperCase()+t.substring(1)},Cs={}.toString,js=function(t){return Cs.call(t).replace(/^\[object /,"").replace(/]$/,"")},Fs=Object.prototype,Is=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Fs)};function Rs(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function Bs(t,e,n,r){return e&&Rs(t,e),n&&Rs(t,n),r&&Rs(t,r),t}var Ds=function(t){if("object"!=typeof t||null===t)return t;if(hs(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=Ds(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=Ds(t[i]):e[i]=t[i];return e};function zs(a,o){var s;if(us(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var Ws=5;var I=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Ws,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&vs(o)?(vs(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):hs(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Hs=function(t,e){if(!ss(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},Vs=Object.prototype.hasOwnProperty;function Gs(t,e,n){for(var r=0,i=bs(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function qs(e,t){var n;return null!==e&&vs(e)?(n={},ps(t,function(t){Ks.call(e,t)&&(n[t]=e[t])}),n):{}}function Ys(t,r){return n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={},hs(t=t)||vs(t)?(i=e,ps(t,function(t,e){i=n(i,t,e)}),i):t;var n,e,i}function Us(){}function Xs(t){return t}var $s,Zs=function(t,e){if(t===e)return!0;if(t&&e&&!bs(t)&&!bs(e)){if(ss(t)||ss(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Zs(t[r],e[r]));r++);return n}if(ms(t)||ms(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=Zs(t[i[r]],e[i[r]]));r++);return n}}return!1},Ks=Object.prototype.hasOwnProperty,Js=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Qs(t){return fs(t)?0:(ss(t)?t:Object.keys(t)).length}var tl=zs(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return($s=$s||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),$s.measureText(bs(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Es(e=void 0===e?{}:e)).join("")});const el=()=>[["cartesian"]],nl=(el.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),rl=(nl.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),il=(rl.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),al=(il.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),ol=(al.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),sl=(ol.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),ll=(sl.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...il(),...nl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),cl=(ll.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...al(),...nl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),ul=(cl.props={},()=>[["parallel",0,1,0,1]]),fl=(ul.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),hl=(fl.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),dl=(hl.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),pl=(dl.props={},({value:e})=>t=>t.map(()=>e)),yl=(pl.props={},({value:e})=>t=>t.map(e)),gl=(yl.props={},({value:e})=>t=>t.map(t=>t[e])),ml=(gl.props={},({value:t})=>()=>t);function vl(t,e){return t.parent===e.parent?1:2}function bl(t,e){return t+e.x}function xl(t,e){return Math.max(t,e.y)}function wl(){var s=vl,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(bl,0)/e.length,t.y=1+n.reduce(xl,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Ml(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function kl(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=_l)):void 0===e&&(e=Ol);for(var n,r,i,a,o,t=new Al(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new Al(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(El)}function Ol(t){return t.children}function _l(t){return Array.isArray(t)?t[1]:null}function Sl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function El(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function Al(t){this.data=t,this.depth=this.height=0,this.parent=null}function Pl(t){return null==t?null:Nl(t)}function Nl(t){if("function"!=typeof t)throw new Error;return t}function Tl(){return 0}function Ll(t){return function(){return t}}ml.props={},Al.prototype=kl.prototype={constructor:Al,count:function(){return this.eachAfter(Ml)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(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},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return kl(this).eachBefore(Sl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Cl=4294967296;function jl(t,e){for(var n,r,i=0,a=(t=function(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}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Il(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Bl(t[0],t[1]);case 3:return Dl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Rl(e,t))return[e];for(n=0;n<t.length;++n)if(Fl(e,t[n])&&Rl(Bl(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(Fl(Bl(t[n],t[r]),e)&&Fl(Bl(t[n],e),t[r])&&Fl(Bl(t[r],e),t[n])&&Rl(Dl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Fl(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Il(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Rl(t,e){for(var n=0;n<e.length;++n)if(!Il(t,e[n]))return;return 1}function Bl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Dl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,y=r*r+i*i-t*t,a=y-a*a-o*o+e*e,o=y-s*s-l*l+n*n,e=u*f-c*h,y=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+y*s+l*n),a=y*y+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+y+s*o,y:i+l+n*o,r:o}}function zl(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Wl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Hl(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Vl(t){this._=t,this.next=null,this.previous=null}function Gl(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;zl(r,d,i=t[2]),d=new Vl(d),r=new Vl(r),i=new Vl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){zl(d._,r._,i=t[l]),i=new Vl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Wl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Wl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Hl(d);(i=i.next)!==r;)(s=Hl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=jl(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function ql(t){return Math.sqrt(t.value)}function Yl(){var n=null,r=1,i=1,a=Tl;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Cl)/Cl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Ul(n)).eachAfter(Xl(a,.5,e)).eachBefore($l(1)):t.eachBefore(Ul(ql)).eachAfter(Xl(Tl,1,e)).eachAfter(Xl(a,t.r/Math.min(r,i),e)).eachBefore($l(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Pl(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Ll(+t),e):a},e}function Ul(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Xl(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Gl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function $l(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Zl(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 Kl(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Jl={depth:-1},Ql={},tc={};function ec(t){return t.id}function nc(t){return t.parentId}function rc(){var g,m=ec,v=nc;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=g){const p=c.map((t,e)=>{t=g(t,e,n),e=(t=""+t).length;return"/"===(t=ac(t,e-1)&&!ac(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),y=p.map(ic);var d=new Set(p).add("");for(const r of y)d.has(r)||(d.add(r),p.push(r),y.push(ic(r)),c.push(tc));u=(t,e)=>p[e],f=(t,e)=>y[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new Al(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?Ql:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===Ql)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=g){for(;i.data===tc&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===tc;--t)o.data=null}if(i.parent=Jl,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(El),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=Pl(t),e):m},e.parentId=function(t){return arguments.length?(v=Pl(t),e):v},e.path=function(t){return arguments.length?(g=Pl(t),e):g},e}function ic(t){let e=t.length;if(e<2)return"";for(;1<--e&&!ac(t,e););return t.slice(0,e)}function ac(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function oc(t,e){return t.parent===e.parent?1:2}function sc(t){var e=t.children;return e?e[0]:t.t}function lc(t){var e=t.children;return e?e[e.length-1]:t.t}function cc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function uc(){var h=oc,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new cc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new cc(r[i],i)),n.parent=e;return(t.parent=new cc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=lc(o),i=sc(i),o&&i;)s=sc(s),(a=lc(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(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(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!lc(a)&&(a.t=o,a.m+=u-c),i&&!sc(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function fc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}cc.prototype=Object.create(Al.prototype);var hc=(1+Math.sqrt(5))/2;function dc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,y,g,m=[],v=e.children,b=0,x=0,w=v.length,M=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(g=(f=h=u)*u*(y=Math.max(c/l,l/c)/(M*t)),p=Math.max(h/g,g/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),g=u*u*y,p<(d=Math.max(h/g,g/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?Kl(o,n,r,i,M?r+=c*u/M:a):fc(o,n,r,M?n+=l*u/M:i,a),M-=u,b=x}return m}var pc=function e(a){function t(t,e,n,r,i){dc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(hc);function yc(t,e,n,r,i){var a,o,y=t.children,s=y.length,g=new Array(s+1);for(g[0]=o=a=0;a<s;++a)g[a+1]=o+=y[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=y[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=g[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;g[h]<c?u=1+h:f=h}c-g[u-1]<g[u]-c&&e+1<u&&--u;var l=g[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function gc(t,e,n,r,i){(1&t.depth?fc:Kl)(t,e,n,r,i)}var mc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Kl(o,e,n,r,h?n+=(i-n)*o.value/h:i):fc(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=dc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(hc);function vc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function bc(t={}){return[...vc(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function xc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function wc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Mc(t={}){return vc(t)}function kc(){return[{type:"maybeKey"}]}function Oc(t,e){return t.getBandWidth(t.invert(e))}function _c(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),y=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?Oc(l,a[e]):0;var r=p?Oc(c,o[e]):0,e=y&&s?(Oc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function Sc(t){return parseFloat(t)/100}function Ec(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?Sc(e)*o:+e,"string"==typeof t?Sc(t)*s:+t]]})]}function Ac(e){return"function"==typeof e?e:t=>t[e]}function Pc(t,e){return Array.from(t,Ac(e))}function Nc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=Pc(t,e),o=Pc(t,n),s=Pc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Tc(t,e){return t.getBandWidth(t.invert(e))}const Lc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Tc(c,a[t]),n=e*(u?Tc(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Lc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...bc({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0}};const Cc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function jc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Fc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=jc,o=(t,e)=>jc(n(t),e),(t,e)=>n(t)-e):(a=n===jc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Ic,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Ic(){return 0}Cc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...bc({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0}};r=Fc(jc).right;const Rc=Fc(function(t){return null===t?NaN:+t}).center;var Bc=r;function Dc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function zc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Wc(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Hc{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Vc extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Gc(this,t))}has(t){return super.has(Gc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Gc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function qc(t){return t}function Yc(t,...e){return $c(t,qc,qc,e)}function Uc(t,e,...n){return $c(t,qc,e,n)}function Xc(t,e,...n){return $c(t,Array.from,e,n)}function $c(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Vc,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Zc(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Jc(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Jc(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Kc(n))}function Kc(r=jc){if(r===jc)return Jc;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Jc(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Qc=Array.prototype.slice;function tu(t){return()=>t}var eu=Math.sqrt(50),nu=Math.sqrt(10),ru=Math.sqrt(2);function iu(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(eu<=n?10:nu<=n?5:ru<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(eu<=n?10:nu<=n?5:ru<=n?2:1)}function au(t){return Math.ceil(Math.log(Dc(t))/Math.LN2)+1}function ou(){var y=qc,g=Wc,m=au;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=y(t[a],a,t);var o=g(i),s=o[0],l=o[1],c=m(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(g===Wc&&([s,l]=function(t,e,n){let r;for(;;){var i=iu(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(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}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=iu(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=iu(s,l,u)),c[c.length-1]>=l)if(l<=o&&g===Wc){const n=iu(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length;c[0]<=s;)c.shift(),--f;for(;c[f-1]>l;)c.pop(),--f;var h,d,p=new Array(f+1);for(a=0;a<=f;++a)(h=p[a]=[]).x0=0<a?c[a-1]:s,h.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&p[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(d=Math.floor((s-e)*n),p[Math.min(f,d+(c[d]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&p[Bc(c,e,0,f)].push(t[a]);return p}return e.value=function(t){return arguments.length?(y="function"==typeof t?t:tu(t),e):y},e.domain=function(t){return arguments.length?(g="function"==typeof t?t:tu([t[0],t[1]]),e):g},e.thresholds=function(t){return arguments.length?(m="function"==typeof t?t:Array.isArray(t)?tu(Qc.call(t)):tu(t),e):m},e}function su(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function lu(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function cu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function uu(n,r,i=0,a=n.length-1,o){for(o=void 0===o?Jc:Kc(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),uu(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,f=n[r];let t=i,e=a;for(fu(n,i,r),0<o(n[a],f)&&fu(n,i,a);t<e;){for(fu(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?fu(n,i,e):fu(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function fu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function hu(t,e,n){var r;if(n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)return(e=+e)<=0||n<2?cu(t):1<=e?su(t):(n=(n-1)*e,(r=su(uu(t,e=Math.floor(n)).subarray(0,e+1)))+(cu(t.subarray(e+1))-r)*(n-e))}function du(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function pu(t,e){return hu(t,.5,e)}function yu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function gu(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=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function mu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function vu(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function bu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function xu(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function wu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function Mu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function ku(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Ou(t){return wu(t)||bu(t)}const _u=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Yc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Su=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Eu=()=>(t,e,n,r)=>{return(Mu(r)?Su:_u)(t,e,n,r)};Eu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...bc({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...kc(),...wc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const Au=y=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=_c(e,n,y),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Au.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...bc({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...kc(),{type:"maybeSize"},...xc()]};const Pu=s=>{const{cartesian:l=!1}=s;return l?Ec:(t,e,n,r)=>{if(l)return Ec(t,0,n,r);const{x:i,y:a}=n,o=_c(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Pu.props={defaultShape:"text",defaultLabelShape:"label",channels:[...bc({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...kc(),...xc()]};const Nu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Nu.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...bc({shapes:["rect","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...kc(),...xc()]};const Tu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Yc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Tu.props={defaultShape:"area",defaultLabelShape:"label",channels:[...bc({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const Lu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=_c(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Lu.props={defaultShape:"link",defaultLabelShape:"label",channels:[...bc({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...kc(),...xc()]};const Cu=s=>{var t=s["cartesian"];return t?Ec:(t,e,n,r)=>{const{x:i,y:a}=n,o=_c(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Cu.props={defaultShape:"image",defaultLabelShape:"label",channels:[...bc({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...kc(),...xc()]};const ju=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};ju.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...bc({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc(),...xc()]};const Fu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,y=e.x,g=e.series;return[t,Array.from(t,t=>{var e=y.getBandWidth(y.invert(+l[t])),n=e*(g?g.getBandWidth(g.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},Iu=(Fu.props={defaultShape:"box",defaultLabelShape:"label",channels:[...bc({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Iu.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...bc({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...kc(),...xc()]};const Ru=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Ru.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Mc({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...kc()]};const Bu=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Bu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Mc({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...kc()]};const Du=(...t)=>Lu(...t);function zu(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Wu(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=zu("x",r,n,e.x),o=zu("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Du.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...Mc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const Hu=()=>Wu();Hu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Mc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const Vu=()=>Wu({extendY:!0});Vu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Mc({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...kc()]};const Gu=()=>Wu({extendX:!0});function qu(t){return t.target.depth}function Yu(t,e){return t.sourceLinks.length?t.depth:e-1}function Uu(t){return function(){return t}}function Xu(t,e){return Zu(t.source,e.source)||t.index-e.index}function $u(t,e){return Zu(t.target,e.target)||t.index-e.index}function Zu(t,e){return t.y0-e.y0}function Ku(t){return t.value}function Ju(t){return t.index}function Qu(t){return t.nodes}function tf(t){return t.links}function ef(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function nf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function rf(){let x=0,w=0,M=1,k=1,O=24,_=8,S,E=Ju,A=Yu,P,N,T,L=Qu,C=tf,j=6;function e(e){e={nodes:L(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const y=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=ef(y,n)),"object"!=typeof r&&(r=t.target=ef(y,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=T)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(T),r.sort(T)}t=e.nodes;for(const g of t)g.value=void 0===g.fixedValue?Math.max(mu(g.sourceLinks,Ku),mu(g.targetLinks,Ku)):g.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(P){var s,l=Math.max(su(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=P.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(su(t,t=>t.depth)+1,0),n=(M-x-O)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+O,r[i]?r[i].push(a):r[i]=[a]}if(N)for(const o of r)o.sort(N);return r}(e),t=(S=Math.min(_,(k-w)/(su(u,t=>t.length)-1)),u),f=cu(t,t=>(k-w-(t.length-1)*S)/mu(t,Ku));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(k-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===T)for(var{sourceLinks:e,targetLinks:n}of t)e.sort($u),n.sort(Xu)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===N&&o.sort(Zu),o.length&&F(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===N&&o.sort(Zu),o.length&&F(o,i)}}(u,d,p)}return nf(e),e}function F(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,k,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function I({sourceLinks:t,targetLinks:e}){if(void 0===T){for(const{source:{sourceLinks:t}}of e)t.sort($u);for(const{target:{targetLinks:e}}of t)e.sort(Xu)}}return e.update=function(t){return nf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Uu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Uu(t),e):A},e.nodeDepth=function(t){return arguments.length?(P=t,e):P},e.nodeSort=function(t){return arguments.length?(N=t,e):N},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(L="function"==typeof t?t:Uu(t),e):L},e.links=function(t){return arguments.length?(C="function"==typeof t?t:Uu(t),e):C},e.linkSort=function(t){return arguments.length?(T=t,e):T},e.size=function(t){return arguments.length?(x=w=0,M=+t[0],k=+t[1],e):[M-x,k-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],M=+t[1][0],w=+t[0][1],k=+t[1][1],e):[[x,w],[M,k]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}Gu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Mc({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const af={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},of={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?cu(t.sourceLinks,qu)-1:0},justify:Yu};const sf=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},af,f),l=rf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?of[n]||Yu:"function"==c?n:Yu).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function lf(t){return t}function cf(t=""){throw new Error(t)}function uf(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function ff(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return hf(t,e)||{}}function hf(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Os(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function df(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}sf.props={};const pf=g=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=g,{links:t,nodes:l}=Nc(t,e),c=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=sf(Object.assign(Object.assign(Object.assign({},m),{nodeId:Ac(u)}),i))({links:t,nodes:l});const h=J(r,"label"),{text:d=u,spacing:p=5}=h,y=K(h,["text","spacing"]);return[I({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),y),...a],animate:"object"==typeof s?J(s,"node"):s,axis:!1}),I({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s})]}},yf=(pf.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);yf.props={defaultShape:"path",defaultLabelShape:"label",channels:[...bc({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...kc()]};const gf=t=>t?parseInt(t):0;function mf(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||gf(t.width),e=e.clientHeight||gf(t.height),{width:(i={width:i-(gf(t.paddingLeft)+gf(t.paddingRight)),height:e-(gf(t.paddingLeft)+gf(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function vf(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function bf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:yc,treemapDice:Kl,treemapSlice:fc,treemapSliceDice:gc,treemapSquarify:pc,treemapResquarify:mc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?rc().path(p):rc():kl)(t));function y(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(g),l=[0],i&&t.eachBefore(Zl),t}function g(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=pc,i=!1,s=a=1,l=[0],d=h=f=u=c=Tl,y.round=function(t){return arguments.length?(i=!!t,y):i},y.size=function(t){return arguments.length?(a=+t[0],s=+t[1],y):[a,s]},y.tile=function(t){return arguments.length?(o=Nl(t),y):o},y.padding=function(t){return arguments.length?y.paddingInner(t).paddingOuter(t):y.paddingInner()},y.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Ll(+t),y):c},y.paddingOuter=function(t){return arguments.length?y.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):y.paddingTop()},y.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Ll(+t),y):u},y.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Ll(+t),y):f},y.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Ll(+t),y):h},y.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Ll(+t),y):d},y.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const xf=u=>t=>{var{width:t,height:e}=vf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=bf(n,I({},c,o),r),n=J(a,"label");return[I({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},wf=(xf.props={composite:!0},u=>t=>{var{width:t,height:e}=vf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(hs(t)?rc().path(e.path):kl)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Yl().size(e.size).padding(e.padding)(n),n.descendants()})(n,I({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),I({},c.encode,r)),t=J(a,"label");return[I({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function Mf(t,e){return cu(t,t=>e[t])}function kf(t,e){return su(t,t=>e[t])}function Of(t,e){const n=2.5*_f(t,e)-1.5*Ef(t,e);return cu(t,t=>e[t]>=n?e[t]:NaN)}function _f(t,e){return hu(t,.25,t=>e[t])}function Sf(t,e){return hu(t,.5,t=>e[t])}function Ef(t,e){return hu(t,.75,t=>e[t])}function Af(t,e){const n=2.5*Ef(t,e)-1.5*_f(t,e);return su(t,t=>e[t]<=n?e[t]:NaN)}function Pf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Yc(t,t=>a[+t]).values()).flatMap(t=>{const e=Of(t,i),n=Af(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}wf.props={composite:!0};const Nf=o=>()=>{var{data:t,encode:e,style:n={}}=o,{extend:r=!1}=n,n=K(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},a={y1:_f,y2:Sf,y3:Ef};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Mf},a),{y4:kf})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=J(n,"box"),n=J(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Of},a),{y4:Af})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:Pf}],encode:e,style:Object.assign({},n)}])},Tf=(Nf.props={composite:!0},s=>{var t=s["cartesian"];return t?Ec:(t,e,n,r)=>{const{x:i,y:a}=n,o=_c(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Lf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},y=t._x0,g=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(y+m)/2))?y=a:m=a,(u=n>=(o=(g+v)/2))?g=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(y+m)/2))?y=a:m=a,(u=n>=(o=(g+v)/2))?g=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Cf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function jf(t){return t[0]}function Ff(t){return t[1]}function If(t,e,n){e=new Rf(null==e?jf:e,null==n?Ff:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Rf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Bf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Tf.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};a=If.prototype=Rf.prototype;function Df(t){return function(){return t}}function zf(t){return 1e-6*(t()-.5)}function Wf(t){return t.index}function Hf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Vf(c){var u,f,a,o,h,d,s=Wf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Df(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||zf(d),o=i.y+i.vy-r.y-r.vy||zf(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Hf(r,t.source)),"object"!=typeof t.target&&(t.target=Hf(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),y()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function y(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Df(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Df(+t),y(),e):r},e}a.copy=function(){var t,e,n=new Rf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Bf(e));else n._root=Bf(r);return n},a.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Lf(this.cover(e,n),e,n,t)},a.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Lf(this,i[u],a[u],t[u]);return this},a.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},a.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},a.extent=function(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]]},a.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,y=[],g=this._root;for(g&&y.push(new Cf(g,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=y.pop();)!(g=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(g.length?(y.push(new Cf(g[3],a=(s+o)/2,c=(l+i)/2,o,i),new Cf(g[2],s,c,a,i),new Cf(g[1],a,l,o,c),new Cf(g[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=y[y.length-1],y[y.length-1]=y[y.length-1-i],y[y.length-1-i]=r)):(l=(o=t-+this._x.call(null,g.data))*o+(s=e-+this._y.call(null,g.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=g.data));return u},a.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,y=this._x1,g=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+y)/2))?d=s:y=s,(c=o>=(s=(p+g)/2))?p=s:g=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},a.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},a.root=function(){return this._root},a.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},a.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Cf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new Cf(e,o,s,i,a)),(e=c[2])&&l.push(new Cf(e,n,s,o,a)),(e=c[1])&&l.push(new Cf(e,o,r,i,s)),e=c[0])&&l.push(new Cf(e,n,r,o,s));return this},a.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Cf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Cf(i,a,o,c,u)),(i=f[1])&&n.push(new Cf(i,c,o,s,u)),(i=f[2])&&n.push(new Cf(i,a,u,c,l)),i=f[3])&&n.push(new Cf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},a.x=function(t){return arguments.length?(this._x=t,this):this._x},a.y=function(t){return arguments.length?(this._y=t,this):this._y};var Gf={value:()=>{}};function qf(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Yf(r)}function Yf(t){this._=t}function Uf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Gf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Yf.prototype=qf.prototype={constructor:Yf,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Uf(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Uf(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Yf(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Xf,$f,Zf=0,Kf=0,Jf=0,Qf=1e3,th=0,eh=0,nh=0,rh="object"==typeof performance&&performance.now?performance:Date,ih="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ah(){return eh||(ih(oh),eh=rh.now()+nh)}function oh(){eh=0}function sh(){this._call=this._time=this._next=null}function lh(t,e,n){var r=new sh;return r.restart(t,e,n),r}function ch(){eh=(th=rh.now())+nh,Zf=Kf=0;try{ah(),++Zf;for(var t,e=Xf;e;)0<=(t=eh-e._time)&&e._call.call(void 0,t),e=e._next;--Zf}finally{for(var n,r,i=Xf,a=1/(Zf=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Xf=r);$f=n,fh(a),eh=0}}function uh(){var t=rh.now(),e=t-th;Qf<e&&(nh-=e,th=t)}function fh(t){Zf||(Kf=Kf&&clearTimeout(Kf),24<t-eh?(t<1/0&&(Kf=setTimeout(ch,t-rh.now()-nh)),Jf=Jf&&clearInterval(Jf)):(Jf||(th=rh.now(),Jf=setInterval(uh,Qf)),Zf=1,ih(ch)))}sh.prototype=lh.prototype={constructor:sh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ah():+n)+(null==e?0:+e),this._next||$f===this||($f?$f._next=this:Xf=this,$f=this),this._call=t,this._time=n,fh()},stop:function(){this._call&&(this._call=null,this._time=1/0,fh())}};const hh=4294967296;function dh(t){return t.x}function ph(t){return t.y}var yh=10,gh=Math.PI*(3-Math.sqrt(5));function mh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=lh(i),n=qf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%hh)/hh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=yh*Math.sqrt(.5+r),e=r*gh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function vh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=Df(-30),d=(h=1)/0,p=.81,y.initialize=function(t,e){i=t,c=e,R()},y.strength=function(t){return arguments.length?(r="function"==typeof t?t:Df(+t),R(),y):r},y.distanceMin=function(t){return arguments.length?(h=t*t,y):Math.sqrt(h)},y.distanceMax=function(t){return arguments.length?(d=t*t,y):Math.sqrt(d)},y.theta=function(t){return arguments.length?(p=t*t,y):Math.sqrt(p)},y);function y(t){var e,n=i.length,r=If(i,dh,ph).visitAfter(B);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function R(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function B(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=zf(c))*i),0===a&&(s+=(a=zf(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=zf(c))*i),0===a&&(s+=(a=zf(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var g,m,v,b,x,w,M,k,O,_,S,E,A,P,n=Vf(a).id(Ac(n)),N=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),mh(t).force("link",n).force("charge",I));function T(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function L(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+g(m[t],t,m))?0:+x(m[t],t,m)}}function C(t){for(var e,n=0,r=M.length;n<r;++n)(e=M[n]).vx+=(O[n]-e.x)*k[n]*t}function j(){if(M){var t,e=M.length;for(k=new Array(e),O=new Array(e),t=0;t<e;++t)k[t]=isNaN(O[t]=+w(M[t],t,M))?0:+_(M[t],t,M)}}function F(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*P,r=(r/e-E)*P,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?N.force("center",(P=1,null==S&&(S=0),null==E&&(E=0),F.initialize=function(t){A=t},F.x=function(t){return arguments.length?(S=+t,F):S},F.y=function(t){return arguments.length?(E=+t,F):E},F.strength=function(t){return arguments.length?(P=+t,F):P},F)):N.force("x",(_=Df(.1),"function"!=typeof w&&(w=Df(null==w?0:+w)),C.initialize=function(t){M=t,j()},C.strength=function(t){return arguments.length?(_="function"==typeof t?t:Df(+t),j(),C):_},C.x=function(t){return arguments.length?(w="function"==typeof t?t:Df(+t),j(),C):w},C)).force("y",(x=Df(.1),"function"!=typeof g&&(g=Df(null==g?0:+g)),T.initialize=function(t){m=t,L()},T.strength=function(t){return arguments.length?(x="function"==typeof t?t:Df(+t),L(),T):x},T.y=function(t){return arguments.length?(g="function"==typeof t?t:Df(+t),L(),T):g},T)),N.stop();var z=Math.ceil(Math.log(N.alphaMin())/Math.log(1-N.alphaDecay()));for(let t=0;t<z;t++)N.tick();return{nodesData:t,linksData:a}}const bh=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=J(e,"node"),c=J(e,"link"),{links:t,nodes:u}=Nc(t,e),{nodesData:t,linksData:u}=vh({links:t,nodes:u},I({},{joint:!0},i),e);return[I({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),I({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...a],animate:"object"==typeof s?J(s,"node"):s})]},xh=(bh.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=kl(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),wh=t=>xh(wl)(t),Mh=(wh.props={},t=>xh(uc)(t)),kh=(Mh.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=Mh(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[I({},h,{data:l,encode:J(e,"link"),scale:J(n,"link"),labels:o,style:Object.assign({stroke:"#999"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s}),I({},f,{data:i,scale:J(n,"node"),encode:J(e,"node"),labels:[Object.assign(Object.assign({},d),J(r,"label")),...a],style:Object.assign({},J(r,"node")),animate:"object"==typeof s?J(s,"node"):s})]}});kh.props={composite:!0};var Oh={},_h={},Sh=34,Eh=10,Ah=13;function Ph(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Nh(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Th(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Lh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Th(-e,6):9999<e?"+"+Th(e,6):Th(e,4))+"-"+Th(t.getUTCMonth()+1,2)+"-"+Th(t.getUTCDate(),2)+(a?"T"+Th(n,2)+":"+Th(r,2)+":"+Th(i,2)+"."+Th(a,3)+"Z":i?"T"+Th(n,2)+":"+Th(r,2)+":"+Th(i,2)+"Z":r||n?"T"+Th(n,2)+":"+Th(r,2)+"Z":"")}function Ch(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return _h;if(l)return l=!1,Oh;var t,e,n=a;if(r.charCodeAt(n)===Sh){for(;a++<i&&r.charCodeAt(a)!==Sh||r.charCodeAt(++a)===Sh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Eh?l=!0:e===Ah&&(l=!0,r.charCodeAt(a)===Eh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Eh)l=!0;else if(e===Ah)l=!0,r.charCodeAt(a)===Eh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Eh&&--i,r.charCodeAt(i-1)===Ah&&--i;(e=c())!==_h;){for(var u=[];e!==Oh&&e!==_h;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Lh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Ph(n=t),function(t,e){return r(i(t),e,n)}):Ph(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Nh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Nh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function jh(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Fh&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Fh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Ih=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ne(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Ch(i).parse(t,a?jh:lf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Ih.props={};const Rh=t=>{const{fields:a,as:n=[]}=t;return t=>{if(!a||(e=a,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<a.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:a[t],[i]:n[a[t]]}));return e},[])}};Rh.props={};const Bh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)};function Dh(t,e,n){return Math.min(n,Math.max(e,t))}Bh.props={};const zh=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=Dh(n,0,t.length-1),r=Dh(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},Wh=(zh.props={},t=>{t=t.fields;return zh({fields:t})});Wh.props={};const Hh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Hh.props={};const Vh=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Gh=(Vh.props={},t=>{const e=t["value"];return()=>e}),qh=(Gh.props={},t=>{const{callback:e=lf}=t;return t=>e(t)}),Yh=(qh.props={},t=>{const{callback:e=lf}=t;return t=>Array.isArray(t)?t.map(e):t});Yh.props={};var Uh=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Xh={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function $h(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:y,sourceWeight:g,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},Xh),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=y(t),t.sourceWeight=g(t),t.targetWeight=m(t)});const i=Yc(r,t=>t.source),a=Yc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=mu(e,t=>t.sourceWeight)+mu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:Uh[v])&&r.sort(n),!(n=(r=e).length))throw cf("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=y(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Yc(e,t=>t.source),l=Yc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Zh=e=>t=>$h(e)(t),Kh=(Zh.props={},Math.PI/180),Jh=64,Qh=2048;function td(t){return t.text}function ed(){return"serif"}function nd(){return"normal"}function rd(t){return t.value}function id(){return 90*~~(2*Math.random())}function ad(){return 1}function od(){}function sd(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(Jh<<5)/c,Qh/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*Kh),h=Math.cos(o.rotate*Kh),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=Jh<<5&&(i=0,a+=n,n=0),a+e>=Qh)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*Kh),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(Jh<<5)/c,Qh/c).data,y=[];0<=--s;)if((o=r[s]).hasText){var g=o.width,m=g>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)y[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<g;t++){var v=m*e+(t>>5),b=p[(a+e)*(Jh<<5)+(i+t)<<2]?1<<31-t%32:0;y[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=y.slice(0,(o.y1-o.y0)*m)}}}function ld(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function cd(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function ud(){return document.createElement("canvas")}function fd(t){return"function"==typeof t?t:function(){return t}}const hd={archimedean:ld,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function dd(){let b=[256,256],r=td,i=ed,p=rd,y=nd,g=id,m=ad,x=ld,w=Math.random,v=od,M=[],k=null,O=1/0;const _=nd,S=ud,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(Jh<<5)/e,t.height=Qh/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||cd((b[0]>>5)*b[1]),c=M.length,u=[],f=M.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=g.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,sd(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,y=t.x-(d<<4),g=127&y,m=32-g,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(y>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>g:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return k&&clearInterval(k),k=setInterval(n,0),n(),E},E.stop=function(){return k&&(clearInterval(k),k=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=cd((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){M=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=fd(t)},E.font=function(t){i=fd(t)},E.fontWeight=function(t){y=fd(t)},E.rotate=function(t){g=fd(t)},E.spiral=function(t){x=hd[t]||t},E.fontSize=function(t){p=fd(t)},E.padding=function(t){m=fd(t)},E.random=function(t){w=fd(t)},E.on=function(t){v=fd(t)},E}const pd={size:[500,500],fontSize:[14,28]};function yd(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const gd=h=>f=>ne(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},pd,h),e=dd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ne(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[cu(e),su(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",yd,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=K(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function md(e){return"string"==typeof e?t=>t[e]:e}gd.props={};const vd=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=md(r),l=md(t),c=Uc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};vd.props={};const bd=u=>c=>ne(void 0,void 0,void 0,function*(){var{width:t,height:e}=vf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=K(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield gd(Object.assign(Object.assign({},l),o))(e);return[I({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),xd=(bd.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),wd=(xd.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Md=(wd.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),kd=(Md.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),Od=(kd.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),_d=(Od.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),Sd=(_d.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),Ed=(Sd.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),Ad=(Ed.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),Pd=(Ad.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),Nd=(Pd.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Td=(Nd.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),Ld=(Td.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),Cd=(Ld.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),jd=(Cd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Fd=(jd.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Id=(Fd.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Rd=(Id.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Bd=(Rd.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Dd=(Bd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function zd(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Wd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Hd(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Dd.props={};const Vd=Math.sqrt(50),Gd=Math.sqrt(10),qd=Math.sqrt(2);function Yd(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Vd?10:n>=Gd?5:n>=qd?2:1)*10**t:-(10**-t)/(n>=Vd?10:n>=Gd?5:n>=qd?2:1)}function Ud(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Vd?r*=10:n>=Gd?r*=5:n>=qd&&(r*=2),e<t?-r:r}const Xd=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Yd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Yd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Yd(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},$d=36e5,Zd=864e5,Kd=7*Zd;Zd,Zd;function Jd(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}o=Jd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),e=Jd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),n=Jd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),Do=Jd($d,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+$d*e)},t=>t.getHours()),ta=Jd(Zd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Zd*e)},t=>t.getDate()-1);const Qd=Jd(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());Vo=Jd(Kd,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Kd*e)},t=>{var e=Qd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Kd)}),aa=Jd(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const tp={millisecond:o,second:e,minute:n,hour:Do,day:ta,week:Vo,month:Qd,year:aa};oa=Jd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),sa=Jd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ca=Jd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),c=Jd($d,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+$d*e)},t=>t.getUTCHours()),ua=Jd(Zd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Zd*e)},t=>t.getUTCDate()-1);const ep=Jd(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());fa=Jd(Kd,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Kd*e)},t=>{var e=ep.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Kd)}),ha=Jd(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const np={millisecond:oa,second:sa,minute:ca,hour:c,day:ua,week:fa,month:ep,year:ha};function rp(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?np:tp;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Hd(i,l,0,c,s);let f;return f=u===c?[a,Ud(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Ud(t,e,n),1)]}const ip=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=rp(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function ap(t){return!Ns(t)&&!Ps(t)&&!Number.isNaN(t)}const op=e=>t=>-e(-t),sp=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?op(t):t},lp=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?op(n):n},cp=(t,e,n,r)=>{var i=t<0,a=sp(r,i),r=lp(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function up(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return ws(t)?Math.round(t):t}):i;this.output=zd(a,r,e,t)},t.prototype.invert=void 0}}var fp,da={exports:{}},pa={exports:{}},hp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},dp=Array.prototype.concat,pp=Array.prototype.slice,yp=pa.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];hp(i)?e=dp.call(e,pp.call(i)):e.push(i)}return e},gp=(yp.wrap=function(t){return function(){return t(yp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),mp=pa.exports,vp=Object.hasOwnProperty,bp=Object.create(null);for(fp in gp)vp.call(gp,fp)&&(bp[gp[fp]]=fp);var xp=da.exports={to:{},get:{}};function wp(t,e,n){return Math.min(Math.max(e,t),n)}function Mp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}xp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=xp.get.hsl(t),n="hsl";break;case"hwb":e=xp.get.hwb(t),n="hwb";break;default:e=xp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},xp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:vp.call(gp,e[1])?((i=gp[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=wp(i[n],0,255);return i[3]=wp(i[3],0,1),i},xp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,wp(parseFloat(t[2]),0,100),wp(parseFloat(t[3]),0,100),wp(isNaN(e)?1:e,0,1)]):null},xp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,wp(parseFloat(t[2]),0,100),wp(parseFloat(t[3]),0,100),wp(isNaN(e)?1:e,0,1)]):null},xp.to.hex=function(){var t=mp(arguments);return"#"+Mp(t[0])+Mp(t[1])+Mp(t[2])+(t[3]<1?Mp(Math.round(255*t[3])):"")},xp.to.rgb=function(){var t=mp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},xp.to.rgb.percent=function(){var t=mp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},xp.to.hsl=function(){var t=mp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},xp.to.hwb=function(){var t=mp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},xp.to.keyword=function(t){return bp[t.slice(0,3)]};var kp=da.exports;function Op(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function _p(t){var e,n,r,t=kp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Op(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Op(n,r,e),255*Op(n,r,e-1/3),t]):null):null}const Sp=(e,n)=>t=>e*(1-t)+n*t,Ep=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Sp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=_p(n),c=_p(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Ap=(t,e)=>{const n=Sp(t,e);return t=>Math.round(n(t))};function Pp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Np(t){return"object"==typeof t?t.valueOf():t}class Tp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Np,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Pp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Pp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class Lp{constructor(t){this.options=I({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=I({},this.options,t),this.rescale(t)}rescale(t){}}const Cp=Symbol("defaultUnknown");function jp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Fp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Cp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Ip(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Rp extends Lp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Cp}}map(t){return 0===this.domainIndexMap.size&&jp(this.domainIndexMap,this.getDomain(),this.domainKey),Fp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&jp(this.rangeIndexMap,this.getRange(),this.rangeKey),Fp({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Ip(e),this.rangeKey=Ip(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Rp(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function Bp(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new Tp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),y=new Tp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let g=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=g,Math.round(1e12*v)/1e12);var v=e[t];g+=y.get(v)}return{valueBandWidth:c,valueStep:y,adjustedRange:m}}class Dp extends Rp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Cp,flex:[]}}clone(){return new Dp(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return Bp(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const zp=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Yd(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function Wp(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Hp=[1,5,2,2.5,4,3],Vp=100*Number.EPSILON;const Gp=(n,r,t=5,i=!0,a=Hp,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=g,p=void 0,p=Qs(h),1-Hs(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<y.score)break;var x=(r-n)/(e+1)/g/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=g*m*10**t,M=(O=r,M=w*(e-1),(O-=n)<M?1-((M-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*M+o[2]*b+o[3]<y.score)break;var k=Math.floor(r/w)*g-(e-1)*g,O=Math.ceil(n/w)*g;if(k<=O){var _=O-k;for(let t=0;t<=_;t+=1){var S=(k+t)*(w/g),E=S+w*(e-1),A=w,P=function(t,e,n,r,i,a){var o=Qs(e),e=Hs(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Vp||a-t<Vp)&&r<=0&&0<=i?1:s)}(m,a,g,S,E,A),N=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,T=(l=e,T=n,l=(l-1)/(E-(L=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(T,L)),2-Math.max(l/c,c/l)),L=o[0]*P+o[1]*N+o[2]*T+ +o[3];y.score<L&&(!i||S<=n&&r<=E)&&(y.lmin=S,y.lmax=E,y.lstep=A,y.score=L)}}t+=1}e+=1}}g+=1}var t=Wp(y.lmax),e=Wp(y.lmin),C=Wp(y.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,F=new Array(j);F[0]=Wp(e);for(let t=1;t<j;t+=1)F[t]=Wp(F[t-1]+C);return F};class qp extends Lp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Gp}}map(t){return ap(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new qp(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return ws(t)&&ws(r)?n(t,r,e):[]}}const Yp=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return zd(o=t<r?(a=Wd(t,r),n(e,i)):(a=Wd(r,t),n(i,e)),a)},Up=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Wd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Hd(r,t,1,i)-1,n=a[e];return zd(o[e],n)(t)}},Xp=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Up:Yp)(t,e,r?Ap:n)};class $p extends Lp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Sp,tickCount:5}}map(t){return ap(t)?this.output(t):this.options.unknown}invert(t){return ap(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Xd}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return Xs}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Xp(n.map(t),r,a,i);this.output=zd(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Xp(i,r.map(t),Sp);this.input=zd(e,n,i)}}class Zp extends $p{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Ep,tickMethod:zp,tickCount:5}}chooseTransforms(){return[Xs,Xs]}clone(){return new Zp(this.options)}}class Kp extends Dp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Cp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Kp(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Jp=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Qp extends $p{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Ep,tickMethod:zp,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[Xs,Xs]:(t=.5===r?Jp:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Qp(this.options)}}class t0 extends Qp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Ep,tickMethod:zp,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new t0(this.options)}}class e0 extends Lp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return ap(t)?(t=Hd(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new e0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const n0=(t,e,n,r=10)=>{var i=t<0,a=lp(r,i),o=sp(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var y=a(u);for(let t=1;t<r;t+=1){var g=y*t;if(c<g)break;l<=g&&h.push(g)}}2*h.length<n&&(h=zp(l,c,n))}else h=zp(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class r0 extends $p{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Ep,tickMethod:n0,tickCount:5}}chooseNice(){return cp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[sp(t,e),lp(t,e)]}clone(){return new r0(this.options)}}class i0 extends e0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Gp}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Xd(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new i0(this.options)}}function a0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class o0 extends e0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Gp}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=a0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new o0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var s0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,l0=/\[([^]*?)\]/gm;function c0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function u0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function f0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var h0,ya=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ga=["January","February","March","April","May","June","July","August","September","October","November","December"],u=c0(ga,3),d0=u0({},{dayNamesShort:c0(ya,3),dayNames:ya,monthNamesShort:u,monthNames:ga,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),p0={D:function(t){return String(t.getDate())},DD:function(t){return f0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return f0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return f0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return f0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return f0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return f0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return f0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return f0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return f0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return f0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return f0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+f0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+f0(Math.floor(Math.abs(t)/60),2)+":"+f0(Math.abs(t)%60,2)}},y0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const g0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=rp(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function m0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class v0 extends $p{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:g0,interpolate:Sp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return ip}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?np:tp,s=t?m0:Xs;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=y0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=y0[t]||t).replace(l0,function(t,e){return r.push(e),"@@@"}),u0(u0({},d0),n));return(t=t.replace(s0,function(t){return p0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new v0(this.options)}}var b0;let x0=h0=class extends Zp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Xs,tickMethod:zp,tickCount:5}}constructor(t){super(t)}clone(){return new h0(this.options)}};x0=h0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([up(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return zd(Sp(0,1),Wd(t,e))})],x0);let w0=b0=class extends Zp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Xs,tickMethod:zp,tickCount:5}}constructor(t){super(t)}clone(){return new b0(this.options)}};w0=b0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([up(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=zd(Sp(0,.5),Wd(e,n)),a=zd(Sp(.5,1),Wd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],w0);const M0=t=>new Dp(t),k0=(M0.props={},t=>new Zp(t)),O0=(k0.props={},t=>new Rp(t)),_0=(O0.props={},t=>new qp(t)),S0=(_0.props={},t=>new Kp(t)),E0=(S0.props={},t=>new v0(t)),A0=(E0.props={},t=>new r0(t)),P0=(A0.props={},t=>new Qp(t)),N0=(P0.props={},t=>new e0(t)),T0=(N0.props={},t=>new o0(t)),L0=(T0.props={},t=>new i0(t)),C0=(L0.props={},t=>new t0(t)),j0=(C0.props={},t=>new x0(t)),F0=(j0.props={},Math.PI),I0=2*F0,R0=1e-6,B0=I0-R0;function D0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function z0(){return new D0}function W0(t){return function(){return t}}D0.prototype=z0.prototype={constructor:D0,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){var a,o,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),f=s-t,h=l-e,d=f*f+h*h;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>R0&&(Math.abs(h*c-u*f)>R0&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((F0-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>R0&&(this._+="L"+(t+d*f)+","+(e+d*h)),this._+="A"+i+","+i+",0,0,"+ +(f*s<h*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,a=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>R0||Math.abs(this._y1-c)>R0)&&(this._+="L"+l+","+c),n&&((a=a<0?a%I0+I0:a)>B0?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):a>R0&&(this._+="A"+n+","+n+",0,"+ +(a>=F0)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const H0=Math.abs,V0=Math.atan2,G0=Math.cos,q0=Math.max,Y0=Math.min,U0=Math.sin,X0=Math.sqrt,$0=1e-12,Z0=Math.PI,K0=Z0/2,J0=2*Z0;function Q0(t){return 1<=t?K0:t<=-1?-K0:Math.asin(t)}function t1(t){return t.innerRadius}function e1(t){return t.outerRadius}function n1(t){return t.startAngle}function r1(t){return t.endAngle}function i1(t){return t&&t.padAngle}function a1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/X0(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*X0(q0(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function o1(){var A=t1,P=e1,N=W0(0),T=null,L=n1,C=r1,j=i1,F=null;function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,m,v,b,x,w,M=+A.apply(this,arguments),k=+P.apply(this,arguments),O=L.apply(this,arguments)-K0,_=C.apply(this,arguments)-K0,S=H0(_-O),E=O<_;if(F=F||(t=z0()),k<M&&(e=k,k=M,M=e),k>$0?S>J0-$0?(F.moveTo(k*G0(O),k*U0(O)),F.arc(0,0,k,O,_,!E),M>$0&&(F.moveTo(M*G0(_),M*U0(_)),F.arc(0,0,M,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=j.apply(this,arguments)/2)>$0&&(T?+T.apply(this,arguments):X0(M*M+k*k)),w=x=s=Y0(H0(k-M)/2,+N.apply(this,arguments)),h>$0&&(f=Q0(h/M*U0(u)),h=Q0(h/k*U0(u)),(a-=2*f)>$0?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>$0?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=k*G0(e),f=k*U0(e),h=M*G0(i),O=M*U0(i),s>$0&&(d=k*G0(n),p=k*U0(n),y=M*G0(r),g=M*U0(r),S<Z0)&&(_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<$0))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,y,g,d,p,h,O))&&(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/U0((1<(S=(S*b+v*m)/(X0(S*S+v*v)*X0(b*b+m*m)))?0:S<-1?Z0:Math.acos(S))/2),b=X0(_[0]*_[0]+_[1]*_[1]),x=Y0(s,(M-b)/(v-1)),w=Y0(s,(k-b)/(1+v))),o>$0?w>$0?(l=a1(y,g,u,f,k,w,E),c=a1(d,p,h,O,k,w,E),F.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?F.arc(l.cx,l.cy,w,V0(l.y01,l.x01),V0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,w,V0(l.y01,l.x01),V0(l.y11,l.x11),!E),F.arc(0,0,k,V0(l.cy+l.y11,l.cx+l.x11),V0(c.cy+c.y11,c.cx+c.x11),!E),F.arc(c.cx,c.cy,w,V0(c.y11,c.x11),V0(c.y01,c.x01),!E))):(F.moveTo(u,f),F.arc(0,0,k,e,n,!E)):F.moveTo(u,f),M>$0&&a>$0?x>$0?(l=a1(h,O,d,p,M,-x,E),c=a1(u,f,y,g,M,-x,E),F.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?F.arc(l.cx,l.cy,x,V0(l.y01,l.x01),V0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,x,V0(l.y01,l.x01),V0(l.y11,l.x11),!E),F.arc(0,0,M,V0(l.cy+l.y11,l.cx+l.x11),V0(c.cy+c.y11,c.cx+c.x11),E),F.arc(c.cx,c.cy,x,V0(c.y11,c.x11),V0(c.y01,c.x01),!E))):F.arc(0,0,M,i,r,E):F.lineTo(h,O)):F.moveTo(0,0),F.closePath(),t)return F=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +P.apply(this,arguments))/2,e=(+L.apply(this,arguments)+ +C.apply(this,arguments))/2-Z0/2;return[G0(e)*t,U0(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:W0(+t),e):A},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:W0(+t),e):P},e.cornerRadius=function(t){return arguments.length?(N="function"==typeof t?t:W0(+t),e):N},e.padRadius=function(t){return arguments.length?(T=null==t?null:"function"==typeof t?t:W0(+t),e):T},e.startAngle=function(t){return arguments.length?(L="function"==typeof t?t:W0(+t),e):L},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:W0(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:W0(+t),e):j},e.context=function(t){return arguments.length?(F=null==t?null:t,e):F},e}function s1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function l1(t){this._context=t}function c1(t){return new l1(t)}function u1(t){return t[0]}function f1(t){return t[1]}function h1(o,s){var l=W0(!0),c=null,u=c1,f=null;function e(t){var e,n,r,i=(t=s1(t)).length,a=!1;for(null==c&&(f=u(r=z0())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?u1:W0(o),s="function"==typeof s?s:void 0===s?f1:W0(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:W0(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:W0(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:W0(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function d1(u,f,h){var d=null,p=W0(!0),y=null,g=c1,m=null;function e(t){var e,n,r,i,a,o=(t=s1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==y&&(m=g(a=z0())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return h1().defined(p).curve(g).context(y)}return u="function"==typeof u?u:void 0===u?u1:W0(+u),f="function"==typeof f?f:W0(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?f1:W0(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:W0(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:W0(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:W0(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:W0(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:W0(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:W0(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:W0(!!t),e):p},e.curve=function(t){return arguments.length?(g=t,null!=y&&(m=g(y)),e):g},e.context=function(t){return arguments.length?(null==t?y=m=null:m=g(y=t),e):y},e}l1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}};var p1=g1(c1);function y1(t){this._curve=t}function g1(e){function t(t){return new y1(e(t))}return t._curve=e,t}function m1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(g1(t)):e()._curve},t}function v1(){}function b1(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 x1(t,e){this._context=t,this._k=(1-e)/6}function w1(t,e){this._context=t,this._k=(1-e)/6}function M1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>$0&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>$0&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function k1(t,e){this._context=t,this._alpha=e}y1.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))}},x1.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:b1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:b1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new x1(t,n)}return t.tension=function(t){return e(+t)},t}(0),w1.prototype={areaStart:v1,areaEnd:v1,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)}},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:b1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new w1(t,n)}return t.tension=function(t){return e(+t)},t}(0),k1.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:M1(this,t,e)}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}};var O1=function e(n){function t(t){return n?new k1(t,n):new x1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function _1(t,e){this._context=t,this._alpha=e}_1.prototype={areaStart:v1,areaEnd:v1,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)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:M1(this,t,e)}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}};var S1=function e(n){function t(t){return n?new _1(t,n):new w1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function E1(t){this._context=t}function A1(t){return new E1(t)}function P1(t,e){this._context=t,this._t=e}function N1(t){return new P1(t,.5)}function T1(t){return new P1(t,0)}function L1(t){return new P1(t,1)}function Q(t){return new C1([t],null,t,t.ownerDocument)}E1.prototype={areaStart:v1,areaEnd:v1,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))}},P1.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(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:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class C1{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new C1(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new C1(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new C1([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new C1(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new C1(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new C1([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Yc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var y=c.get(d);y.__data__=h,y.__facet__=!1,a.push(y),o.delete(y),c.delete(d)}else if(u.has(d)){y=u.get(d);y.__data__=h,y.__facet__=!0,a.push(y),u.delete(d)}else if(f.has(d)){const Yc=f.get(d);s.push([h,Yc]);for(const g of Yc)o.delete(g);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new C1([],i,this._parent,this._document),new C1(a,null,this._parent,this._document),new C1(o,null,this._parent,this._document),new C1([],s,this._parent,this._document),new C1(l,null,this._parent,this._document)];return new C1(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new C1(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=C1.registry[t])?new e:cf("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new C1([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function j1([t,e],[n,r]){return[t-n,e-r]}function F1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function I1([t,e]){return Math.atan2(e,t)}function R1([t,e]){return I1([t,e])+Math.PI/2}function B1(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function D1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function z1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function W1(t){return t.map((t,e)=>e)}function B(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function H1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*F1(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function V1(t,e,n,r,i){e=I1(j1(r,e))+Math.PI,n=I1(j1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function G1(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=W1(a),[r,o]=Wc(t,t=>a[t]);const s=new Zp({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function q1(t){var[t,e,n,r]=t;return[r,t,e,n]}function Y1(t,e,n){var[e,r,,i]=vu(t)?q1(e):e,[n,a]=n,t=t.getCenter(),o=R1(j1(e,t)),r=R1(j1(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:F1(i,t),outerRadius:F1(e,t)}}function U1(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function X1(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}C1.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};const $1=N=>{const{colorAttribute:T,first:L=!0,last:C=!0}=N,j=K(N,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=T,a=r[i],o=K(r,["symbol"==typeof i?i:i+""]),r=o.lineWidth||1,{stroke:i,radius:s=0,radiusTopLeft:l=s,radiusTopRight:c=s,radiusBottomRight:u=s,radiusBottomLeft:f=s,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:y=h,innerRadiusBottomLeft:h=h,inset:g=0,insetLeft:m=g,insetRight:v=g,insetBottom:b=g,insetTop:x=g,lineWidth:r="stroke"===T||i?r:0}=j,w=K(j,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:a=a,opacity:M}=e;if(!bu(n)&&!wu(n)){var[k,,O]=!!vu(n)?q1(t):t;const[P,E]=k;var[O,k]=j1(O,k),_=(0<O?P:P+O)+m,S=(0<k?E:E+k)+x,O=Math.abs(O)-(m+v),m=Math.abs(k)-(x+b);return Q(new F.Rect({})).call(B,o).style("lineWidth",r).style("x",_).style("y",S).style("width",O).style("height",m).style("stroke",void 0===i?a:i).style(X1(N),M).style(T,a).style("radius",[L?l:d,L?c:p,C?u:y,C?f:h]).call(B,w).node()}const{y:E,y1:A}=e;v=n.getCenter(),k=Y1(n,t,[E,A]),x=o1().cornerRadius(s).padAngle(g*Math.PI/180);return Q(new F.Path({})).call(B,o).style("path",x(k)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",a||i).style("lineWidth",r).style(T,a).style(X1(N),M).call(B,j).node()}},Z1=($1.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>$1(Object.assign({colorAttribute:"fill"},t))),K1=(Z1.props=Object.assign({},$1.props),t=>$1(Object.assign({colorAttribute:"stroke"},t)));K1.props=Object.assign({},$1.props);const J1=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(vu(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=K(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return $1(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Q1(t,e,n){var[t,r,i,a]=t;if(vu(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}J1.props=Object.assign({},$1.props);const ty=t=>J1(Object.assign({adjustPoints:Q1},t));function ey(t){const e="function"==typeof t?t:t.render;return class extends F.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}ty.props=Object.assign({},$1.props);const ny=ey(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new F.Path({})).style("d",e).call(B,r),Q(t).maybeAppend("line1",()=>new F.Path({})).style("d",n).call(B,i)});const ry=t=>{const{curve:u,gradient:f=!1,gradientColor:h="between",defined:d=t=>!Number.isNaN(t)&&null!=t,connectNulls:p=!1}=t,y=K(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=K(r,["stroke","lineWidth"]),{color:r=i,size:e=a,transform:i,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?G1(a,s,l,f,h):r,s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),e&&{lineWidth:e}),i&&{transform:i}),y),l=bu(n)?[...t,t[0]]:t;const c=h1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>d(t)&&d(e)).curve(u);var[r,o]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(l,d),a=J(y,"connect"),e=!!o.length;return(!e||p&&!Object.keys(a).length?Q(new F.Path({})).style("d",c(r)).call(B,s):e&&!p?Q(new F.Path({})).style("d",c(l)).call(B,s):Q(new ny).style("style1",Object.assign(Object.assign({},s),a)).style("style2",s).style("d1",o.map(c).join(",")).style("d2",c(l))).node()}},iy=(ry.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>ry(Object.assign({curve:c1},t))),ay=(iy.props=Object.assign({},ry.props),t=>{var{alpha:e=.5}=t,t=K(t,["alpha"]);return ry(Object.assign({curve:O1.alpha(e)},t))}),oy=(ay.props=Object.assign({},ry.props),t=>ry(Object.assign({curve:L1},t))),sy=(oy.props=Object.assign({},ry.props),t=>ry(Object.assign({curve:T1},t))),ly=(sy.props=Object.assign({},ry.props),t=>ry(Object.assign({curve:N1},t)));function cy(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}ly.props=Object.assign({},ry.props);var uy=Object.freeze({__proto__:null,point:cy,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const f=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,y=K(h,["colorAttribute","symbol","mode"]),g=uy[t]||cy;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=U1(r,a,o,s),a=d,o=r[a],s=r["lineWidth"],r=K(r,["symbol"==typeof a?a:a+"","lineWidth"]),a=y.stroke?s||1:s,{color:s=o,transform:o,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||ku(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||y.r||r.r;return Q(new F.Path).call(B,r).style("d",g(c,u,f)).style("lineWidth",a).style("transform",o).style("stroke",s).style(X1(h),l).style(d,s).call(B,y).node()}},fy=(f.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>f(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),hy=(fy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),dy=(hy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),py=(dy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),yy=(py.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),gy=(yy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),my=(gy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),vy=(my.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),by=(vy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),xy=(by.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),wy=(xy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),My=(wy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),ky=(My.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Oy=(ky.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),_y=(Oy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Sy=(_y.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Ey=(Sy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Ay=(Ey.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Py=(Ay.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Ny=(Py.props=Object.assign({},f.props),t=>{const{arrowSize:f="40%"}=t,h=K(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=U1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),[r,t]=t,[l,c]=H1(r,t,{arrowSize:f}),u=z0();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),Q(new F.Path).call(B,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(B,h).node()}});Ny.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};i(Cy,Ty=F.CustomElement),Cy.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([Number(e)||0,Number(t)||0]),this.update(),this.bindEvents(this.attributes,this)},Cy.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},Cy.prototype.clear=function(){this.removeChildren()},Cy.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},Cy.prototype.bindEvents=function(t,e){};var Ty,Ly,la=Cy;function Cy(t){return Ty.call(this,t)||this}function jy(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,jy)}function Fy(){this.constructor=Ly}Ly=jy,zo=Error,Fy.prototype=zo.prototype,Ly.prototype=new Fy,jy.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var Iy;function Ry(t,e,n,r){var i,a,o=By(r=void 0===r?"...":r,n),s=bs(t)?t:As(t),l=e,c=[];if(By(t,n)<=e)return t;for(;;){if(i=s.substr(0,16),l<(a=By(i,n))+o)break;if(c.push(i),l-=a,!(s=s.substr(16)))return c.join("")}for(;;){if(i=s.substr(0,1),l<(a=By(i,n))+o)break;if(c.push(i),l-=a,!(s=s.substr(1)))return c.join("")}return"".concat(c.join("")).concat(r)}var By=zs(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Iy=Iy||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),Iy.measureText(bs(t)?t:"").width},function(t,e){return re([t],R(Es(e=void 0===e?{}:e)),!1).join("")});function Dy(t,e){return"string"==typeof t?By(t,e):t}var zy=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function Wy(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Hy(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Vy(t){return t.toLocaleString()}function Gy(t,e){return void 0===e&&(e=0),Math.abs(t)<1e3?String(t):"".concat(Hy(t/1e3,e).toLocaleString(),"K")}var qy=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},Yy=function(t,e,n){return 0<t&&Number.isFinite(t)?e:n},Uy=function(t,e){return t*e},Xy=Math.PI/180;function $y(t){if(ws(t))return[t,t,t,t];if(hs(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var Zy=["default","active","selected","disabled","inactive"],Ky={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Jy(t){var e;return t?null==t?void 0:t.default:(e=Ds(t)||{},Zy.forEach(function(t){t in e&&delete e[t]}),e)}function Qy(t,e,n){return void 0===n&&(n=!1),e?(e=Gs(t,e),n?I({},Jy(t),e):e):Jy(t)||{}}function tg(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}ng.prototype.selectAll=function(t){return new ng("string"==typeof t?this.__parent__.querySelectorAll(t):t,null,this.__elements__[0],this.__document__)},ng.prototype.select=function(t){t="string"==typeof t?this.__parent__.querySelectorAll(t)[0]||null:t;return new ng([t],null,t,this.__document__)},ng.prototype.append=function(n){var r=this,t="function"==typeof n?n:function(){return t=n,r.__document__?r.__document__.createElement(t,{}):(e=ng.registry[t])?new e:new Error("Unknown node type: ".concat(t));var t,e},e=[];if(null!==this.__data__){for(var i=0;i<this.__data__.length;i++)(s=t(a=this.__data__[i],i)).__data__=a,this.__parent__.appendChild(s),e.push(s);return new ng(e,null,this.__parent__,this.__document__)}for(i=0;i<this.__elements__.length;i++){var a,o=this.__elements__[i],s=t(a=o.__data__,i);o.appendChild(s),e.push(s)}return new ng(e,null,e[0],this.__document__)},ng.prototype.data=function(t,n){void 0===n&&(n=function(t){return t});for(var e=[],r=[],i=new Map(this.__elements__.map(function(t,e){return[n(t.__data__,e),t]})),a=0;a<t.length;a++){var o,s=t[a],l=n(s,a);i.has(l)?((o=i.get(l)).__data__=s,r.push(o),i.delete(l)):e.push(s)}var c=Array.from(i.values()),c=[new ng([],e,this.__parent__,this.__document__),new ng(r,null,this.__parent__,this.__document__),new ng(c,null,this.__parent__,this.__document__)];return new ng(this.__elements__,null,this.__parent__,this.__document__,c)},ng.prototype.merge=function(t){return new ng(re(re([],R(this.__elements__),!1),R(t.__elements__),!1),null,this.__parent__,this.__document__)},ng.prototype.join=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this.__enter__),e=e(this.__update__),n=n(this.__exit__);return e.merge(t).merge(n)},ng.prototype.remove=function(){var n=re([],R(this.__elements__),!1);return this.__elements__.forEach(function(t){var e;t.parentNode&&(t.parentNode.removeChild(t),e=n.indexOf(t),n.splice(e,1),null!=(e=t.parentNode)&&e.removeChild(t),t.remove())}),new ng(n,null,this.__parent__,this.__document__)},ng.prototype.each=function(t){for(var e=0;e<this.__elements__.length;e++){var n,r=this.__elements__[e];r&&(n=r.__data__,t.call(r,n,e))}return this},ng.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))}),this},ng.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))}),this},ng.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},ng.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,re([this.__parent__,this],R(e),!1)),this},ng.prototype.node=function(){return this.__elements__[0]},ng.prototype.nodes=function(){return this.__elements__},ng.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};var eg=ng;function ng(t,e,n,r,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null]),this.__elements__=t=void 0===t?null:t,this.__data__=e,this.__parent__=n,this.__document__=r,this.__enter__=i[0],this.__update__=i[1],this.__exit__=i[2]}function M(t){return new eg([t],null,t,t.ownerDocument)}function S(t,e){var n,r;if(e)try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=R(a.value,2),s=o[0],l=o[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function D(t,e,n){return t.querySelector(e)?M(t).select(e):M(t).append(n)}function rg(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function ig(t){var t=t.getLocalBounds(),t=R([t.min,t.max],2),e=R(t[0],2),n=e[0],e=e[1],t=R(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function ag(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}var og=["year","month","day","hour","minute","second"],sg=["YYYY","MM","DD","hh","mm","ss"];function lg(t){return t instanceof Date?t:new Date(t)}function cg(t){for(var e,t=R(t,2),n=t[0],t=t[1],n=og.indexOf(n),r=og.indexOf(t),i="",a=n;a<=r;a+=1)i+=sg[a],a<r&&(e="-",2===a?e=" ":2<a&&(e=":"),i+=e);return i}function ug(t,e){var n={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),hh:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},r=e;return Object.keys(n).forEach(function(t){var e=n[t];r=r.replace(t,"YYYY"===t?"".concat(e):"0".concat(e).slice(-2))}),r}function fg(t,e){t=new Date(t);return{year:function(t){t.setMonth(0),t.setHours(0,0,0,0)},month:function(t){t.setDate(1),t.setHours(0,0,0,0)},day:function(t){return t.setHours(0,0,0,0)},hour:function(t){return t.setMinutes(0,0,0)},minute:function(t){return t.setSeconds(0,0)},second:function(t){return t.setMilliseconds(0)}}[e](t),ug(t,cg(["year",e]))}function hg(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)dg(t,e[r]);return t}var dg=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=R(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?vs(t)?(vs(r[e])||(n[e]={}),a<o?dg(r[e],t,a+1,o):n[e]=i[e]):hs(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function pg(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function yg(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function gg(t,e){var t=R(t,2),n=t[0],t=t[1],e=R(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function mg(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var vg=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function bg(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}Ro=bg;function xg(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function wg(t,e,n){return[["M",t-n,e],["L",t+n,e]]}qo=wg;function Mg(t){n="default",ds(e=t)&&e instanceof Image?n="image":us(e)?n="symbol":bs(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}i(Og,kg=la),Og.prototype.render=function(t,e){t.x,t.y;var r=t.symbol,n=t.size,i=void 0===n?16:n,a=K(t,["x","y","symbol","size"]),o=Mg(r);o?D(e,".".concat(o,"-marker"),o).attr("className","marker ".concat(o,"-marker")).call(function(t){var e,n;"image"===o?(e=2*i,t.style("img",r).style("width",e).style("height",e).style("x",-i).style("y",-i)):(e=i/2,n=us(r)?r:Og.getSymbol(r),t.style("path",null==n?void 0:n(0,0,e)).call(S,a))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},Og.MARKER_SYMBOL_MAP=new Map,Og.registerSymbol=function(t,e){Og.MARKER_SYMBOL_MAP.set(t,e)},Og.getSymbol=function(t){return Og.MARKER_SYMBOL_MAP.get(t)};var kg,E=Og;function Og(){return null!==kg&&kg.apply(this,arguments)||this}E.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),E.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),E.registerSymbol("line",xg),E.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),E.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),E.registerSymbol("circle",bg),E.registerSymbol("point",Ro),E.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),E.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),E.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),E.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),E.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),E.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),E.registerSymbol("line",xg),E.registerSymbol("dot",wg),E.registerSymbol("dash",qo),E.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),E.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),E.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),E.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),E.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});i(Eg,_g=la),Eg.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=R($y(i),4),h=i[0],d=i[1],p=i[2],i=i[3],y=D(e,".tag-content","g").attr("className","tag-content").node(),g=D(y,".tag-marker",function(){return new E({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(g=g).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):g.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:g.style.y}),m=u.x,g=u.y,g=(D(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",g).style("text",fs(o)?"":"".concat(o)).call(S,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,m=h,g=f||"start",s=t||"top",t=(f=y).getLocalBounds(),r=n=0,"start"===g&&(n=u),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),y.getLocalBounds());D(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(y.style.zIndex||0)-1).style("x",g.min[0]-i).style("y",g.min[1]-h).style("width",null!==c?i+d+2*g.halfExtents[0]:0).style("height",null!==c?h+p+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(S,c)},Eg.defaultOptions={type:Eg.tag="tag",style:{padding:4,spacing:4}};var _g,Sg=Eg;function Eg(t){return _g.call(this,I({},Eg.defaultOptions,t))||this}var Ag,Pg,Ng={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Tg={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},Lg={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}},Cg=(i(jg,Ag=la),Object.defineProperty(jg.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(jg.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,Ry(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(jg.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=Ns(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(jg.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),jg.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=I({},Gs(Ng,[n,e]),Qy(Gs(Tg,[t,e]),r),Qy(Gs(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Lg[e]&&(i[t]=Gs(Lg,[e,t]))}),Object.keys(Lg.strict[e]).forEach(function(t){i[t]=Gs(Lg,["strict",e,t])}),I(i,Qy(Gs(this.attributes,e),"disabled"))),i},jg.prototype.render=function(t,e){var n=t.padding,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),R($y(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=D(e,".marker",function(){return new E({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(_(_({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=D(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:a).style("y",o/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(S,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");D(e,".background","rect").attr("className","background").style("zIndex",-1).call(S,c).style("height",o).style("width",a+(l?l+t:0)+2*n.halfExtents[0]+i).node()},jg.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},jg.prototype.setState=function(t){this.update({state:t})},jg.prototype.hide=function(){this.style.visibility="hidden"},jg.prototype.show=function(){this.style.visibility="visible"},jg.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},jg.defaultOptions={type:jg.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},jg);function jg(t){var n=Ag.call(this,hg({},jg.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function Fg(t){return Pg.call(this,I({},Fg.defaultOptions,t))||this}i(Fg,Pg=la),Fg.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=R($y(i),3),i=t[0],f=t[1],t=t[2],h=D(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,y=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Sg({className:"breadcrumb-item",style:_(_({x:d,y:p,text:fs(n.text)?n.id:n.text,textStyle:l},qs(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,fs(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),y.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new F.Text({className:"".concat(Fg.tag,"-separator"),id:"".concat(Fg.tag,"-separator-").concat(t),style:_(_(_(_({},Ky),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Fg.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},Fg.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},Fg.defaultOptions={type:Fg.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:_(_({},Ky),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(Bg,Ig=F.DisplayObject),Bg.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Bg.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Bg.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},Bg.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new F.Path({name:"line",style:t}))})},Bg.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new F.Path({name:"area",style:t}))})};var Ig,Rg=Bg;function Bg(t){var e=this,n=t.style,t=K(t,["style"]);return(e=Ig.call(this,I({},{type:"lines",style:{width:0,height:0}},_({style:n},t)))||this).linesGroup=new F.Group({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new F.Group({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}i(Wg,Dg=F.DisplayObject),Wg.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new F.Rect({name:"column",style:t}))})})},Wg.prototype.update=function(t){this.attr(I({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Wg.prototype.clear=function(){this.removeChildren()};var Dg,zg=Wg;function Wg(t){var e=this,n=t.style,t=K(t,["style"]);return(e=Dg.call(this,I({},{type:"column",style:{width:0,height:0}},_({style:n},t)))||this).columnsGroup=new F.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Hg(t){return 0===t.length?[0,0]:[gs(Ss(t,function(t){return gs(t)||0})),ys(_s(t,function(t){return ys(t)||0}))]}function Vg(t){for(var e=Ds(t),n=e[0].length,t=R([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function Gg(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=Xt([0,0],c,x=t[s]),u=$t([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,y,g,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=Zt(m=Qt([0,0],d,h),m,e),0!==(g=(p=Kt(x,h))+(y=Kt(x,d)))&&(p/=g,y/=g),g=Zt([0,0],m,-p),m=Zt([0,0],m,y),v=Ut([0,0],x,g),b=Xt([0,0],b=Ut([0,0],x,m),$t([0,0],d,x)),b=$t([0,0],b,Xt([0,0],d,x)),v=Xt([0,0],v=Ut([0,0],x,g=Zt([0,0],g=Qt([0,0],b,x),-p/y)),$t([0,0],h,x)),v=$t([0,0],v,Xt([0,0],h,x)),b=Ut([0,0],x,m=Zt([0,0],m=Qt([0,0],x,v),y/p)),o&&(v=Xt([0,0],v=$t([0,0],v,c),u),b=Xt([0,0],b=$t([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function qg(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return re([e===n?"M":"L"],R(t),!1)});return e?t.reverse():t}function Yg(t,e){if(void 0===e&&(e=!1),t.length<=2)return qg(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Zs(a,n.slice(-2))||n.push.apply(n,re([],R(a),!1))}var o=Gg(n,!1);return e?o.unshift(re(["M"],R(t[r-1]),!1)):o.unshift(re(["M"],R(t[0]),!1)),o}function Ug(t,e,n){t=Ds(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(Kg,Xg=la),Object.defineProperty(Kg.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Ds(t),ws(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"data",{get:function(){return this.attributes.isStack?Vg(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"baseline",{get:function(){var t=this.scales.y,e=R(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"linesCfg",{get:function(){var t,n,r,i,a,e,o,s,l,c=this,u=this.attributes,f=u.areaStyle,h=u.isStack,d=u.lineStyle,p=u.smooth,u=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,n=(e={type:"line",x:e,y:t}).x,r=e.y,i=(e=R(r.getOptions().range||[0,0],2))[0],a=e[1],i<a&&(e=R([i,a],2),a=e[0],i=e[1]),t=y.map(function(t){return t.map(function(t,e){return[n.map(e),xs(r.map(t),a,i)]})}),e=[],f&&(y=this.baseline,e=h?(p?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Yg(o),l=void 0,l=0===i?Ug(s,e,n):(a=Yg(t[i-1],!0),o=o[0],a[0][0]="L",re(re(re([],R(s),!1),R(a),!1),[re(["M"],R(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=qg(t[i]),s=void 0,s=0===i?Ug(o,e,n):((a=qg(t[i-1],!0))[0][0]="L",re(re(re([],R(o),!1),R(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,y):(o=p,s=u,l=y,t.map(function(t){return Ug((o?Yg:qg)(t),s,l)}))),{lines:t.map(function(t,e){return _({stroke:c.getColor(e),path:(p?Yg:qg)(t)},d)}),areas:e.map(function(t,e){return _({path:t,fill:c.getColor(e)},f)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,a=t.isStack,o=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};a&&(s=Vg(s));var e=this.createScales(s),l=e.x,c=e.y,e=R(Hg(s),2),n=e[0],e=e[1],u=new Zp({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return _(_({fill:i.getColor(r)},o),a?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Kg.prototype.render=function(t,e){this.containerShape=D(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=D(e,".".concat(r),function(){return new("line"===n?Rg:zg)({className:r,style:i})}).call(S,i).node()},Kg.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},Kg.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Kg.prototype.getColor=function(t){var e=this.attributes.color;return hs(e)?e[t%e.length]:us(e)?e.call(null,t):e},Kg.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,a=e.nice,a=void 0===a||a,o=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,c=R(Hg(t),2),u=c[0],c=c[1];return{type:n,x:"line"===n?new Zp({domain:[0,t[0].length-1],range:[0,l]}):new Dp({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new Zp({domain:[null!=o?o:u,null!=e?e:c],range:[s,0],nice:a})}},Kg.tag="sparkline",Kg.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var Xg,$g,Zg=Kg;function Kg(t){return Xg.call(this,I({},Kg.defaultOptions,t))||this}function Jg(){return null!==$g&&$g.apply(this,arguments)||this}function Qg(e,n){return i(t,r=F.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(I({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,hg({},{style:n},t))||this;return t.descriptor=e,t}var r}i(Jg,$g=F.CustomElement);var tm=Qg({render:function(t,e){function n(t,e,n,r,i){D(f,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",f.style.stroke).style("strokeOpacity",f.style.strokeOpacity).style("lineWidth",f.style.lineWidth)}var r=t.size,i=t.radius,a=t.stroke,o=t.fill,s=t.lineWidth,l=t.orient,c=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,u=2.4*r,f=D(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-u/2).style("width",r).style("height",u).style("fill",o||"#fff").style("fillOpacity",c||1).style("stroke",a||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),o=1/3*r,c=2/3*r,a=.25*u,s=.75*u;n(0,o,a,o,s),n(0,c,a,c,s),f.setOrigin(r/2,u/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});i(am,em=la),am.prototype.render=function(t,e){var n,r,i,a=t.iconCfg,t=t.textCfg;i=e,a=((n=a)||{}).type,r="handle-icon ".concat(a,"-handle"),M(i).selectAll(".handle-icon").data(a?[a]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new E({className:r,name:"icon",style:n}):new tm({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),D(e,".".concat(a="handle-text"),"text").attr("className",a).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(S,i)};var em,nm,rm,im=am;function am(){return null!==em&&em.apply(this,arguments)||this}function om(t){var a=nm.call(this,I({},om.defaultOptions,t))||this;return a.onSelectionMouseenter=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onSelectionMouseleave=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(tg(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([r,n])),a.selectionWidth=0,a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(tg(t)),e=t-a.prevPos;if(e){var n=a.getRatio(e);switch(a.target){case"start":a.setValuesOffset(n);break;case"end":a.setValuesOffset(0,n);break;case"selection":a.setValuesOffset(n,n);break;case"background":a.selectionWidth+=n,a.setValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort())}a.prevPos=t}},a.onDragEnd=function(){a.removeEventListener("mousemove",a.onDragging),a.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChanged=function(t){t=new F.CustomEvent("valueChanged",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function sm(t){var o=rm.call(this,I({},sm.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new F.CustomEvent("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new F.CustomEvent("valueChanged",t),o.dispatchEvent(e))},o.onTrackClick=function(t){var e=o.attributes.thumbLen,n=R(o.getLocalPosition(),2),r=n[0],n=n[1],i=R(o.padding,4),a=i[0],i=i[3],r=o.getOrientVal([r+i,n+a]),i=o.getOrientVal(tg(t))-e/2,n=o.valueOffset(i-r,!0);o.setValue(n)},o.onThumbMouseenter=function(){o.thumbShape.attr(o.getStyle("thumbStyle","active"))},o.onTrackMouseenter=function(){o.trackShape.attr(o.getStyle("trackStyle","active"))},o.onThumbMouseleave=function(){o.thumbShape.attr(o.getStyle("thumbStyle"))},o.onTrackMouseleave=function(){o.trackShape.attr(o.getStyle("trackStyle"))},o.onDragStart=function(t){t.stopPropagation(),o.prevPos=o.getOrientVal(tg(t)),document.addEventListener("mousemove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchmove",o.onDragging),document.addEventListener("touchcancel",o.onDragEnd)},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(tg(t)),e=t-o.prevPos;o.setOffset(e),o.prevPos=t},o.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchmove",o.onDragging),document.removeEventListener("touchcancel",o.onDragEnd)},o}i(om,nm=la),Object.defineProperty(om.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"backgroundShapeCfg",{get:function(){return _(_({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=K(t,["padding"]),e=R($y(e),4),n=e[0],r=e[1],i=e[2],e=e[3],a=this.availableSpace,o=a.width,a=a.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return _(_({x:s/2+e,y:s/2+n},t),{zIndex:0,width:o-s-e-r,height:a-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=R($y(e),4),r=e[0],i=e[1],a=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),om.prototype.getValues=function(){return this.values},om.prototype.setValues=function(t){this.values=t,this.update({values:t})},om.prototype.getNames=function(){return this.names},om.prototype.setNames=function(t){this.names=t},om.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return D(a,".".concat(t),function(){return new im({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=D(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(S,this.availableSpace).call(S,Qy(i)).node(),a=(D(this.backgroundShape=e,".slider-sparkline",function(){return new Zg({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),D(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=D(a,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(S,this.calcMask()).call(S,Qy(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},om.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,a=R(this.getValues(),2),o=a[0],a=a[1],t=R(t||[o,a],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=R([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?o===i&&a===t?[i,t]:[i,l+i]:r<t?a===r&&o===s?[s,r]:[r-l,r]:[Hy(s,e),Hy(t,e)]},om.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):Qy(Gs(this.attributes,t),e,!0)},om.prototype.calcMask=function(t){var t=R(this.getSafetyValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},om.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=R(this.getSafetyValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},om.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,a=this.getHandleCfg(t),o=a.spacing,s=a.formatter,a=a.textStyle,l=this.getHandleSize(t),c=this.getSafetyValues(),u=this.availableSpace,f=u.width,u=u.height,h=this.calcMask(),d=h.x,p=h.y,y=h.width,h=h.height,r=R("start"===t?[r[0],c[0]]:[r[1],c[1]],2),c=s(r[0],r[1]),s=new F.Text({style:_(_({},a),{text:c})}),r=rg(s),a=r.width,r=r.height,s=(s.destroy(),0),g=0,l=l/2,m="center";return"horizontal"===i?(e=(i=o+l)+a/2,m="start"===t?(s=0<(n=d-i-a)?-e:e,0<n?"end":"start"):(s=(n=a<f-d-y-i)?e:-e,n?"start":"end")):(a=o+l,g="start"===t?r<p-l?-a:a:r<u-p-h-l?a:-a),{x:s,y:g,text:c,textAlign:m}},om.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return _(_({},e),this.calcHandleText(t))},om.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,a=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",_(_({},r),{cursor:a,size:t,symbol:i})):(e="default",_(_({},r),{cursor:a,size:t}));return _({orient:n,type:e},i)},om.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:_(_({},this.getHandleTextShapeCfg(t)),i)}},om.prototype.getHandleCfg=function(t){var e=Gs(this.attributes,"handle"),n=e.start,r=e.end,e=K(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),I({},e,i)},om.prototype.getHandleSize=function(t){var e,t=this.getHandleCfg(t).size;return t||(e=(t=this.attributes).width,t=t.height,Math.floor((this.getOrientVal([t,e])+4)/2.4))},om.prototype.getOrientVal=function(t){var t=R(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},om.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=R(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},om.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},om.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},om.defaultOptions={type:om.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},i(sm,rm=la),Object.defineProperty(sm.prototype,"padding",{get:function(){return $y(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(sm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=R(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(sm.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(sm.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=Gs(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),sm.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,a=t.thumbStyle,o=t.value,s=t.thumbLen,t=t.orient,e=D(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(S,Qy(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=D(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(S,Qy(a)).node(),this.trackShape=e},sm.prototype.getValue=function(){return this.style.value},sm.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:xs(t,r,e)}),this.onValueChanged(n)},sm.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},sm.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*xs(t,i,n)},sm.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),Qy(Gs(this.attributes,t),e)},sm.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},sm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},sm.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},sm.defaultOptions={type:sm.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};Object.defineProperty(cm.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),cm.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},cm.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},cm.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},cm.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},cm.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},cm.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},cm.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},cm.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var lm=cm;function cm(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function um(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=R(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=R(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function fm(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===y?d=(a+o)/2:"bottom"!==y&&"baseline"!==y||(d=o)),R(n,4)),c=p[0],y=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-y,u+l+n,f+i+(void 0===c?y:c)),e.setEulerAngles(r),t.rotatedPoints(r*Xy,h,d)}function hm(t,e,n){t=fm(new lm,t,n),e=fm(new lm,e,n);return um(e,[t[0],t[1],t[2],t[3]])||um(e,[t[0],t[1],t[4],t[5]])||um(e,[t[4],t[5],t[6],t[7]])||um(e,[t[2],t[3],t[6],t[7]])}function dm(t,e,n){return"top"===t||"bottom"===t?e:n}function pm(t,e,n){return"left"===t||"right"===t?e:n}function ym(t,e,n){return"outside"===t?e:n}var gm=function(t,e,n){return"left"===t?e:n},mm=function(t,e,n){return"right"===t?e:n},vm=function(t,e,n){return"left"===t||"top"===t||"inside"===t?e:n};function bm(t,r){var i;return re([],R(t.reduce(function(t,e,n){return n&&i&&hm(i,e,r)?(t.add(i),t.add(e)):i=e,t},new Set)),!1)}var ba={style:{title:{content:"",rotate:void 0,maxLength:260},ticks:[],ticksThreshold:100,tickLine:{len:6},subTickLine:{len:4,count:0},label:{type:"text",alignTick:!0,tickPadding:2,margin:[0,0,0,0],overlapOrder:["autoRotate","autoEllipsis","autoHide"],autoRotate:!1,autoEllipsis:!1,autoHide:!1,autoHideTickLine:!0,showLast:!0,showFirst:!0,optionalAngles:[0,45,90],minLabel:0,minLength:14,maxLength:160,ellipsisStep:" "},verticalFactor:1}},xm=(I({},ba,{style:{type:"arc"}}),I({},ba,{style:{}}),{year:[["year","second"],["year","day"],["month","day"],["day","day"]],month:[["month","day"],["day","day"]],day:[["month","day"],["day","day"]],hour:[["hour","second"],["hour","minute"],["hour","hour"]],minute:[["minute","second"],["second","second"]],second:[["second","second"]]});function wm(t,r){for(var i,a=t.map(function(t,e){return[t.id,{text:t.style.text,value:t.style.tip||t.style.text,idx:e}]}),o=new Map(a),e=Ss(a,function(t){t=R(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,n=_s(a,function(t){t=R(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,s=(n=n,e=R([lg(e=e),lg(n)],2),n=e[0],e=e[1],n.getFullYear()!==e.getFullYear()?"year":n.getMonth()!==e.getMonth()?"month":n.getDay()!==e.getDay()?"day":n.getHours()!==e.getHours()?"hour":n.getMinutes()!==e.getMinutes()?"minute":"second"),l=new Date("1970-01-01 00:00:00"),c=zy(t[0]),u=0;u<xm[s].length;u+=1){var f=xm[s][u];if(tl(ug(l,cg(f)),c)<r){i=f;break}i=f}return function(t,e){var n,e=o.get(e.id).idx;return 0===e?t:(e=null==(e=a[e-1])?void 0:e[1].text,t=new Date(t),n=i,fg(new Date(e),s)!==fg(t,s)&&(n=function(t,e,n,r){for(var i=[],a=R(t,2)[1],o=og.indexOf(a),s=0;s<=o;s+=1){var l=[og[s],a];if(tl(ug(e,cg(l)),r)<n){i=l;break}}return i}(i,t,r,c)),ug(t,cg(n)))}}function Mm(o,s,t){if(!(s.length<=1))for(var e=t.ellipsisStep,n=t.minLength,r=t.maxLength,i=t.margin,l=void 0===i?[]:i,c=t.labelType,u=zy(s[0]),a=Dy(e,u)||1,f=Dy(n,u)||1,i=Dy(r,u),h=(!fs(i)&&i!==1/0||(i=Math.max.apply(null,s.map(function(t){return t.getBBox().width}))),Date.now()),d=s.slice(),t=R(l,4),e=(t[0],t[1]),p=void 0===e?0:e,n=(t[2],t[3]),y=void 0===n?p:n,g=function(e){var t,n,r,i,a;return(d=bm(s,l)).length<1||300<Date.now()-h?{value:void 0}:(a=function(t,e){return""},n=dm(o,e-y-p,e),a="time"===c?wm(s,n):"number"===c?(n=n,r=(t=s).map(function(t,e){return{text:t.style.text,value:Number(t.style.tip||t.style.text)}}),r=Number(_s(r,function(t){t=t.text;return(null==t?void 0:t.length)||0}).value),t=zy(t[0]),i=Vy(r),tl(i,t)<=n?function(t,e){return Vy(Number(t))}:(i=Gy(r),tl(i,t)<=n?function(t,e){return Gy(Number(t),1)}:function(t,e){return Number(t).toExponential()})):function(t){return Ry(t,e,u)},void d.forEach(function(t,e){var n=t.style.tip||t.style.text,n=(t.style.tip=n,a.call(null,n,t));t.attr("text",n)}))},m=i;f+a<m;m-=a){var v=g(m);if("object"==typeof v)return v.value}}var km=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};function Om(t,e,n){var r=e.length;if(!(r<=1||2===r&&null!=n&&n.showFirst&&null!=n&&n.showLast)){var i,a,o,s=km,l=2,c=e.slice(),u=e.slice(),f=Date.now(),h=Math.min.apply(null,e.map(function(t){return t.getBBox().width}))||1;for("top"!==t&&"bottom"!==t||(t=ig(e[0]).left,e=ig(e[r-1]).right,e=Math.abs(e-t)||1,l=Math.max(Math.floor(r*h/e),l)),null!=n&&n.showFirst&&(i=c.splice(0,1)[0]),null!=n&&n.showLast&&(a=c.splice(-1,1)[0],c.reverse());bm((a?re(re([a],R(u),!1),[i],!1):re([i],R(u),!1)).filter(function(t){return vg(t)}),null==n?void 0:n.margin).length;)if(a&&!i&&l%2==0?c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}):a&&i&&c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}),u=s(((o=c).forEach(function(t){return t.style.visibility="visible"}),o),{seq:l}),l++,200<Date.now()-f)return}}function _m(a,t,e){for(var n=e.optionalAngles,o=void 0===n?[0,45,90]:n,r=e.margin,i=function(i){if(t.forEach(function(t){return e=a,t=t,n=o[i],t.setEulerAngles(n),void(n&&(r=vm(e,-1,1),e=gm(e,"end",mm(e,"start",Yy(Uy(r,n),"left",qy(Uy(r,n),"right")))),t.style.textAlign=e));var e,n,r}),bm(t,r).length<1)return"break"},s=0;s<o.length&&"break"!==i(s);s++);}var Sm=new Map([["autoHide",{getDefault:function(){return Om},equidistance:Om,greedy:function(t,e,n){var r,i=e.length;i<=1||2===i&&null!=n&&n.showFirst&&null!=n&&n.showLast||e.slice().forEach(function(t,e){e&&r&&hm(r,t,null==n?void 0:n.margin)?e===i-1&&null!=n&&n.showLast?r.style.visibility="hidden":t.style.visibility="hidden":r=t})}}],["autoRotate",{getDefault:function(){return _m}}],["autoEllipsis",{getDefault:function(){return Mm},ellipsis:Mm}]]);function Em(t,e,n){var r,t=Array.from(t||[]).map(function(t,e){return _({id:"".concat(e)},t)}),i=t.length,a=t;return"number"==typeof e&&e<i&&(r=Math.ceil(i/e),a=t.filter(function(t,e){return e%r==0||e===i-1})),n&&1!==a[a.length-1].value&&a.push({value:1,id:"append"}),a}function Am(o,s){return function(i){var t,a;o&&(t=void 0===(t=o.overlapOrder)?[]:t,a=_({labelType:o.type},qs(o,["optionalAngles","minLength","maxLength","ellipsisStep","showFirst","showLast","margin"])),t.forEach(function(t){var e,n=Sm.get(t),r=o[t];n&&r&&(t=t,e=o)&&("autoRotate"!==t||fs(e.rotate))&&(t=n.getDefault(),"function"==typeof r?t=r:"object"==typeof r?(t=n[r.type]||Us,a=_(_({},a),r.cfg)):"string"==typeof r&&(t=n[r]||Us),t(s,i,a))}))}}function Pm(t,n,e){e&&t.forEach(function(t,e){e=n[e];e&&(e.style.visibility=t.style.visibility)})}function Nm(t,e,n,r,i,a){D(t,".axis-title","text").attr("className","axis-title").style("text",(null==a?void 0:a.content)||"").style("x",e).style("y",n).style("fill","black").style("fontSize",12).style("fontWeight","lighter").style("textAlign",r).style("textBaseline",i).style("transform","rotate(".concat((null==a?void 0:a.rotate)||0,"deg)")).style("visibility",a?"visible":"hidden").call(S,(null==a?void 0:a.style)||{})}function Tm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function Lm(t,n,r,e){void 0===e&&(e=""),M(t).selectAll(".axis-".concat(e,"tick")).data(r?n:[],function(t){return t.id}).join(function(t){return t.append(function(t){return new F.Line({className:"axis-".concat(e,"tick"),style:t})}).style("stroke","#416180").style("lineWidth",.5).style("strokeOpacity","sub"===e?.45:.65).style("visibility","visible").each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)}).style("visibility","visible")},function(t){return t.remove()})}function Cm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function jm(t,e){var n=zy(t),e=Dy(e,n);t.attr("tip",null),vg(e)&&e<2*t.getBounds().halfExtents[0]&&(e=Ry(t.style.text||"",e,n,"..."),t.attr("tip",t.style.text),t.attr("text",e))}function Fm(t,e,n,r,i){M(t).selectAll(".".concat(e)).data(n,function(t){return t.id}).join(function(t){return t.append("text").attr("className",e).style("fontFamily","sans-serif").style("fontSize",12).style("fontWeight","normal").call(S,i||{}).each(function(t,e){this.attr(t),jm(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),Cm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),jm(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),Cm(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()})}function Im(t,e,n){Fm(t,"axis-label",(n=void 0===n?{}:n)?e:[],n,{fill:"#000",fontWeight:"lighter"})}function Rm(t,e,n,r,i,a){D(t,".axis-".concat(e,"-arrow"),function(){return new E({})}).attr("className","axis-arrow$$ axis-".concat(e,"-arrow")).style("visibility",a?"visible":"hidden").style("symbol","axis-arrow").style("x",n).style("y",r).style("size",8).style("lineWidth",.5).style("fill","grey").style("stroke","grey").style("fillOpacity",.85).style("strokeOpacity",.85).style("transformOrigin","left").style("transform","rotate(".concat(i,"deg)")).call(S,a||{})}function Bm(t,e,n,r){var i,a,o,s;void 0===r&&(r={}),D(t,".axis-line","path").attr("className","axis-line").style("visibility",r?"visible":"hidden").style("stroke","grey").style("lineWidth",.5).style("strokeOpacity",.85).style("path",e).call(S,(null==r?void 0:r.style)||{}),n&&(r=(e=(null==r?void 0:r.arrow)||{}).start,e=e.end,n=R(n,2),i=(a=R(n[0],2))[0],a=a[1],o=(n=R(n[1],2))[0],n=n[1],s=Math.atan((n-a)/(o-i))/Math.PI*180/2,i===o?s=n<a?45:-45:a===n&&(s=o<i?0:90),Rm(t,"start",i,a,s,r),Rm(t,"end",o,n,s+90,e))}function Dm(t,e,n,r){var i,a,o,s,l;return e?(a=t[0],o=e,s=(a=R(a,2))[0],a=a[1],s=(o=R(o,2))[0]-s,o=o[1]-a,i=Math.sqrt(s*s+o*o),l=r?0:1,n?"M".concat(e[0],",").concat(e[1]-i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]+i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]-i," Z"):t.reduce(function(t,e,n){return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(l,",")).concat(e[0],",").concat(e[1])},"")):""}function zm(t,e,n,r,i){return"circle"===e?Dm(t,n,r,i):(e=t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},""),"".concat(e).concat(r?"Z":""))}i(Vm,Wm=la),Vm.prototype.render=function(t,e){var n,r,i,a,o=t.items,s=void 0===o?[]:o,l=t.type,c=t.center,o=t.lineStyle,u=t.alternateColor,f=t.closed,t=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:zm(t.points,l,c,f)}}),h=(n=t,r={style:o},M(e).selectAll(".grid-line").data(n,function(t){return t.id}).join(function(t){return t.append("path").attr("className","grid-line").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()}),[]);if(u)for(var d=Array.isArray(u)?u:[u,"transparent"],p=0;p<s.length-1;p++){0===p&&2<s[0].points.length&&(y=zm(s[0].points,l,c),h.push({path:y,fill:d[h.length%2]}));var y=zm(s[p].points,l,c,f),g=zm(s[p+1].points.slice().reverse(),l,c,f,!0),m=void 0,m=f?"".concat(y," ").concat(g):"".concat(y," L").concat(g.slice(1)," Z");h.push({path:m,fill:d[h.length%2]})}i=h,M(e).selectAll(".grid-region").data(i,function(t,e){return e}).join(function(t){return t.append("path").attr("className","grid-region").each(function(t,e){this.attr(t),Tm(this,e,i,null==a?void 0:a.style)})},function(t){return t.each(function(t,e){this.attr(t),Tm(this,e,i,null==a?void 0:a.style)})},function(t){return t.remove()})};var Wm,Hm=Vm;function Vm(){return null!==Wm&&Wm.apply(this,arguments)||this}function Gm(t,e){e?D(t,".axis-grid",function(){return new Hm({})}).attr("className","axis-grid").call(function(t){return t.node().update(e)}):(t=t.querySelector(".axis-grid"))&&t.remove()}function qm(t,e,n,r){void 0===r&&(r=0);var t=R(t,2),i=R(t[0],2),a=i[0],i=i[1],t=R(t[1],2),o=t[0],t=t[1],e=R([e*(o-a)+a,e*(t-i)+i],2),s=e[0],e=e[1],o=Jt([0,0],[Math.abs(o-a),-Math.abs(t-i)]),a=vm(n,-1,1),n=R(Zt([0,0],(t=o,!(i=[])?(i[0]=t[1],i[1]=-1*t[0]):(i[0]=-1*t[1],i[1]=t[0]),i),r),2),o=n[0],t=n[1];return[[s,e],[s+Uy(a,o),e+Uy(a,t)]]}function Ym(o,s,t,e,n){var l=(null==n?void 0:n.len)||0,c=t,n=e||{},u=n.formatter,t=n.tickPadding,f=void 0===t?0:t,e=n.offset,h=void 0===e?0:e,t=n.alignTick,d=void 0===t||t,e=n.rotate,p=void 0===e?0:e,y=vm(c,-1,1);return Array.from(o).map(function(t,e){var n=t.value,r=(d||(n=((e===o.length-1?1:null==(r=o[e+1])?void 0:r.value)+n)/2+(i||0)/2),R(qm(s,n,c,l+f),2)),i=R(r[1],2),n=i[0],i=i[1],e=u?u(t,e):t.text,a=dm(c,"center",gm(c,"end","start"));return p&&(a=gm(c,"end",mm(c,"start",Yy(Uy(y,p),"left",qy(Uy(y,p),"right"))))),{id:"label-".concat(t.id),data:t,x:n+dm(c,h,0),y:i+pm(c,h,0),text:e,textAlign:a,textBaseline:pm(c,"middle","top"===c?"bottom":"top"),transform:"rotate(".concat(p||0,"deg)")}})}E.registerSymbol("axis-arrow",function(t,e,n){var r=t+2*n;return[["M",t,e],["L",r,e],["L",r-n,e-n],["L",r+n,e],["L",r-n,e+n],["L",r,e]]});var Um=Qg({render:function(t,e){var n=t.startPos,r=t.endPos,i=t.verticalFactor,a=t.ticksThreshold,o=t.appendTick,s=t.axisLine,l=t.ticks,l=void 0===l?[]:l,c=t.label,c=void 0===c?{}:c,u=t.tickLine,f=t.subTickLine,h=t.title,t=t.grid,n=[n||[0,0],r||[0,0]],r=R(n,2),d=R(r[0],2),p=d[0],d=d[1],r=R(r[1],2),y=r[0],r=r[1],g=Jt([0,0],[y-p,r-d]),g=(void 0===(g=g)&&(g=[0,0]),void 0===(i=i||1)&&(i=1),Math.abs(g[0])>Math.abs(g[1])?1===i?"bottom":"top":-1===i?"left":"right"),i=Em(l,a,o);Gm(e,t);Bm(D(e,".axis-line-group","g").attr("className","axis-line-group").node(),"M".concat(p,",").concat(d," L").concat(y,",").concat(r),n,s);l=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=g,b=(null==u?void 0:u.len)||0;Lm(l,Array.from(i).map(function(t){var e=R(qm(m,t.value,v,b),2),n=R(e[0],2),r=n[0],n=n[1],e=R(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),u);var m,v,b,a="axis-subtick-group",o=D(e,".".concat(a),"g").attr("className",a).node();x=i,w=n,M=g,k=null==f?void 0:f.count,O=null==f?void 0:f.len,void 0===k&&(k=0),void 0===O&&(O=0);Lm(o,Array.from(x).map(function(o,s){return s===x.length-1?[]:Array(k).fill(null).map(function(t,e){var n=(((null==(n=x[s+1])?void 0:n.value)||1)-o.value)/(k+1),n=o.value+n*(e+1),n=R(qm(w,n,M,O),2),r=R(n[0],2),i=r[0],r=r[1],n=R(n[1],2),a=n[0],n=n[1];return{id:"sub-".concat(o.id,"-").concat(e),x1:i,y1:r,x2:a,y2:n}})}).flat(),f,"sub");var x,w,M,k,O,_,S,E,t="axis-label-group",p=D(e,".".concat(t),"g").attr("className",t).node(),d=(Im(p,Ym(i,n,g,c,u),c),p.querySelectorAll(".axis-label")),y=p.querySelectorAll(".axis-tick"),r=(Am(c,g)(d),Pm(d,y,null==c?void 0:c.autoHideTickLine),R(l.getBounds().halfExtents,2)),a=r[0],o=r[1],f=R(p.getBounds().halfExtents,2),t=f[0],i=f[1],d=+((null==(u=null==s?void 0:s.style)?void 0:u.lineWidth)||0),c=(y=g,c=2*(a+t)+d,l=2*(o+i)+d,r=h,f=(p=R(p=n,2))[0],p=p[1],s=(f=R(f,2))[0],f=f[1],u=(p=R(p,2))[0],p=p[1],g=Math.min(s,u),a=Math.max(s,u),t=Math.min(f,p),o=Math.max(f,p),i=g,d=t,_=n=0,S="bottom",E="start","left"===y||"right"===y?(n=c+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(d=(f+p)/2),"end"===(null==r?void 0:r.titleAnchor)&&(d=o,S="top"),"left"===y&&(E="end",n*=-1)):(_=l+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(i=(s+u)/2,E="center"),"end"===(null==r?void 0:r.titleAnchor)&&(i=a,E="end"),"top"===y&&(_*=-1),"bottom"===y&&(S="top")),void 0!==(null==r?void 0:r.positionX)&&(i=g+r.positionX,E="start"),void 0!==(null==r?void 0:r.positionY)&&(d=t+r.positionY,S="bottom"),{x:i+n,y:d+_,textAlign:E,textBaseline:S});Nm(e,c.x,c.y,c.textAlign,c.textBaseline,h)}},ba.style),Xm=Math.PI,$m=Math.abs,Zm=Math.cos,Km=Math.sin,Jm=R([2*Xm],1)[0];function Qm(t,e,n,r,i){void 0===i&&(i=0);var t=R(t,2),a=t[0],t=t[1],n=n*Xy,o=e*Zm(n),s=e*Km(n),r=vm(r,-1,1);return[[a+o,t+s],[a+(e+Uy(r,i))*Zm(n),t+(e+Uy(r,i))*Km(n)]]}function tv(t){var e;return ks(t[0],0)?e="center":0<t[0]?e="start":t[0]<0&&(e="end"),e}function ev(t,h,d,p,y,e,g,m){void 0===m&&(m=0);var v=e,b=vm(v,-1,1),e=g.tickPadding,x=void 0===e?0:e,w=g.formatter,M=g.align,k=g.rotate;return Array.from(t).map(function(t,e){var n,r=(d-h)*t.value+h,i=m+x,a=270<=(a=r)?(a-360)%360:a,o=R(Qm(y,p,r,v,i),2),o=R(o[1],2),s=o[0],o=o[1],l=w?w(t,e):t.text,c="center",u="baseline",f=[Uy(b,s-y[0]),Uy(b,o-y[1])];return"radial"===M?(u="middle",(90<=a||a<-90)&&(a+=180),c=tv(f),ks(a,-90)&&(c=ym(v,"start","end")),ks(a,270)&&(c=ym(v,"end","start"))):"tangential"===M?(c="center",u="bottom",0<=a&&a<180?(a+=270,e="function"==typeof(null==g?void 0:g.style)?g.style(t,e):null!=(e=null==(e=null==g?void 0:g.style)?void 0:e.fontSize)?e:14,r=R(Qm(y,p,r,v,i+e),2),s=(i=R(r[1],2))[0],o=i[1]):a+=90):(a=null!=k?k:0,c=tv(f),ks((e=f)[1],0)?n="middle":0<e[1]?n="top":e[1]<0&&(n="bottom"),u=n),{id:"label-".concat(t.id),x:s,y:o,text:l,textAlign:c,textBaseline:u,transform:"rotate(".concat((a||0).toFixed(0),"deg)"),data:t}})}var nv,rv=Qg({render:function(t,e){var n=t.startAngle,n=void 0===n?0:n,r=t.endAngle,r=void 0===r?0:r,i=t.center,a=t.radius,o=t.axisLine,s=t.tickLine,l=t.subTickLine,c=t.label,c=void 0===c?{}:c,u=t.ticks,I=t.title,f=t.grid,h=t.ticksThreshold,d=t.appendTick,t=t.verticalFactor,u=Em(void 0===u?[]:u,h,d),h=-1===t?"inside":"outside",d=(Gm(e,f),D(e,".axis-line-group","g").attr("className","axis-line-group").node());t=i,f=a,g=n/180*Math.PI,F=r/180*Math.PI,void 0===f&&(f=0),void 0===g&&(g=0),void 0===F&&(F=0),p=(t=R(t=void 0===t?[0,0]:t,2))[0],t=t[1],C=(j=R([f,f],2))[0],j=j[1],k=(O=R([p+f*Zm(g),t+f*Km(g)],2))[0],O=O[1],y=(f=R([p+f*Zm(F),t+f*Km(F)],2))[0],f=f[1];Bm(d,(d=$m(F-g))===Jm?"M".concat(p,",").concat(t-j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t+j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t-j):(d=Xm<d?1:0,F=F<g?0:1,"M".concat(p,",").concat(t,",L").concat(k,",").concat(O,",A").concat(C,",").concat(j,",0,").concat(d,",").concat(F,",").concat(y,",").concat(f,",L").concat(p,",").concat(t)),void 0,o);var p,y,g=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=r,b=a,x=i,w=h,void 0===(M=null==s?void 0:s.len)&&(M=0);Lm(g,Array.from(u).map(function(t){var e=(v-m)*t.value+m,e=R(Qm(x,b,e,w,M),2),n=R(e[0],2),r=n[0],n=n[1],e=R(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),s);var m,v,b,x,w,M,k="axis-subtick-group",O=D(e,".".concat(k),"g").attr("className",k).node();_=u,S=n,E=r,A=a,P=i,N=h,T=null==l?void 0:l.count,L=null==l?void 0:l.len,void 0===T&&(T=0),void 0===L&&(L=0);Lm(O,Array.from(_).map(function(o,s){return Array(T).fill(null).map(function(t,e){var n=(((null==(n=_[s+1])?void 0:n.value)||1+_[0].value)-o.value)/(T+1),n=o.value+n*(e+1),n=R(Qm(P,A,(E-S)*n+S,N,L),2),r=R(n[0],2),i=r[0],r=r[1],n=R(n[1],2),a=n[0],n=n[1];return{id:"sub-".concat(o.id,"-").concat(e),x1:i,y1:r,x2:a,y2:n}})}).flat(),l,"sub");var _,S,E,A,P,N,T,L,C="axis-label-group",j=D(e,".".concat(C),"g").attr("className",C).node(),d=(Im(j,ev(u,n,r,a,i,h,c,null==s?void 0:s.len),c),j.querySelectorAll(".axis-label")),F=j.querySelectorAll(".axis-tick");Am(c,h)(d),Pm(d,F,null==c?void 0:c.autoHideTickLine),Nm(e,i[0],i[1],"center","middle",I)}},hg({startAngle:-90,endAngle:270,center:[0,0],label:{tickPadding:2,style:{},align:"normal"}},ba.style||{})),iv=(i(av,nv=F.CustomElement),av.prototype.connectedCallback=function(){this.render(),this.bindEvents()},av.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),t.disabled&&(this.active=!1,this.disabled=!0),this.render()},av.prototype.setState=function(t){"disabled"===t?(this.active=!1,this.disabled=!0):this.disabled=!1,this.render()},av.prototype.render=function(){var t=this.style,e=t.size,e=void 0===e?8:e,n=t.symbol,r=t.markerStyle,t=t.backgroundStyle,i=R($y(this.style.margin),4),a=i[0],o=i[1],s=i[2],i=i[3],l=R($y(this.style.padding),4),c=l[0],u=l[1],f=l[2],l=l[3],u=(e-u-l)/2,f=(e-c-f)/2,o=(D(this,".container","rect").attr("className","container").style("x",-(u+l+i)).style("y",-(f+c+a)).style("width",e+o+i).style("height",e+a+s).style("fill","transparent").style("cursor",this.disabled?"not-allowed":"pointer").style("zIndex",1),t||{}),i=o.active,a=o.disabled,s=K(o,["active","disabled"]),t=(D(this,".background","rect").attr("className","background").style("x",-(u+l)).style("y",-(f+c)).style("width",e).style("height",e).call(S,s).call(S,this.active?i:{}).call(S,this.disabled?a:{}),"function"==typeof n?n:av.getSymbol(n||"")),o=r||{},l=o.active,c=o.disabled,e=K(o,["active","disabled"]);D(this,".marker","path").attr("className","marker").style("x",0).style("y",0).style("path",null==t?void 0:t(0,0,Math.min(u,f))).call(S,e).call(S,this.active?l:{}).call(S,this.disabled?c:{})},av.prototype.bindEvents=function(){var e=this,n=M(this).select(".marker"),r=M(this).select(".background");M(this).on("pointerup",function(){e.disabled||(e.active=!0)}),M(this).on("pointermove",function(){var t;e.disabled||(e.active=!0,S(n,null==(t=e.style.markerStyle)?void 0:t.active),S(r,null==(t=e.style.backgroundStyle)?void 0:t.active))}),M(this).on("pointerout",function(){e.disabled||(e.active=!1,S(n,Ys(e.style.markerStyle||{},["active"])),S(r,Ys(e.style.backgroundStyle||{},["active"])))})},av.MARKER_SYMBOL_MAP=new Map,av.registerSymbol=function(t,e){av.MARKER_SYMBOL_MAP.set(t,e)},av.getSymbol=function(t){return av.MARKER_SYMBOL_MAP.get(t)},av);function av(t){t=nv.call(this,t)||this;return t.active=!1,t.disabled=!1,t.disabled=t.style.disabled||!1,t}iv.registerSymbol("timeline-prev-button",function(t,e,n){return[["M",t+n,e+n],["L",t,e],["L",t+n,e-n],["M",t,e+n],["L",t-n,e],["L",t,e-n]]}),iv.registerSymbol("timeline-next-button",function(t,e,n){return[["M",t,e+n],["L",t+n,e],["L",t,e-n],["M",t-n,e+n],["L",t,e],["L",t-n,e-n]]}),iv.registerSymbol("timeline-play-button",function(t,e,n){return[["M",t+2,e+3],["L",t+2,e-3],["M",t-2,e+3],["L",t-2,e-3]]}),iv.registerSymbol("timeline-stop-button",function(t,e,n){return[["M",t+3,e],["L",t-1.5,e-1.5*Math.sqrt(3)],["L",t-1.5,e+1.5*Math.sqrt(3)],["Z"]]});var Uo={margin:[2,4],markerStyle:{stroke:"#bfbfbf",active:{stroke:"#3471F9"}},backgroundStyle:{fill:"transparent"}},ov={x:0,y:0,data:[],width:500,height:40,selection:[0,0],orient:"horizontal",singleModeControl:{width:56,size:12,labelStyle:{text:"单一时间",fontSize:10,dx:4}},speedControl:{width:32,markerSize:4,speeds:[1,2,3,4,5],labelStyle:{fontFamily:"sans-serif",fill:"rgba(0,0,0,0.45)",fontStyle:"normal",fontWeight:500,fontSize:10,textBaseline:"top"},formatter:function(t){return"".concat(t.toFixed(1),"x")}},controlPosition:"bottom",controlButton:{spacing:14,prevBtn:_(_({},Uo),{symbol:"timeline-prev-btn",padding:0,size:8}),nextBtn:_(_({},Uo),{symbol:"timeline-next-btn",padding:0,size:8}),playBtn:{margin:4,padding:0,size:20,symbol:"",markerStyle:{stroke:"#bfbfbf",fill:"#bfbfbf",active:{stroke:"#3471F9",fill:"#3471F9"}},backgroundStyle:{stroke:"#bfbfbf",lineWidth:1,fill:"#F7F7F7",active:{fill:"rgba(52, 113, 249, 0.1)",stroke:"#3471F9"}}}},padding:[0,8],playAxis:{appendPadding:[4,0],handleStyle:{r:3,lineWidth:1},label:{position:1,tickPadding:2,tickLine:{len:4,style:{stroke:"rgba(0,0,0,0.25)",lineWidth:1}},style:{fontSize:10,fillOpacity:1,fill:"rgba(0,0,0,0.45)"}},loop:!1},playInterval:2e3,autoPlay:!1},sv=I({},{x:0,y:0,data:[],length:120,orient:"horizontal",selection:0,selectionStyle:{fill:"#5B8FF9",fillOpacity:.15},loop:!1,playInterval:1e3},ov.playAxis),lv={axisLine:null,label:{autoRotate:!1,rotate:0,autoHide:!0,autoHideTickLine:!1,autoEllipsis:!0,minLength:50,alignTick:!0}};function cv(t,e){void 0===t&&(t=[]);var t=R(Array.of(t).flat(),2),n=t[0],n=void 0===n?0:n,t=t[1];return e?[n,n]:[n,void 0===t?n:t]}i(fv,uv=F.CustomElement),fv.prototype.update=function(t){var e=I({},this.attributes,t=void 0===t?{}:t),t=(t.selection&&(this.selection=cv(t.selection,e.singleMode)),t.singleMode&&(this.selection=cv(e.selection,t.singleMode)),this.playTimer);t&&this.stop(),this.attr(e),this.render(),t&&this.play()},fv.prototype.play=function(){var r=this,t=this.style,e=t.data,i=t.loop,a=t.singleMode,o=t.playMode,s=e.length,t=this.style.playInterval;fs(t)&&(t=sv.playInterval),this.playTimer&&clearInterval(this.playTimer),this.playTimer=setInterval(function(){var t,e,n;!i&&r.selection[1]>=s-1?r.stop(!0):a?(t=(r.selection[0]+1)%s,r.setSelection({start:t,end:t})):(t=r.selection[0],n=r.selection[1],e=r.selection[1]-r.selection[0],n=s-1<=n?"increase"===o?t:(t=0,e):("increase"!==o&&(t=(t+1)%s),(n+1)%s),r.setSelection({start:t,end:n}))},t)},fv.prototype.stop=function(t){clearInterval(this.playTimer),this.playTimer=void 0,t&&this.dispatchEvent(new F.CustomEvent("timelineStopped",{selection:this.selection}))},fv.prototype.prev=function(){var t,e=R(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n-1+r)%r:0===n?(t=r-(e-n)-1,r-1):(t=n-1,e-1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},fv.prototype.next=function(){var t,e=R(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n+1)%r:e===r-1?(t=0,e-n):(t=n+1,e+1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},fv.prototype.getSelection=function(){return this.selection},Object.defineProperty(fv.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),fv.prototype.ifH=function(t,e){return"horizontal"===this.orient?"function"==typeof t?t():t:"function"==typeof e?e():e},fv.prototype.destroy=function(){uv.prototype.destroy.call(this),this.playTimer&&clearInterval(this.playTimer),this.playTimer=void 0};var uv,Xo=fv;function fv(){var t=null!==uv&&uv.apply(this,arguments)||this;return t.selection=[0,0],t}function hv(t,e){return new Kp({domain:t.map(function(t,e){return e}),range:e,padding:.1})}function dv(t,e,n){n=hv(n,[0,e]).getStep(),e=0<t?Math.ceil:Math.floor;return 0<n?e(t/n):0}function pv(t,e,n){return hv(n,[0,e]).map(t)}i(mv,yv=Xo),mv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(mv.prototype,"styles",{get:function(){return I({},mv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),mv.prototype.setSelection=function(t){var e,n,r=t.start,t=t.end,i=this.styles,a=i.data,a=void 0===a?[]:a,i={duration:i.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},o=this.ifH("cx","cy"),s=M(this).select(".slider-start-handle").node();void 0!==r&&(n=pv(r,this.style.length,a),this.startHandleAnimation=s.animate([((e={})[o]=s.style[o],e),((s={})[o]=n,s)],i)),void 0!==t&&(e=M(this).select(".slider-end-handle").node(),n=pv(t,this.style.length,a),this.endHandleAnimation=e.animate([((s={})[o]=e.style[o],s),((a={})[o]=n,a)],i)),this.selection=[null!=r?r:this.selection[0],null!=t?t:this.selection[1]],this.dispatchEvent(new F.CustomEvent("selectionChanged",{detail:{selection:this.selection}}))},mv.prototype.render=function(){var e=this,n=this.styles,t=R(this.ifH([n.length,n.size],[n.size,n.length]),2),r=t[0],i=t[1],t=D(this,".slider-background","line").attr("className","slider-background").style("x1",0).style("y1",0).style("x2",this.ifH(r,0)).style("y2",this.ifH(0,i)).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(t=n.backgroundStyle)?void 0:t.fill).style("strokeOpacity",null==(t=n.backgroundStyle)?void 0:t.fillOpacity).node(),a=hv(n.data,[0,1]),o=R(this.selection.map(function(t){return a.map(t)}),2),s=o[0],s=void 0===s?0:s,o=o[1],o=void 0===o?s:o,l=this.ifH(s*r,0),c=this.ifH(o*r,0),s=this.ifH(0,s*i),o=this.ifH(0,o*i),u=(D(t,".slider-selection","line").attr("className","slider-selection").style("x1",l).style("y1",s).style("x2",c).style("y2",o).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(f=n.selectionStyle)?void 0:f.fill).style("strokeOpacity",null==(f=n.selectionStyle)?void 0:f.fillOpacity).style("visibility",n.singleMode?"hidden":"visible").call(S,n.selectionStyle),"running"===(null==(f=this.startHandleAnimation)?void 0:f.playState)&&this.startHandleAnimation.pause(),D(t,".slider-start-handle","circle").attr("className","slider-start-handle").style("cx",l).style("cy",s).call(S,n.handleStyle),"paused"===(null==(f=this.startHandleAnimation)?void 0:f.playState)&&this.startHandleAnimation.play(),"running"===(null==(l=this.endHandleAnimation)?void 0:l.playState)&&this.endHandleAnimation.pause(),D(t,".slider-end-handle","circle").attr("className","slider-end-handle").style("cx",c).style("cy",o).style("visibility",n.singleMode?"hidden":"visible").call(S,n.handleStyle),"paused"===(null==(s=this.endHandleAnimation)?void 0:s.playState)&&this.endHandleAnimation.play(),n.data.map(function(t,e){return{value:a.map(e),text:t.date}})),f=n.label||{},l=f.position,h=void 0===l?-1:l,d=f.tickLine,p=K(f,["position","tickLine"]);D(t,".slider-axis",function(){return new Um({className:"slider-axis"})}).call(function(t){return t.node().update(I({},lv,{startPos:[h*e.ifH(0,r+2),h*e.ifH(i+2,0)],endPos:[e.ifH(r,0)+h*e.ifH(0,r+2),e.ifH(0,i)+h*e.ifH(i+2,0)],ticks:u,verticalFactor:h,tickLine:null===n.label?null:d,label:null===n.label?null:p}))})},mv.prototype.bindEvents=function(){var t=M(this).select(".slider-background"),r=(this.dragHandle(t,"start"),this.dragHandle(t,"end"),this.dragSelection(t),t.select(".slider-selection").node()),e=t.select(".slider-start-handle").node(),t=t.select(".slider-end-handle").node();e.addEventListener(F.ElementEvent.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x1":"y1"]=t)}),t.addEventListener(F.ElementEvent.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x2":"y2"]=t)})},mv.prototype.dragHandle=function(n,a){function t(t){var e,n,r,i;c&&(c=!1,t=dv(s?l.ifH(t.x-s[0],t.y-s[1]):0,l.style.length,l.style.data),s=void 0,e=(n=R(l.selection,2))[0],n=n[1],r=l.style.data.length-1,"start"===a?e===n&&0<t?(i=xs(0,e+t,r),l.setSelection({start:i,end:i})):l.setSelection({start:xs(e+t,0,n)}):e===n&&t<0?(i=xs(0,n+t,r),l.setSelection({start:i,end:i})):l.setSelection({end:xs(n+t,e,r)}),l.playTimer)&&l.play()}var o,s,l=this,c=!1;n.on("pointerdown",function(t){l.playTimer&&clearInterval(l.playTimer);var e=n.select(".slider-".concat(a,"-handle")).node();t.target===e&&(c=!0,s=[t.x,t.y],o=[t.x,t.y])}.bind(this)).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e,n,r,i;c&&(e=l.styles.length,n=M(l).select(".slider-".concat(a,"-handle")).node(),r=l.ifH(t.x-o[0],t.y-o[1]),i=n.getLocalPosition(),"vertical"===l.orient?n.style.cy=xs(i[1]+r,0,e):n.style.cx=xs(i[0]+r,0,e),o=[t.x,t.y])})},mv.prototype.dragSelection=function(t){function e(t){l.playTimer&&clearInterval(l.playTimer),t.target===a&&(f=!0,i=[t.x,t.y],s=[t.x,t.y])}function n(t){var e;f&&(f=!1,t=dv(i?l.ifH(t.x-i[0],t.y-i[1]):0,l.style.length,l.style.data),i=void 0,e=l.selection[1]-l.selection[0],t=xs(l.selection[1]+t,e,l.style.data.length-1),l.setSelection({start:t-e,end:t}),l.playTimer)&&l.play()}function r(t){var e,n,r,i,a,o;f&&(e=l.styles.length,n=l.ifH(t.x-s[0],t.y-s[1]),r=(o=R(c.getLocalPosition(),2))[0],o=o[1],i=(a=R(u.getLocalPosition(),2))[0],a=a[1],"vertical"===l.orient?(c.style.cy=xs(o+n,0,e-(a=a-o)),u.style.cy=c.style.cy+a):(o=i-r,c.style.cx=xs(r+n,0,e),u.style.cx=c.style.cx+o),s=[t.x,t.y])}var s,i,l=this,a=t.select(".slider-selection").node(),c=t.select(".slider-start-handle").node(),u=t.select(".slider-end-handle").node(),f=!1;t.on("mousedown",e.bind(this)).on("touchstart",e.bind(this)).on("mouseup",n.bind(this)).on("mouseupoutside",n.bind(this)).on("touchend",n.bind(this)).on("touchendoutside",n.bind(this)).on("mousemove",r.bind(this)).on("touchmove",r.bind(this))},mv.defaultOptions={style:I({},sv,{tag:"slider-axis",size:3,handleStyle:{r:3,stroke:"#8AADF3",strokeOpacity:.75,lineWidth:1,fill:"#fff",fillOpacity:1},backgroundStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{cursor:"grabbing"}})};var yv,gv=mv;function mv(t){t=yv.call(this,I({},mv.defaultOptions,t))||this;return t.startHandleAnimation=null,t.endHandleAnimation=null,t.selection=cv(t.style.selection,t.style.singleMode),t}function vv(t,e){return new Dp({domain:t.map(function(t,e){return e}),range:e,paddingOuter:0,paddingInner:0})}i(wv,bv=Xo),wv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(wv.prototype,"styles",{get:function(){return I({},wv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),wv.prototype.setSelection=function(t){var e,n=R(this.selection,2),r=n[0],n=n[1];this.selection=cv([null!=(e=t.start)?e:r,null!=(e=t.end)?e:n],this.style.singleMode),this.dispatchEvent(new F.CustomEvent("selectionChanged",{detail:{selection:this.selection}})),this.render()},wv.prototype.render=function(){var i=this,r=this.styles,a=r.size,o=r.spacing,t=R(this.ifH(["x","y","width","height"],["y","x","height","width"]),4),s=t[0],l=t[1],c=t[2],u=t[3],t=D(this,".slider-background","rect").attr("className","slider-background").style("x",0).style("y",0).style(c,r.length).style(u,a+o).call(S,r.backgroundStyle).node(),f=this.getCellScale(),h=f.getBandWidth(),e=r.data.map(function(t,e){var n;return _(((n={})[s]=f.map(e),n[l]=o/2,n[c]=h-r.cellGap,n[u]=a,n),r.cellStyle)}),e=(M(t).selectAll(".cell").data(e).join(function(t){return t.append("rect").attr("className","cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()}),e.filter(function(t,e){var n=R(i.selection,2),r=n[0],n=n[1];return r<=e&&e<=n}).map(function(t){return _(_({},t),r.selectionStyle)})),n={duration:this.style.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},d=(M(t).selectAll(".selected-cell").data(e).join(function(t){return t.append("rect").attr("className","selected-cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.animate([t],n)})},function(t){return t.remove()}),r.length-2*r.spacing+r.cellGap),p=vv(r.data,[0,d]),y=r.data.map(function(t,e){return{value:(p.map(e)+(h-r.cellGap)/2)/d,text:t.date}}),e=r.label||{},g=e.position,m=void 0===g?-1:g,v=e.tickLine,b=K(e,["position","tickLine"]),g=-1===m?-2:r.spacing+a+2,x=[r.spacing,g],w=[o+d,g];"vertical"===this.orient&&(x=[x[1],x[0]],w=[w[1],w[0]]),D(t,".slider-axis",function(){return new Um({className:"slider-axis",style:lv})}).call(function(t){return t.node().update({startPos:x,endPos:w,ticks:y,verticalFactor:m,tickLine:null===r.label?null:v,label:null===r.label?null:b})})},wv.prototype.bindEvents=function(){this.dragSelection()},wv.prototype.getCellScale=function(){var t=this.styles.cellGap,e=this.styles.length,n=this.styles.spacing;return vv(this.style.data,[n,e-n+t])},wv.prototype.dragSelection=function(){function t(){r=!1,i.playTimer&&i.play()}var n,i=this,a=M(this).select(".slider-background"),r=!1,o=this.styles.spacing,s=function(t){var e=R(a.node().getPosition(),2),n=e[0],e=e[1],n=i.ifH(n+4,e+o),e=i.styles.cellGap,r=i.getCellScale().getStep();return Math.floor((t-n+e)/r)};a.on("pointerdown",function(t){i.playTimer&&clearInterval(i.playTimer),r=!0,n=i.ifH(t.x,t.y);t=s(n);i.setSelection({start:t,end:t})}).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e;r&&(t=s(i.ifH(t.x,t.y)),e=(t=R((e=n?s(n):t)<t?[e,t]:[t,e],2))[0],t=t[1],i.setSelection({start:e,end:t}))})},wv.defaultOptions={style:I({},sv,{tag:"cell-axis",backgroundStyle:{fill:"#416180",fillOpacity:.05},size:16,spacing:4,cellGap:2,cellStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{fillOpacity:.45},label:{autoHideTickLine:!0}})};var bv,xv=wv;function wv(t){t=bv.call(this,I({},wv.defaultOptions,t))||this;return t.selection=cv(t.style.selection,t.style.singleMode),t}function Mv(t,e){return[1.43,2.79,4.89,7.57,11.66][t]/11.66*e}var kv,Qo=I({},ov.speedControl,{markerFill:"#8c8c8c",spacing:1,lineStyle:{stroke:"#bfbfbf",lineWidth:1}}),Ov=(i(_v,kv=F.CustomElement),_v.prototype.connectedCallback=function(){this.render(),this.bindEvents()},_v.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(_v.prototype,"styles",{get:function(){return I({},_v.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),_v.prototype.render=function(){var t=this.styles,e=t.initialSpeed,n=t.markerSize,r=t.markerFill,i=t.lineStyle,a=t.speeds,o=t.labelStyle,s=t.spacing,t=t.formatter,t=void 0===t?function(t){return"".concat(t)}:t,e=a.indexOf(e),l=2*n,c=Mv(e=-1===e?0:e,2*l),u=n*Math.tan(Math.PI/6)*2,r=(D(this,".speed-marker","path").attr("className","speed-marker").style("fill",r).style("path",[["M",0,c-u/2],["L",n,c],["L",0,c+u/2],["Z"]]),n-.5),c=D(this,".line-group","rect").attr("className","line-group").style("x",r).style("y",0).style("width",l).style("height",2*l).style("cursor","pointer").style("fill","transparent").node(),u=a.reduce(function(t,e,n){n=Mv(n,2*l);return t.push(["M",0,n],["L",l,n]),t},[]);D(c,".speed-path","path").attr("className","speed-path").style("path",u).call(S,i),D(this,".speed-label","text").attr("className","speed-label").style("x",r+l+s).style("y",2).style("text",t(a[e])).call(S,o)},_v.prototype.bindEvents=function(){var e=this,t=this.querySelector(".line-group");t.addEventListener("pointerdown",function(t){return e.onClick(t)}),t.addEventListener("touchmove",function(t){return e.onClick(t)})},_v.prototype.onClick=function(t){var a,e=this.styles,o=e.speeds,n=e.markerSize,e=e.formatter,e=void 0===e?function(t){return"".concat(t)}:e,s=2*n*2,n=this.querySelector(".line-group"),r=M(this).select(".speed-label").node(),i=M(this).select(".speed-marker").node();t.currentTarget===n&&(a=t.y-n.getBBox().y,-1!==(t=o.findIndex(function(t,e){var n=Mv(e,s),r=Mv(e-1,s),i=Mv(e+1,s);return 0===e?a<n+(Mv(1,s)-n)/2:e===o.length-1?n-(n-r)/2<a:(e=[n-(n-r)/2,n+(i-n)/2])[0]<=a&&a<e[1]})))&&(r.setAttribute("text",e(o[t])),i.setLocalPosition(0,Mv(t,s)-s/8),this.dispatchEvent(new F.CustomEvent("speedChanged",{detail:{speed:o[t]}})))},_v.tag="speed-control",_v.defaultOptions={style:Qo},_v);function _v(t){return kv.call(this,I({},_v.defaultOptions,t))||this}i(Pv,Sv=F.CustomElement),Pv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(Pv.prototype,"styles",{get:function(){return I({},Pv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Pv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),fs(t.active)||(this.active=t.active),this.render()},Pv.prototype.render=function(){var t,e=this.styles,n=e.size,r=e.buttonStyle,i=e.labelStyle,e=e.symbol,a=r.active,r=K(r,["active"]),r=D(this,".button","rect").attr("className","button").style("x",0).style("y",0).style("width",n).style("height",n).call(S,r).call(S,this.active?a:{}).node();D(r,".symbol","path").attr("className","symbol").style("x",n/2).style("y",n/2).style("path",[["M",(a=n/2)-(t=r=n/2)/7*4,r-t/14],["L",a-t/7,r+t/7*3],["L",a+t/7*4,r-t/7*3]]).style("lineWidth",1).style("lineCap","round").style("stroke","transparent").style("cursor","pointer").call(S,this.active?null==e?void 0:e.active:{}),D(this,".label","text").attr("className","label").style("x",n).style("y",n/2).call(S,i)},Pv.prototype.bindEvents=function(){var t=this;M(this).select(".button").on("pointerdown",function(){t.dispatchEvent(new F.CustomEvent("singleModeChanged",{detail:{active:!t.active}}))})},Pv.defaultOptions={style:{size:12,buttonStyle:{fill:"transparent",stroke:"#000",strokeOpacity:.15,cursor:"pointer",lineWidth:1,radius:2,active:{stroke:"#3471F9",fill:"#3471F9",strokeOpacity:1}},symbol:{active:{stroke:"#fff"}},labelStyle:{text:"",textAlign:"left",textBaseline:"middle",fill:"#000",fillOpacity:.65},cursor:"pointer"}};var Sv,Ev,Av=Pv;function Pv(t){t=Sv.call(this,I({},Pv.defaultOptions,t))||this;return t.active=!1,t.active=t.style.active||!1,t}function Nv(t,e,n){var r,i,a,o,s,n=I({},ov,n),l=n.type,c=n.playAxis,u=n.controlButton,f=n.speedControl,h=n.singleModeControl,d=(null==(d=null==c?void 0:c.label)?void 0:d.position)||-1,p=null!=(p=null==c?void 0:c.spacing)?p:(null==(p=null==(p=xv.defaultOptions)?void 0:p.style)?void 0:p.spacing)||0,y=(null==c?void 0:c.size)||("cell"===l?null==(y=null==(y=xv.defaultOptions)?void 0:y.style)?void 0:y.size:null==(y=null==(y=gv.defaultOptions)?void 0:y.style)?void 0:y.size)||4,p=(y+="cell"===l?p:0,R($y(null==c?void 0:c.appendPadding),4)),g=p[0],m=p[1],v=p[2],p=p[3],b=(null==u?void 0:u.spacing)||0,x=Ps(u)||Ps(null==u?void 0:u.playBtn)?0:null==(x=null==u?void 0:u.playBtn)?void 0:x.size,w=Ps(u)||Ps(null==u?void 0:u.prevBtn)?0:null==(w=null==u?void 0:u.prevBtn)?void 0:w.size,u=Ps(u)||Ps(null==u?void 0:u.nextBtn)?0:null==(u=null==u?void 0:u.nextBtn)?void 0:u.size,M=x/2+w/2+b,k=x/2+u/2+b,O=null===f?0:null==f?void 0:f.markerSize,_=2*O,f=null===f?0:null==f?void 0:f.width,S=2*_+O/2,E=null===h?0:null==h?void 0:h.width,h=null===h?0:(null==h?void 0:h.size)+2;return"vertical"===n.orient?{axis:{x:(n=p+(-1===d?30:0))+("cell"===l?0:y/2),y:i=(r=w+b+x/2)+x/2+b+g,length:(a=(s=(o=e-h)-4-S)-b-u/2)-b-u/2-v-i},prevBtn:{x:i=n+y/2,y:w/2,size:w},playBtn:{x:i,y:r,size:x},nextBtn:{x:i,y:a,size:u},speedControl:{x:n-f/2,y:s,size:f},singleModeControl:{x:0,y:o}}:(i=(r=e-E)-8-f,a=c,s=(a=I({},ov.playAxis,a).label)?((null==(n=a.tickLine)?void 0:n.len)||0)+(a.tickPadding||0)+(Number(a.style.fontSize)||0)+2:0,o=(-1===d?s:0)+("cell"===l?0:y/2)+g,"bottom"===t?{axis:{x:p,y:o,length:e-(p+m)},playBtn:{x:E=e/2,y:c=o+(1===d?s:0)+y+x/2+v,size:x},prevBtn:{x:E-M,y:c,size:w},nextBtn:{x:E+k,y:c,size:u},speedControl:{x:i,y:n=o+(1===d?s:0)+y+v,size:f},singleModeControl:{x:r,y:n+_-h/2}}:(g="cell"===l?o+y/2:o,e="cell"===l&&-1===d?s+y-S:1===d?o+O/2:o-S,"left"===t?{axis:{x:n=(v=(c=(E=w/2)+M)+k)+u/2+p,y:o,length:i-m-n},prevBtn:{x:E,y:g,size:w},playBtn:{x:c,y:g,size:x},nextBtn:{x:v,y:g,size:u},speedControl:{x:i,y:e,size:f},singleModeControl:{x:r,y:e+_-h/2}}:{axis:{x:p,y:o,length:(y=(s=(l=i-(u/2+b))-k)-M)-w/2-m-p},playBtn:{x:s,y:g,size:x},prevBtn:{x:y,y:g,size:w},nextBtn:{x:l,y:g,size:u},speedControl:{x:i,y:e,size:f},singleModeControl:{x:r,y:e+_-h/2}}))}function Tv(t){t=Ev.call(this,I({},{style:ov},t))||this;return t.speed=1,t.singleMode=!1,t.playing=!1,t.selection=[0,0],t.singleMode=t.style.singleMode||!1,t.selection=cv(t.style.selection,t.singleMode),t}function Lv(t){var e,n={left:0,top:0,width:0,height:0};return"html"===(null==t?void 0:t.tagName)?n={left:0,top:0,width:(e=t.style).width,height:e.height}:t&&(t=(e=t.getLocalBounds()).min,e=e.halfExtents,n={left:t[0],top:t[1],width:2*e[0],height:2*e[1]}),{left:0,top:0,right:n.width,bottom:n.height}}function Cv(t,n){var r,e,i,a;return n?(r=n.useHTML,e=n.style,i="legend-title ".concat(r?"html":"text","-title"),a="<span>".concat((null==n?void 0:n.content)||"","</span>"),D(t,".".concat(i),function(){return r?new F.HTML({className:i,style:{innerHTML:a}}):new F.Text({className:i,style:e})}).call(function(t){var e;r?t.style("width",null!=(e=n.width)?e:80).style("height",null!=(e=n.height)?e:20).style("innerHTML",a):t.style("fontSize",12).style("textBaseline","top").style("text",n.content||"")}).call(S,e).node()):((t=t.querySelector(".legend-title"))&&t.remove(),null)}function jv(t,e,n,r){return D(t,".".concat(e),"g").attr("className",e).style("x",n).style("y",r).node()}function Fv(t,e,n,r,i){D(t,".".concat(e),"rect").attr("className",e).style("zIndex",-1).style("width",n).style("height",r).call(S,i||{}).node()}i(Tv,Ev=F.CustomElement),Tv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Tv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),void 0!==t.singleMode&&(this.singleMode=t.singleMode),t.selection&&(this.selection=cv(t.selection,this.singleMode)),this.render()},Object.defineProperty(Tv.prototype,"styles",{get:function(){return I({},ov,this.attributes)},enumerable:!1,configurable:!0}),Tv.prototype.render=function(){var e=this,t=this.styles,n=t.width,r=t.height,i=t.controlPosition,a=t.speedControl,o=t.singleModeControl,t=R($y(this.styles.padding),4),s=t[0],s=void 0===s?0:s,l=t[1],l=void 0===l?0:l,c=t[2],t=t[3],t=void 0===t?l:t,u=D(this,".container","g").attr("className","container").style("x",t).style("y",s).node(),f=Nv(i,"vertical"===this.style.orient?r-(s+c):n-(t+l),this.styles);this.renderAxis(u,f),this.renderControlButton(u,f),D(u,".timeline-speed-control",function(){return new Ov({})}).attr("className","timeline-speed-control").call(function(t){null===a?t.remove():t.node().update(_(_({x:f.speedControl.x,y:f.speedControl.y},a),{initialSpeed:e.speed}))}),D(u,".timeline-single-control",function(){return new Av({})}).attr("className","timeline-single-control").call(function(t){null===o?t.remove():t.node().update(_(_({x:f.singleModeControl.x,y:f.singleModeControl.y},o),{active:e.singleMode}))})},Tv.prototype.renderAxis=function(t,e){var n=this,r=this.styles.data,i=this.styles.type||"slider",a=M(t).select(".timeline-axis").node(),o="cell"===i?xv:gv;a&&a.style.tag!=="".concat(i,"-axis")&&(a.remove(),this.removeChild(a)),D(t,".timeline-axis",function(){return new o({})}).attr("className","timeline-axis").call(function(t){t.node().update(_({x:e.axis.x,y:e.axis.y,length:e.axis.length,data:r,selection:n.selection,orient:n.style.orient,playInterval:n.style.playInterval/n.speed,singleMode:n.singleMode},n.style.playAxis||{})),t.node().update({handleStyle:{cursor:"vertical"===n.style.orient?"ns-resize":"ew-resize"}})}).node()},Tv.prototype.renderControlButton=function(t,n){var e,r=this,i=n.playBtn.size||0,a=n.prevBtn.size||0,o=(null==(e=n.nextBtn)?void 0:e.size)||0;D(t,".timeline-prev-btn",function(){return new iv({})}).attr("className","timeline-prev-btn").call(function(t){var e;a?(t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.prevBtn)||{}),{x:n.prevBtn.x,y:n.prevBtn.y,size:a,symbol:"timeline-prev-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),D(t,".timeline-play-btn",function(){return new iv({})}).attr("className","timeline-play-btn").call(function(t){var e;i?(t.node().update({backgroundStyle:{radius:(n.playBtn.size||0)/2}}),t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.playBtn)||{}),{x:n.playBtn.x,y:n.playBtn.y,size:i,symbol:r.playing?"timeline-play-button":"timeline-stop-button"}))):t.remove()}),D(t,".timeline-next-btn",function(){return new iv({})}).attr("className","timeline-next-btn").call(function(t){var e;o?(t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.nextBtn)||{}),{x:n.nextBtn.x,y:n.nextBtn.y,size:o,symbol:"timeline-next-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),this.style.autoPlay&&!this.playing&&(this.playing=!0,M(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.play()}),M(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-play-button"})})),!this.style.autoPlay&&this.playing&&(this.playing=!1,M(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.stop()}),M(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-stop-button"})}))};var Bo={style:{x:0,y:0,padding:0,orient:"horizontal",backgroundStyle:{fill:"transparent",lineWidth:0},title:{content:"",spacing:4,align:"left",style:{fontWeight:"bold",fontFamily:"sans-serif",fontSize:12,textAlign:"top",textBaseline:"top",fill:"#2C3542"}},label:{style:{fill:"#2C3542",fillOpacity:.65,fontSize:12}}}},Iv={symbol:"circle",size:8},Rv={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},Bv={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},Dv=I({},Bo,{style:{type:"category",items:[],maxWidth:void 0,maxHeight:void 0,maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!(Tv.prototype.bindEvents=function(){var e=this,n=M(this).select(".timeline-axis").node(),r=M(this).select(".timeline-play-btn").node();r&&M(r).on("pointerdown",function(t){e.playing?(e.playing=!1,n.stop(),r.update({symbol:"timeline-stop-button"})):(e.playing=!0,n.play(),r.update({symbol:"timeline-play-button"}))}),M(this).on("timelineStopped",function(){e.playing=!1,null!=r&&r.update({symbol:"timeline-stop-button"})}),M(this).on("speedChanged",function(t){e.speed=t.detail.speed,n.update({playInterval:e.style.playInterval/e.speed})}),M(this).select(".timeline-prev-btn").on("pointerdown",function(){return n.prev()}),M(this).select(".timeline-next-btn").on("pointerdown",function(){return n.next()}),M(this).on("singleModeChanged",function(t){e.singleMode=t.detail.active,e.selection=cv(e.selection,e.singleMode),e.render()}),M(this).on("selectionChanged",function(t){e.selection=t.detail.selection})}),pageNavigator:{loop:!1}}}),zv={width:100,height:20,type:"color",chunked:!1,ticks:[],isGradient:"auto",backgroundColor:"#c5c5c5"},Wv={spacing:4,formatter:function(t){return String(t)},align:"rail",flush:!0,maxLength:30},Hv={size:25,stroke:"#c5c5c5",fill:"#fff",lineWidth:1},Vv=I({},Bo,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],label:Wv,rail:zv,slidable:!0,indicator:{size:8,spacing:10,padding:5,backgroundStyle:{fill:"#262626","background-color":"#262626","border-radius":"5px"},text:{style:{color:"white","font-size":"12px"}}}}}),Gv="legend-item-";function qv(t,e){t&&(t.setAttribute("tip",t.style.text),null!=t)&&t.attr("text",e||"")}function Yv(n,t){return void 0===n&&(n={}),(t=void 0===t?"":t).split("-").reduce(function(t,e){return _(_({},t),Gs(n,e,{}))},{})}i($v,Uv=la),$v.prototype.setState=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n=new Set((this.state||"").split("-"));e?n.add(t):n.delete(t),this.state=re([],R(n),!1).join("-"),this.update()},$v.prototype.getState=function(){return this.state},$v.prototype.update=function(t){Uv.prototype.update.call(this,t=void 0===t?{}:t),t.state&&(this.state=t.state)},Object.defineProperty($v.prototype,"styles",{get:function(){return I({},$v.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),$v.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=this.styles,u=c.backgroundStyle,f=c.itemMarker,h=c.padding,d=c.itemName,p=c.itemValue,c=c.maxItemWidth,y=this.styles.itemHeight,h=R($y(h),4),g=h[0],m=h[1],v=h[2],h=h[3],b=Number((null==f?void 0:f.size)||0),x=(fs(y)&&(y=Math.max.call(null,b,Number((null==(x=null==d?void 0:d.style)?void 0:x.fontSize)||0),Number((null==(x=null==p?void 0:p.style)?void 0:x.fontSize)||0))+(g+v)),D(this,".".concat(Gv,"container"),"g").attr("className","".concat(Gv,"container")).style("x",h).style("y",y/2).node()),w=(D(x,".".concat(Gv,"marker"),function(){return new E({})}).attr("className","".concat(Gv,"marker")).call(function(t){f?t.node().update(_(_({x:b/2,y:0,size:b,symbol:f.symbol},f.style||{}),Yv(f.style,l.state))):t.remove()}),b?b+((null==d?void 0:d.spacing)||0):0),g=D(x,".".concat(Gv,"name"),"text").attr("className","".concat(Gv,"name")).call(function(t){d?t.node().attr(_(_({x:w,y:0,tip:"",text:(null==d?void 0:d.content)||"",textBaseline:"middle",textAlign:"left"},d.style||{}),Yv(d.style,l.state))):t.remove()}).node(),M=w,v=(g&&!g.destroyed&&(M=g.getLocalBounds().max[0]),D(x,".".concat(Gv,"value"),"text").attr("className","".concat(Gv,"value")).call(function(t){p?t.node().attr(_(_(_({x:M+(p.spacing||0),y:0,tip:"",text:(null==p?void 0:p.content)||"",textAlign:"left"},p.style||{}),Yv(p.style,l.state)),{textBaseline:"middle"})):t.remove()}).node()),k=(fs(c)||(g=null!=g&&g.destroyed?null:g,v=null!=v&&v.destroyed?null:v,n=c-w-(h+m),(g||v)&&"number"==typeof n&&(Number(n)<=0?(qv(g,""),qv(v,"")):g&&v?(o=g.getLocalBounds(),i=v.getLocalBounds(),n<(r=2*o.halfExtents[0])+(k=2*i.halfExtents[0])+(i=r&&k?i.min[0]-o.max[0]:0)&&(a=(o=R([.5*n,.5*n],2))[0],o=o[1],s=O=!0,r<=a?(o=n-(r+i),O=!1):k<=o&&(a=n-(k+i),s=!1),O&&(qv(g,Ry(g.style.text,a,zy(g))),v.attr("x",Number(g.style.x)+a+i)),s)&&qv(v,Ry(v.style.text,o,zy(v)))):n<2*(r=g||v).getLocalBounds().halfExtents[0]&&qv(r,Ry(r.style.text,n,zy(r))))),x.getLocalBounds()),O=Math.max(2*k.halfExtents[0]+m+h,this.styles.itemWidth||0);fs(c)||(O=Math.min(c,O)),D(this,".".concat(Gv,"background"),"rect").attr("className","".concat(Gv,"background")).style("x",k.min[0]-h).style("y",0).style("width",O).style("height",y).style("zIndex",-1).call(S,u).call(S,Yv(u,this.state))},$v.defaultOptions={style:{id:"",value:{},itemMarker:{size:8,symbol:"circle",style:{fill:"#d3d2d3",fillOpacity:1,lineWidth:0,active:{cursor:"pointer"}}},itemName:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",fontSize:12,opacity:1,active:{cursor:"pointer"}}},itemValue:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",opacity:1,fontSize:12,active:{cursor:"pointer"}}}}};var Uv,Xv=$v;function $v(t){t=Uv.call(this,I({},$v.defaultOptions,t))||this;return t.state="default",t.state=t.style.state||"selected",t}function Zv(t,a,o){void 0===o&&(o=0);var s=0,l=0,c=0;return t.reduce(function(t,e){var n=R(e.getLocalBounds().halfExtents,2),r=n[0],n=n[1],i="horizontal"===a?[t,0]:[0,t];return e.setLocalPosition(i[0],i[1]),l=Math.max(l,2*n),c=Math.max(c,2*r),(s="horizontal"===a?t+2*r:t+2*n)+o},0),{totalSize:s,maxItemWidth:c,maxItemHeight:l}}iv.registerSymbol("left",function(t,e,n){return[["M",t-n*Math.sin(Math.PI/3),e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),iv.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n*Math.sin(Math.PI/3),e],["L",t-n,e+n],["Z"]]}),iv.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n*Math.sin(Math.PI/3)],["L",t+n,e+n],["Z"]]}),iv.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n*Math.sin(Math.PI/3)],["Z"]]});i(Qv,Kv=F.CustomElement),Qv.prototype.connectedCallback=function(){this.container=this.appendChild(new F.Group),this.clipView=new F.Path({style:{path:[]}}),this.container.appendChild(this.clipView),this.render(),this.bindEvents()},Qv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(Qv.prototype,"styles",{get:function(){return I({},Qv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Qv.prototype.render=function(){this.renderButtonGroup();var t=this.style.items,t=void 0===t?[]:t;this.items=M(this.container).selectAll(".legend-item").data(t||[],function(t,e){return t.id||e}).join(function(t){return t.append(function(t){return new Xv({id:t.id,className:"legend-item",style:t})})},function(t){return t.each(function(t){this.update(t)})},function(t){return t.remove()}).nodes(),this.adjustLayout()},Qv.prototype.bindEvents=function(){this.prevButton.addEventListener("pointerdown",this.prev.bind(this)),this.nextButton.addEventListener("pointerdown",this.next.bind(this))},Qv.prototype.ifHorizontal=function(t,e){return"vertical"===this.style.orient?"function"==typeof e?e():e:"function"==typeof t?t():t},Qv.prototype.renderButtonGroup=function(){var t=this.styles,e=t.pageButtonStyle,n=void 0===e?{}:e,e=t.pageTextStyle,t=D(this,".page-button-group",function(){return new F.Group({className:"page-button-group"})}).node(),r="page-prev-button",i="page-next-button";this.prevButton=D(t,"#".concat(r),function(){return new iv({})}).attr("id",r).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),D(t,".page-info","text").attr("className","page-info").call(S,e),this.nextButton=D(t,"#".concat(i),function(){return new iv({})}).attr("id",i).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),this.updatePageButtonSymbol()},Object.defineProperty(Qv.prototype,"pageInfoBounds",{get:function(){var t,e,n,r,i=this.querySelector(".page-info");return i?(r=(t=this.styles).pageFormatter,t=t.pageInfoSpacing,e=i.style.visibility,i.style.visibility="hidden",i.style.text=r(1,this.styles.items.length),n=(r=R(i.getLocalBounds().halfExtents,2))[0],r=r[1],i.style.visibility=e,{width:2*(n+t),height:2*(r+t)}):{width:0,height:0}},enumerable:!1,configurable:!0}),Qv.prototype.layoutButton=function(t){var e,n=this.style.pageInfoSpacing,r=this.pageInfoBounds.height,n=this.pageInfoBounds.width+2*(void 0===n?0:n),i=R(this.querySelector(".page-button-group").childNodes,3),a=i[0],o=i[1],i=i[2];"horizontal"===t?(t=2*a.getLocalBounds().halfExtents[0],e=2*i.getLocalBounds().halfExtents[0],a.style.x=t/2,i.style.x=t+n+e/2,o.style.x=(Number(a.style.x)+Number(i.style.x))/2,a.style.y=0,i.style.y=0,o.style.y=0):(t=2*a.getLocalBounds().halfExtents[1],n=2*i.getLocalBounds().halfExtents[1],a.style.y=-(r+t)/2,i.style.y=(r+n)/2,o.style.y=0,e=this.pageInfoBounds.width/2,a.style.x=e,i.style.x=e,o.style.x=e)},Qv.prototype.showButtonGroup=function(){this.querySelector(".page-button-group").style.visibility="visible"},Qv.prototype.resetPageCfg=function(){this.querySelector(".page-button-group").style.visibility="hidden",this.container.style.clipPath=null,this.currPage=void 0,this.maxPages=void 0,this.pageOffsets=[],this.container.style.transform="translate(0,0)",this.clipView&&(this.clipView.style.transform="translate(0,0)")},Qv.prototype.adjustLayout=function(){var t,e,n,r;this.resetPageCfg(),this.items.length<=1||(t=(n=R($y(this.style.spacing),2))[0],n=n[1],t=this.ifHorizontal(t,n),t=(n=Zv(this.items,this.style.orient||"horizontal",t)).totalSize,e=n.maxItemWidth,n=n.maxItemHeight,r=this.ifHorizontal(this.style.maxWidth,this.style.maxHeight),!fs(r)&&r!==1/0&&r<t&&(this.style.autoWrap&&"vertical"!==this.style.orient?(this.layoutButton("vertical"),this.adjustHorizontalWrap(e,n,r)):(this.layoutButton("horizontal"),this.adjustFlip(e,n,r))))},Qv.prototype.adjustFlip=function(t,e,n){this.showButtonGroup();var r=this.querySelector(".page-button-group"),i=this.style.pageSpacing,a=this.prevButton.style.size||Qv.defaultOptions.style.pageButtonSize,o=r.getLocalBounds(),s=2*o.halfExtents[0],o=2*o.halfExtents[1],e=R(this.ifHorizontal([n-(s+i),e],[t,n-(o+i)]),2),l=e[0],c=e[1];this.clipView.style.path="M-1,0 L".concat(l,",0 L").concat(l,",").concat(c," L-1,").concat(c," Z"),this.container.style.clipPath=this.clipView,r.style.x=this.ifHorizontal(n-s,0),r.style.y=this.ifHorizontal(c/2-1,c+a+i);for(var u="x"===this.ifHorizontal("x","y")?0:1,f=[0],h=1,d=0;d<this.items.length;d++){var p=this.items[d].getLocalBounds(),y=p.min;p.max[u]-function(t){if(ss(t))return t[t.length-1]}(f)>this.ifHorizontal(l,c)+4&&(0!==y[u]&&f.push(y[u]),h+=1)}this.maxPages=h,this.currPage=1,this.pageOffsets=f,this.updatePageNavigatorState()},Qv.prototype.adjustHorizontalWrap=function(t,c,e){this.showButtonGroup();var n,r=this.querySelector(".page-button-group"),i=this.style,a=i.pageSpacing,a=void 0===a?0:a,o=i.cols,i=this.pageInfoBounds.width,u=this.style.maxRows||2,s=r.getLocalBounds(),s=Math.max(2*s.halfExtents[0],i),i=e-(s+a),l=c*u;function f(t,e){for(var n=1,r=0,i=[0],a=0;a<e.length;a++){var o=e[a],s=o.getLocalBounds(),l=s.min;s.max[0]-r>t&&(n+=1,r=l[0],n%u==1)&&i.push((n-1)*c),o.setLocalPosition(l[0]-r,(n-1)*c)}return i}o&&u&&(o*u<=this.items.length&&(i=e),n=e/o),this.clipView.style.path="M-1,0 L".concat(i,",0 L").concat(i,",").concat(l," L-1,").concat(l," Z"),this.container.style.clipPath=this.clipView;var h=[];if(o&&n)for(var d=R($y(this.style.spacing),1)[0],p=0,y=0,g=0;g<this.items.length;g+=o){y=0,(p+=1)%u==1&&h.push(Math.floor(p/u)*l);for(var m=0;m<o&&g+m<this.items.length;m++)this.items[g+m].update({x:y,y:(p-1)*c,maxItemWidth:n-d}),y+=n}else 1===(h=f(i,this.items)).length&&(d=(a=R($y(this.style.spacing),2))[0],i=a[1],y=this.ifHorizontal(d,i),Zv(this.items,this.style.orient||"horizontal",y),f(e,this.items));this.maxPages=h.length,this.currPage=1,this.pageOffsets=h,this.maxPages<=1?this.resetPageCfg():(r.style.x=e-s,r.style.y=l/2-2,this.updatePageNavigatorState())},Qv.prototype.updatePageNavigatorState=function(){this.updatePageInfo(),this.currPage===this.maxPages?this.nextButton.setState("disabled"):this.nextButton.setState("default"),1===this.currPage?this.prevButton.setState("disabled"):this.prevButton.setState("default")},Qv.prototype.updatePageButtonSymbol=function(){var t=this.style.autoWrap,t=this.ifHorizontal(t?1:0,1);this.prevButton.update({symbol:["left","up"][t]}),this.nextButton.update({symbol:["right","down"][t]})},Qv.prototype.updatePageInfo=function(){var t=this.styles.pageFormatter;M(this).select(".page-info").style("text",this.currPage&&this.maxPages?t(this.currPage,this.maxPages):"")},Qv.prototype.finished=function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},Qv.prototype.prev=function(){var t,e;this.maxPages&&this.currPage&&(t=this.style.loop,(e=this.currPage-1)<1&&(e=t?this.maxPages:1),this.goTo(e))},Qv.prototype.next=function(){var t,e,n;this.maxPages&&this.currPage&&(t=this.style.loop,e=this.maxPages,n=this.currPage+1,this.goTo(n=e<n?t?1:e:n))},Qv.prototype.goTo=function(t){var e,n,r,i,a=this;t!==this.currPage&&"idle"===this.playState&&(e=(i=this.style).effect,n=i.duration,i=i.autoWrap,r=(i=R(this.ifHorizontal(i?[0,-this.pageOffsets[t-1]]:[-this.pageOffsets[t-1],0],[0,-this.pageOffsets[t-1]]),2))[0],i=i[1],this.playState="running",this.clipView.animate([{transform:this.clipView.style.transform},{transform:"translate(".concat(-r,"px,").concat(-i,"px)")}],{duration:n,easing:e,fill:"both"}),this.container.animate([{transform:this.container.style.transform},{transform:"translate(".concat(r,"px,").concat(i,"px)")}],{duration:n,easing:e,fill:"both"}),Promise.all(this.clipView.getAnimations().map(function(t){return t.finished})).then(function(){a.currPage=t,a.updatePageNavigatorState(),a.resolveFinishedPromise(),a.playState="idle"}),this.finished())},Qv.defaultOptions={style:{spacing:[4,0],effect:"easeQuadInOut",duration:320,maxRows:2,maxCols:2,pageButtonSize:10,pageInfoSpacing:2,pageFormatter:function(t,e){return"".concat(t,"/").concat(e)},pageButtonStyle:{size:10,margin:0,padding:0,markerStyle:{fill:"black",cursor:"pointer",disabled:{fill:"#d9d9d9",cursor:"not-allowed"}},backgroundStyle:{cursor:"pointer",fill:"transparent",disabled:{cursor:"not-allowed"}}},pageTextStyle:{fontSize:12,textBaseline:"middle",textAlign:"center"}}};var Kv,Jv=Qv;function Qv(t){t=Kv.call(this,I({},Qv.defaultOptions,t))||this;return t.items=[],t.maxPages=void 0,t.currPage=void 0,t.pageOffsets=[],t.playState="idle",t}function tb(t){var e=t.items,i=t.maxWidth,a=t.maxItemWidth,o=t.itemMarker,s=t.itemName,l=t.itemValue,n=t.reverse,c=t.itemWidth,u=t.itemHeight,f=t.itemPadding,h=t.itemBackgroundStyle,d=e.slice();return n&&d.reverse(),d.map(function(t,e){return{id:t.id||"legend-item-".concat(e),state:t.state||"default",value:t,maxItemWidth:gs([null!=a?a:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE]),itemMarker:(r=us(o)?o(t,e,d):o,I({},Iv,{symbol:t.marker,style:{fill:t.color,stroke:t.color}},r)),itemName:(r=I({},{formatter:function(){return t.name}},s),n=r.formatter,r=K(r,["formatter"]),I({},Rv,{content:n(t,e,d)},r)),itemValue:(n=I({},{formatter:function(){return t.value}},l),r=n.formatter,n=K(n,["formatter"]),I({},Bv,{content:r(t,e,d)},n)),itemWidth:c,itemHeight:u,padding:f,backgroundStyle:h};var n,r})}i(rb,eb=la),rb.prototype.render=function(e,t){var n=e.padding,r=e.title,i=e.inset,a=e.orient,o=void 0===a?"horizontal":a,s=e.spacing,l=e.autoWrap,c=e.maxRows,u=e.maxWidth,f=e.maxHeight,h=e.cols,d=e.pageNavigator,a=e.backgroundStyle,a=void 0===a?{}:a,n=R($y(n),4),p=n[0],y=n[1],g=n[2],n=n[3],m=jv(t,"legend-container",n,p),v=Cv(m,r),r=(null==r?void 0:r.spacing)||0,i=R($y(i),4),b=i[0],i=i[3],v=Lv(v),i=(D(jv(m,"legend-inner-group",v.left+i,v.bottom+b+r),".category-items",function(){return new Jv({})}).attr("className","category-items").call(function(t){t.node().update(_({orient:o,items:tb(e),spacing:s,autoWrap:l,maxRows:c,maxWidth:u,maxHeight:f,cols:h},d||{}))}).node(),m.getLocalBounds()),v=i.min,b=i.max,r=b[0]-v[0],m=b[1]-v[1];Fv(t,"legend-background",Math.min(r+y+n,u||Number.MAX_VALUE),Math.min(m+p+g,f||Number.MAX_VALUE),a)},rb.prototype.getItem=function(t){return this.querySelector("[id=".concat(t,"]"))},rb.prototype.setItemState=function(t,e,n){void 0===n&&(n=!0),null!=(t=this.getItem(t))&&t.setState(e,n)},rb.prototype.getItemsStates=function(){return this.querySelectorAll(".legend-item").map(function(t){return{id:t.id,state:t.getState()}})};var eb,nb=rb;function rb(t){return eb.call(this,I({},Dv,t))||this}function ib(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}E.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),E.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),E.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});i(sb,ab=F.CustomElement),sb.prototype.connectedCallback=function(){this.draw()},sb.prototype.attributeChangedCallback=function(){this.draw()},sb.prototype.draw=function(){this.updateBackground(),this.updateTrack()},sb.prototype.updateBackground=function(){var t=this.style.backgroundColor;this.path.style.path=this.getRailPath(),this.path.attr({fill:t,fillOpacity:.45})},sb.prototype.updateTrack=function(){var t=this.style.fill,e=(this.track.style.path=this.getRailPath(),this.getClipPath());(this.track.style.clipPath=e)&&this.track.appendChild(e),this.track.style.fill=t},Object.defineProperty(sb.prototype,"box",{get:function(){var t=this.style,e=t.orient,n=t.size,t=t.length;return ib(e,[t,n],[n,t])},enumerable:!1,configurable:!0}),sb.prototype.getRailPath=function(){var t=this.style.type,e=R(this.box,2),n=e[0],e=e[1];return"size"===t?[["M",0,e],["L",0+n,0],["L",0+n,e]]:[["M",0,e],["L",0,0],["L",0+n,0],["L",0+n,e]]},sb.prototype.getClipPath=function(){var t,e,n,r,i=this.style,a=i.orient,i=i.selection;return i?(r=(t=R(this.box,2))[0],t=t[1],n=(i=R(i,2))[0],i=i[1],e=ib(a,n*r,0),n=ib(a,0,n*t),r=ib(a,i*r,r),a=ib(a,t,i*t),new F.Path({style:{path:[["M",e,n],["L",e,a],["L",r,a],["L",r,n]]}})):null};var ab,ob=sb;function sb(t){t=ab.call(this,hg({},{style:zv},t=void 0===t?{}:t))||this;return t.path=t.appendChild(new F.Path({className:"rail-path"})),t.track=t.appendChild(new F.Path({className:"rail-path"})),t}i(ub,lb=la),ub.prototype.render=function(t,e){var n=t.textStyle,r=t.visibility,i=t.symbol,a=t.size,o=t.fill,s=t.stroke,l=t.lineWidth;i&&"hidden"!==r?(D(e,".handle",function(){return new E({})}).attr("className","handle").call(function(t){t.node().update({symbol:i,size:a,fill:o,stroke:s,lineWidth:l})}),D(e,".handle-text","text").attr("className","handle-text").call(S,n)):(null!=(t=e.querySelector(".handle"))&&t.remove(),null!=(r=e.querySelector(".handle-text"))&&r.remove())};var lb,cb=ub;function ub(){return null!==lb&&lb.apply(this,arguments)||this}i(db,fb=F.CustomElement),db.prototype.connectedCallback=function(){this.init(),this.bindEvents()},db.prototype.attributeChangedCallback=function(t,e,n){"textStyle"!==t&&"padding"!==t&&"position"!==t||this.init()},db.prototype.hide=function(){this.style.visibility="hidden"},db.prototype.show=function(){this.style.visibility="visible"},db.prototype.init=function(){var t=this.style,e=t.textStyle;"top"===t.position?this.text.attr(_({textAlign:"center"},e)):this.text.attr(_({textAlign:"left"},e))},db.prototype.updateBackground=function(){var t,e,n=this.text.getLocalBounds(),r=n.min,n=n.max,i=Math.min(n[0]-r[0],40),r=[r[0]-4,r[1]-2,r[0]+i+4,n[1]+2],a=(i=this.style.position,r=(n=R(n=r,4))[0],e=n[1],a=n[2],n=n[3],"top"===i?[["M",r,n],["L",r,e],["L",a,e],["L",a,n],["L",r+(i=a-r)/2+(t=xs(10,i/3,i/2))/2,n],["L",r+i/2,n+4],["L",r+i/2-t/2,n],["L",r,n]]:[["M",r,e],["L",a,e],["L",a,n],["L",r,n],["L",r,e+(i=n-e)/2+(t=xs(6,i/3,i/2))/2],["L",r-4,e+i/2],["L",r,e+i/2-t/2],["L",r,e]]);this.background.style.path=a},db.prototype.bindEvents=function(){var t=this;this.text.addEventListener(F.ElementEvent.BOUNDS_CHANGED,function(){t.updateBackground()})};var fb,hb=db;function db(t){t=fb.call(this,hg({},{style:{visibility:"hidden"}},t=void 0===t?{}:t))||this;return t.background=t.appendChild(new F.Path({style:{lineCap:"round",fill:"#262626",lineWidth:1,stroke:"#333"}})),t.text=t.appendChild(new F.Text({style:{text:"",fill:"#fff",fontSize:10,textBaseline:"middle"}})),t}function pb(t,e){var t=R(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}function yb(t,e,n,r,i){var a=R(ib(t,["dx","dy"],["dy","dx"]),2),o=a[0],a=a[1],s={};return s[o]=e,s[a]="start"===n?-i:r+i,s.textAlign=ib(t,"center","start"===n?"right":"left"),s.textBaseline=ib(t,"start"===n?"bottom":"top","middle"),s}function gb(t,e){var n,s,l,c,r,i,a,u=t.min,f=t.max,o=t.handle,h=t.orient,d=void 0===h?"horizontal":h;return null===t.label||o?[]:(s=hg({size:24,length:200},zv,t.rail||{}),h=hg({},Wv,t.label||{}),l=h.align,c=h.spacing,"rail"===l?(t=(o=R(ib(d,["dx","dy"],["dy","dx"]),2))[0],h=o[1],r=(o=R(ib(d,["right","left"],["center","center"]),2))[0],o=o[1],i=(a=R(ib(d,["middle","middle"],["bottom","top"]),2))[0],a=a[1],[((n={id:"legend-label-0",text:"".concat(u)})[t]=-c,n[h]=s.size/2,n.textAlign=r,n.textBaseline=i,n),((r={id:"legend-label-1",text:"".concat(f)})[t]=s.length+c,r[h]=s.size/2,r.textAlign=o,r.textBaseline=a,r)]):e.map(function(t,e){o=t,n=u,r=f,i=s;var n,r,i,a=(a=void 0!==a&&a)?o*(r-n)/i.length:Hy((o-n)*(n<r?i.length/(r-n):0),2),o=yb(d,a,l,s.size,c);return _({id:"legend-label-".concat(e),text:"".concat(t)},o)}))}var mb=zs(function(t){return t.sort(function(t,e){return t-e})},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return JSON.stringify(t)});i(kb,vb=la),kb.prototype.render=function(t,e){var n=t.padding,r=t.title,i=t.inset,a=(t.orient,t.backgroundStyle),a=void 0===a?{}:a,o=t.maxWidth,s=t.maxHeight,l=t.label,n=R($y(n),4),c=n[0],u=n[1],f=n[2],n=n[3],h=jv(e,"legend-container",n,c),d=Cv(h,r),r=(null==r?void 0:r.spacing)||0,i=R($y(i),4),p=i[0],i=i[3],d=Lv(d),i=jv(h,"legend-inner-group",d.left+i,d.bottom+p+r),d=gb(t,this.ticks),p=(Fm(i,"legend-label",d,l,{fill:"#2C3542",fillOpacity:.65,fontWeight:"normal"}),this.drawInner(),h.getLocalBounds()),r=p.min,t=p.max,i=t[0]-r[0],d=t[1]-r[1];Fv(e,"legend-background",Math.min(i+u+n,o||Number.MAX_VALUE),Math.min(d+c+f,s||Number.MAX_VALUE),a)},kb.prototype.drawInner=function(){this.drawRail(),this.drawHandles(),this.createIndicator()},Object.defineProperty(kb.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"selection",{get:function(){var t=this.style,e=t.min,n=t.max;return[t.start||e,t.end||n]},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"labelsCfg",{get:function(){var t=this.style.label;return hg({},Wv,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"railCfg",{get:function(){var t=this.style.rail;return hg({size:24,length:200},zv,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"handleCfg",{get:function(){var t=this.style,e=t.handle,t=t.label;return hg({},Hv,e||{},{textStyle:this.labelsCfg.style,spacing:this.labelsCfg.spacing,visibility:e&&null!==t?"visible":"hidden"})},enumerable:!1,configurable:!0}),kb.prototype.ifHorizontal=function(t,e){return ib(this.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Object.defineProperty(kb.prototype,"color",{get:function(){var t,e,i,a,o,n=this.style.color,n=Array.from(void 0===n?[]:n),r=n.length;return r?this.railCfg.chunked?(t=this.ticks,e=this.orient,i=Array.from(n),a=i.length,o=t.length,t.reduce(function(t,e,n){var r=i[n%a];return t+" ".concat(n/(o-1),":").concat(r).concat(n<o-1?" ".concat((n+1)/(o-1),":").concat(r):"")},"l(".concat("horizontal"===e?"0":"270",")"))):n.reduce(function(t,e,n){return t+" ".concat(n/(r-1),":").concat(e)},"l(".concat(this.ifHorizontal("0","270"),")")):""},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"slidable",{get:function(){return!!this.style.handle},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"ticks",{get:function(){var t=this.style,e=t.min,t=t.max;return mb(re(re([e],R(this.railCfg.ticks||[]),!1),[t],!1))},enumerable:!1,configurable:!0}),kb.prototype.drawRail=function(){var t=this.style,e=t.orient,n=t.min,t=t.max,r=R(this.selection,2),i=r[0],r=r[1],a=this.querySelector(".legend-inner-group");this.rail=M(this.rail||a.appendChild(new ob)).attr("className","legend-rail").call(S,_(_({},this.railCfg),{fill:this.color,orient:e})).style("selection",this.slidable?[(i-n)/(t-n),(r-n)/(t-n)]:void 0).node()},kb.prototype.drawHandles=function(){var t=R(this.selection,2),e=t[0],t=t[1];this.startHandle=this.drawHandle("start",e),this.endHandle=this.drawHandle("end",t)},kb.prototype.drawHandle=function(t,e){var n=this,r=this.labelsCfg,i=r.align,r=r.spacing,a=this.railCfg.size,o=this.handleCfg.size,s=this.getOffset(e),l=yb(this.orient,s,i,a,-o/3),c=l.dx,u=l.dy,f=yb(this.orient,s,i,a,"start"===i?r:o/3+r),l="start"===t?this.startHandle:this.endHandle,s=this.querySelector(".legend-inner-group");return M(l||s.appendChild(new cb({}))).attr("className","legend-handle-".concat(t)).call(function(t){return t.node().update(_(_({},n.handleCfg),{x:c,y:u,symbol:n.ifHorizontal("horizontalHandle","verticalHandle"),textStyle:_({text:"".concat(null!=e?e:""),x:+f.dx-+c,y:+f.dy-+u,textAlign:f.textAlign,textBaseline:f.textBaseline},n.handleCfg.textStyle)}))}).node()},kb.prototype.createIndicator=function(){this.indicator=this.appendChild(new hb({zIndex:2,className:"legend-indicator",style:{position:this.ifHorizontal("top","right")}}))},kb.prototype.bindEvents=function(){var n=this,t=new Map;t.set("rail",this.rail),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){t.addEventListener("mousedown",n.onDragStart(e)),t.addEventListener("touchstart",n.onDragStart(e))}),this.startHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.endHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.rail.addEventListener("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},kb.prototype.showIndicator=function(t,e){var n,r,i,a,o,s,l;void 0===e&&(e="".concat(t)),"number"!=typeof t?this.hideIndicator():(this.indicator.show(),l=this.querySelector(".legend-container"),n=(r=this.style).min,r=r.max,t=xs(t,n,r),n=this.ifHorizontal(this.getOffset(t),this.railCfg.size+12),r=this.ifHorizontal(-14,this.getOffset(t)),i=(t=this.rail.getBBox()).x,t=t.y,a=(o=l.getBBox()).x,o=o.y,s=(l=R(l.getLocalPosition(),2))[0],l=l[1],this.indicator.style.x=i-a+s+n,this.indicator.style.y=t-o+l+r,this.indicator.style.textStyle={text:e})},kb.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.hide()},kb.prototype.onDragEnd=function(){this.style.cursor="default",this.removeEventListener("mousemove",this.onDragging),this.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd)},kb.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},kb.prototype.setSelection=function(t,e){this.updateSelection(t,e)},kb.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=R(this.selection,2),c=l[0],l=l[1],t=R([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.style),c=n.min,l=n.max,u=R((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=R(n,2))[0],n=n[1],a=(c=R(c,2))[0],c=c[1],o=(l=R(l,2))[0],l=l[1],c=(a=R([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=R([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Hy(c,r),Hy(a,r)]),2),e=u[0],t=u[1];this.update({start:e,end:t}),this.dispatchSelection()},Object.defineProperty(kb.prototype,"step",{get:function(){var t=this.attributes,e=t.step,n=t.min,t=t.max;return Ns(e)?Hy(.01*(t-n),0):e},enumerable:!1,configurable:!0}),kb.prototype.getTickValue=function(t){return this.railCfg.chunked?pb(this.ticks,t).tick:(e=this.step,(n=this.style.min)+Math.round((t-n)/e)*e);var e,n},kb.prototype.getValueByCanvasPoint=function(t,e){var n=this.style,r=n.min,n=n.max,i=R(this.rail.getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,re([],R(tg(t)),!1));return xs(this.getOffset(i-a,!0)+r,r,n)},kb.prototype.getOffset=function(t,e){var n=this.style,r=n.min,n=n.max;return(e=void 0!==e&&e)?t*(n-r)/this.railCfg.length:Hy((t-r)*(r<n?this.railCfg.length/(n-r):0),2)},kb.prototype.dispatchSelection=function(){var t=new F.CustomEvent("valueChanged",{detail:{value:this.selection}});this.dispatchEvent(t)},kb.prototype.dispatchIndicated=function(t,e){t=new F.CustomEvent("onIndicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([mg(20)],kb.prototype,"dispatchSelection",null),t([mg(20)],kb.prototype,"dispatchIndicated",null);var vb,bb,xb,wb,Mb=kb;function kb(t){var a=vb.call(this,hg({type:"continuous-legend"},Vv,t))||this;return a.onHovering=function(t){t.stopPropagation();var e,t=a.getValueByCanvasPoint(t);Gs(a.attributes,["rail","chunked"])?(e=pb(a.ticks,t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(e=a.getTickValue(t),a.showIndicator(e),a.dispatchIndicated(e))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),a.addEventListener("mouseleave",a.onDragEnd),a.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),R(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"rail"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a}function Ob(t){bb||(bb=document.createElement("table"),wb=document.createElement("tr"),xb=/^\s*<(\w+|!)[^>]*>/,wb={tr:document.createElement("tbody"),tbody:bb,thead:bb,tfoot:bb,td:wb,th:wb,"*":document.createElement("div")});var e=xb.test(t)&&RegExp.$1,e=(e&&e in wb||(e="*"),wb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var _b,Go="tooltip",Sb="tooltip-title",Eb="tooltip-list",_a="tooltip-list-item",Wo="tooltip-list-item-name",Ab="tooltip-list-item-marker",Ho="tooltip-list-item-name-label",hc="tooltip-list-item-value",r="tooltip-crosshair-x",a="tooltip-crosshair-y",o={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},n=((e={})[".".concat(Go)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(Sb)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(Eb)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(_a)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(Ab)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(Wo)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(Ho)]=_({flex:1},o),e[".".concat(hc)]=_({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},o),e[".".concat(r)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(a)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e),Pb=(i(Nb,_b=la),Object.defineProperty(Nb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"position",{set:function(t){var t=R(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=K(t,["name","value","color","index"]);return _({name:n,value:r,color:i,index:void 0===a?e:a},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(Ob((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return bs(t)?ag(t):Ts(t)?t:us(t)?ag(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),Nb.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},Nb.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},Nb.prototype.clear=function(){this.element.innerHTML=""},Nb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},Nb.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},Nb.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},Nb.prototype.initShape=function(){var t=this.attributes.template.container;this.element=Ob(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},Nb.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(Sb)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=Eb,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=R(t,2),e=t[0],n=t[1];re([r],R(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},Nb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=R(e.offset,2),i=e[0],a=e[1],e=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=R(c,2),n=e[0],e=e[1],t=R(o[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+a)*t]}),c},Nb.prototype.setOffsetPosition=function(t){var t=R(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(r+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},Nb.prototype.updatePosition=function(){this.throttleUpdatePosition()},Nb.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=R(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=R([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},Nb.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},Nb.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},Nb.tag="tooltip",Nb.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(Go,'"></div>'),title:'<div class="'.concat(Sb,'"></div>'),item:'<li class="'.concat(_a,'" data-index={index}>\n <span class="').concat(Wo,'">\n <span class="').concat(Ab,'" style="background:{color}"></span>\n <span class="').concat(Ho,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(hc,'" title="{value}">{value}</span>\n </li>')},style:n}},Nb);function Nb(t){var e=_b.call(this,I({},Nb.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=Js(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var Tb,Lb={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function Cb(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function jb(t){return Tb.call(this,I({},jb.defaultOptions,t))||this}i(jb,Tb=la),jb.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=D(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=Gs(Lb,n,Lb.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&D(e,".switch-tag",function(){return new Sg({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(I({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=_(_({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),D(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",f).style("fillOpacity",r?.4:1).call(S,h).node()),y=D(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(S,h).node();D(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",f).call(function(t){var e,t=t.node(),n=Cb(p,a,o),r=Cb(p,a,!o);t.attr("x")&&!Zs(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=y.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),y.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},jb.defaultOptions={type:jb.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var Fb,Do={text:"",type:"primary",height:20,width:20,buttonStyle:{default:{lineWidth:0,fill:"#fff"},active:{fill:"#fff"},disabled:{fill:"#fff"}},markerStyle:{default:{fill:"black",size:10},disabled:{fill:"#8c8c8c"}}};function Ib(t){var t=Fb.call(this,I({},Ib.defaultOptions,t))||this,e=(t.playState="idle",t.attributes),n=e.view,e=e.initPageNum;return t.currPage=e,t.view=n,t.init(),t}i(Ib,Fb=la),Object.defineProperty(Ib.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"maxPages",{get:function(){var t=this.attributes,e=t.pageWidth,n=t.pageHeight,r=t.orient,i=t.pageLimit;return t.pageCallback||i!==1/0?i:"horizontal"===r?Math.ceil(this.width/e):Math.ceil(this.height/n)},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"view",{get:function(){return this.fullView},set:function(t){var e=this.attributes,n=e.width,e=e.height;t.setLocalPosition(0,0),this.fullView=t,n&&e||(e=(n=rg(t)).width,t=n.height,this.width=e,this.height=t)},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"width",{get:function(){var t=this.attributes.width;return t||this.viewWidth},set:function(t){this.viewWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"height",{get:function(){var t=this.attributes.height;return t||this.viewHeight},set:function(t){this.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"btnPosition",{get:function(){var t;return null!=(t=this.style.button)&&t.position?this.style.button.position:"horizontal"===this.style.orient?"right":"bottom"},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"defaultShape",{get:function(){return["left","right","left-right"].includes(this.btnPosition)?["left","right"]:["up","down"]},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"buttonCfg",{get:function(){var t=R(this.defaultShape,2),e=t[0],t=t[1],n=this.attributes.button,r=n.prev,n=n.next;return{prev:_({marker:e},r),next:_({marker:t},n)}},enumerable:!1,configurable:!0}),Ib.prototype.render=function(t,e){},Ib.prototype.init=function(){this.initShape(),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},Ib.prototype.update=function(t){var e=t.view;e&&(this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.currPage=this.attributes.initPageNum,this.view=e,this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack()),this.attr(I({},this.attributes,t)),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},Ib.prototype.clear=function(){this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.fullView=void 0,this.removeChildren()},Ib.prototype.destroy=function(){this.removeChildren(),Fb.prototype.destroy.call(this)},Ib.prototype.goTo=function(t){var e,n,r,i,a,o,s,l,c,u,f=this;return"idle"===this.playState&&(e=(n=this.attributes).effect,n=n.duration,r=(c=this.calcRelativePagingOffset(t)).viewFromX,i=c.viewFromY,a=c.viewToX,o=c.viewToY,u=c.clipFromX,s=c.clipFromY,l=c.clipToX,c=c.clipToY,this.playState="running",this.clipView.animate([{transform:"translate(".concat(u,"px, ").concat(s,"px)")},{transform:"translate(".concat(l,"px, ").concat(c,"px)")}],{duration:n,easing:e,fill:"both"}),null!=(u=this.view.animate([{transform:"translate(".concat(r,"px, ").concat(i,"px)")},{transform:"translate(".concat(a,"px, ").concat(o,"px)")}],{duration:n,easing:e,fill:"both"})))&&u.finished.then(function(){f.currPage=t,f.updateButtonState(),f.resolveFinishedPromise(),f.playState="idle"}),this.finished},Ib.prototype.prev=function(){var t=this.attributes.loop,e=this.currPage-1;return e<1&&(e=t?this.maxPages:1),this.goTo(e)},Ib.prototype.next=function(){var t=this.attributes.loop,e=this.maxPages,n=this.currPage+1;return this.goTo(n=e<n?t?1:e:n)},Ib.prototype.initShape=function(){this.clipView=new F.Rect({name:"clipView",style:{x:0,y:0,width:0,height:0}}),this.view.style.clipPath=this.clipView,this.view.appendChild(this.clipView),this.appendChild(this.view),this.view.toBack();var t=R(this.defaultShape,2),e=t[0],t=t[1];this.prevButton=new Cg({name:"prevButton",style:_(_({},Ib.defaultOptions.style.button.prev),{marker:e,onClick:this.prev.bind(this)})}),this.appendChild(this.prevButton),this.nextButton=new Cg({name:"nextButton",style:_(_({},Ib.defaultOptions.style.button.next),{marker:t,onClick:this.next.bind(this)})}),this.appendChild(this.nextButton),this.paginationGroup=new F.Group({name:"paginationGroup"}),this.appendChild(this.paginationGroup)},Ib.prototype.updateView=function(){var t=this.getClipViewSpace(this.currPage),e=t.width,t=t.height;this.clipView.attr({width:e,height:t}),this.view.setLocalPosition(0,0),this.clipView.setLocalPosition(0,0)},Ib.prototype.updateButton=function(){var t=this.buttonCfg,e=t.prev,t=t.next;e&&this.prevButton.update(e),t&&this.nextButton.update(t)},Ib.prototype.updateButtonState=function(){this.attributes.loop?(this.nextButton.setState("default"),this.prevButton.setState("default")):(this.nextButton.setState(this.currPage===this.maxPages?"disabled":"default"),this.prevButton.setState(1===this.currPage?"disabled":"default"))},Ib.prototype.getClipViewSpace=function(t){var e=this.attributes,n=e.orient,r=e.pageWidth,i=e.pageHeight,e=e.pageCallback,a={x:0,y:0,width:r,height:i},o=this.maxPages;return e?_(_({},a),e(t)):(o<t||t<1||("vertical"===n?a.y=(t-1)*i:"horizontal"===n&&(a.x=(t-1)*r)),a)},Ib.prototype.absolute2Relative=function(t,e){var n=this.currPage,n=this.getClipViewSpace(n);return[t+n.x,e+n.y]},Ib.prototype.getViewPosition=function(t){var e=this.getClipViewSpace(1),n=e.x,e=e.y,t=this.getClipViewSpace(t),n=R([-t.x+n,-t.y+e],2);return{x:n[0],y:n[1]}},Ib.prototype.getRelativeViewPosition=function(t){var t=this.getViewPosition(t),e=t.x,t=t.y,e=R(this.absolute2Relative(e,t),2);return{x:e[0],y:e[1]}},Ib.prototype.calcRelativePagingOffset=function(t){var e=R(this.absolute2Relative.apply(this,re([],R(this.view.getLocalPosition().slice(0,2)),!1)),2),n=e[0],e=e[1],t=this.getRelativeViewPosition(t),r=t.x,t=t.y,i=R([-n,-e],2),a=i[0],i=i[1],o=R([-r,-t],2);return{viewFromX:n,viewFromY:e,viewToX:r,viewToY:t,clipFromX:a,clipFromY:i,clipToX:o[0],clipToY:o[1]}},Ib.prototype.adjustLayout=function(){this.adjustButton()},Ib.prototype.adjustButton=function(){var t,e=this.attributes,n=e.button,r=e.pageWidth,e=e.pageHeight,i=this.btnPosition,n=(null==n?void 0:n.spacing)||0,a=rg(this.prevButton),o=a.width,a=a.height,s=rg(this.nextButton),l=s.width,s=s.height,c=0,u=0,f=0,h=0;"left-right"===i?(c=-(n+o),u=(e-a)/2,f=n+r,h=(e-s)/2):"top-bottom"===i?(c=(r-o)/2,u=-(n+a),f=(r-l)/2,h=n+e):"top"===i?(c=(r-n)/2-o,u=-(n+(t=ys([a,s]))),f=(r+n)/2,h=-(n+t)):"bottom"===i?(c=(r-n)/2-o,f=(r+n)/2,h=u=n+e):"left"===i?(c=(f=-(n+l))-(n+o),h=u=(e-(t=ys([a,s])))/2):"right"===i&&(f=(c=n+r)+o,h=u=(e-(t=ys([a,s])))/2),this.prevButton.setLocalPosition(c,u),this.nextButton.setLocalPosition(f,h)},Ib.defaultOptions={type:Ib.tag="page-navigator",style:{x:0,y:0,effect:"linear",duration:200,orient:"horizontal",initPageNum:1,pageLimit:1/0,loop:!1,button:{prev:_({spacing:0},Do),next:_({spacing:0},Do),style:{default:{},active:{},disabled:{}},spacing:5},pagination:{type:"currTotal",style:{default:{},active:{}},separator:"/",spacing:5}}},E.registerSymbol("left",function(t,e,n){return[["M",t-n,e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),E.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]}),E.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n],["L",t+n,e+n],["Z"]]}),E.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n],["Z"]]});var Rb,Bb,Db,zb,ta={text:{text:""},lineStyle:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,lineDash:[5,5]}},Vo=hg({},ta,{type:"line",text:{position:"start",align:"center",verticalAlign:"bottom"}}),aa=hg({},ta,{type:"circle",defaultRadius:0}),oa=hg({},ta,{type:"polygon",defaultRadius:0,startAngle:0}),sa=(i(Wb,Rb=la),Object.defineProperty(Wb.prototype,"localPointer",{get:function(){var t=R(this.getPosition(),2),e=t[0],t=t[1],n=R(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(Wb.prototype,"tagCfg",{get:function(){var t=this.attributes.text;return t.position,K(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(Wb.prototype,"crosshairCfg",{get:function(){var t=this.attributes.lineStyle;return _(_({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),Wb.prototype.render=function(t,e){var n=this,e=D(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=D(e,".crosshair-tag",function(){return new Sg({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=D(e,".crosshair-path","path").attr("className","crosshair-path").call(S,this.crosshairCfg).node(),this.adjustLayout()},Wb.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},Wb.prototype.setPointer=function(t){this.pointer=t},Wb.defaultOptions={type:Wb.tag="crosshair-base",style:ta},Wb);function Wb(t){return Rb.call(this,I({},Wb.defaultOptions,t))||this}function Hb(t){return Bb.call(this,hg({},Hb.defaultOptions,t))||this}function Vb(t){return Db.call(this,hg({},Vb.defaultOptions,t))||this}function Gb(t){return zb.call(this,hg({},Gb.defaultOptions,t))||this}i(Hb,Bb=sa),Object.defineProperty(Hb.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=R(t.startPos,2),n=e[0],e=e[1],t=R(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(Hb.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=R(this.getPosition(),2))[0],e=e[1],[(n=R(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(Hb.prototype,"isVertical",{get:function(){var t=this.attributes,e=R(t.startPos,2),n=e[0],e=e[1],t=R(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(Hb.prototype,"tagShapeSpace",{get:function(){var t=rg(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Hb.prototype.update=function(t){Bb.prototype.update.call(this,t)},Hb.prototype.setPointer=function(t){Bb.prototype.setPointer.call(this,t),this.adjustPosition()},Hb.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},Hb.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},Hb.prototype.adjustPosition=function(){var t=R(this.localPointer,2),e=t[0],t=t[1],n=R(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},Hb.prototype.adjustTag=function(){var t,e,n=this.attributes,r=n.text,i=R(n.startPos,2),a=i[0],i=i[1],n=R(n.endPos,2),o=n[0],n=n[1];r&&""!==r?(this.tagShape.show(),r=r.position,e=(t=this.tagShapeSpace).width,t=t.height,a=(o=R(this.getOrientVal({start:[-e/2,t/2],end:[o-a+e/2,t/2]},{start:[0,0],end:[0,n-i+t]})[r],2))[0],e=o[1],this.tagShape.setLocalPosition(a,e)):this.tagShape.hide()},Hb.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},Hb.defaultOptions={type:Hb.tag="line-crosshair",style:Vo},t([mg(20)],Hb.prototype,"setPointer",null),i(Vb,Db=sa),Object.defineProperty(Vb.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),Vb.prototype.update=function(t){Db.prototype.update.call(this,t)},Vb.prototype.setPointer=function(t){var t=R(t,2),e=t[0],t=t[1],e=(Db.prototype.setPointer.call(this,[e,t]),R(this.localPointer,2)),t=e[0],e=e[1],n=R(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},Vb.prototype.adjustLayout=function(){this.tagShape.hide()},Vb.prototype.createCirclePath=function(t){var e=this.attributes,n=R(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return bg(r,n,t||e)},Vb.defaultOptions={type:Vb.tag="circle-crosshair",style:aa},t([mg(20)],Vb.prototype,"setPointer",null),i(Gb,zb=sa),Object.defineProperty(Gb.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),Gb.prototype.update=function(t){zb.prototype.update.call(this,t)},Object.defineProperty(Gb.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),Gb.prototype.setPointer=function(t){var t=R(t,2),e=t[0],t=t[1],e=(zb.prototype.setPointer.call(this,[e,t]),R(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=R(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=gg(n,[t,e])/gg(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},Gb.prototype.adjustLayout=function(){this.tagShape.hide()},Gb.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=R(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=R(t,2),t=R(Zt([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},Gb.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=R(t,2),c=t[0],u=t[1],f=this.points,t=R(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var y=R(f[p-1],2),g=y[0],y=y[1],m=R(f[p%f.length],2),v=m[0],m=m[1],g=(i=[h,d],g=[g+h,y+d],y=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=R(r=[c,u],2))[0],r=r[1],a=(i=R(i,2))[0],i=i[1],o=(g=R(g,2))[0],g=g[1],s=(y=R(y,2))[0],y=y[1],l=[],(y-g)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(g-r)*(a-m)&&(pg(m,a,r,i,o,g)&&yg(l,o,g),pg(m,a,r,i,s,y)&&yg(l,s,y),pg(o,s,g,y,m,r)&&yg(l,m,r),pg(o,s,g,y,a,i))&&yg(l,a,i):(v=(m*(i-r)+g*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(y-g)),0<=(y=(o*(y-g)+r*(s-o)-g*(s-o)-m*(y-g))/((a-m)*(y-g)-(s-o)*(i-r)))&&y<=1&&0<=v&&v<=1&&(l[0]=m+y*(a-m),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=R(g,2))[0],n=s[1])}return[e,n]},Gb.defaultOptions={type:Gb.tag="polygon-crosshair",style:oa},t([mg(20)],Gb.prototype,"setPointer",null);i(Xb,qb=F.DisplayObject),Object.defineProperty(Xb.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&hs(t)?t.map(function(t){return hs(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=R(t,2),n=t[0],t=t[1];return"wavy"===t?_({path:r.getWavyPath(n)},i):"double"===t?_({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},_(_({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),Xb.prototype.update=function(t){var e=this;this.attr(hg({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new F.Path({style:t}))})},Xb.prototype.clear=function(){this.removeChildren()},Xb.prototype.getLinePos=function(t){var e=R(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=R([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=R([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=R([0,a*r],2))[0],n):(s=(t=R([0,a*e+i/2],2))[0],t))[1];return[s,o]},Xb.prototype.getLinePath=function(t){var e=this.attributes.width,t=R(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},Xb.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=R(this.getLinePos(t),2),a=i[0],i=i[1],o=R([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=R([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=R([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=R([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},Xb.prototype.getWavyPath=function(t){return[]},Xb.tag="decoration",Xb.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var qb,Yb,Ub=Xb;function Xb(t){t=qb.call(this,hg({},Xb.defaultOptions,t))||this;return t.update({}),t}function $b(t){t=Yb.call(this,hg({},$b.defaultOptions,t))||this;return t.init(),t}i($b,Yb=la),Object.defineProperty($b.prototype,"textWidth",{get:function(){var e=this;return ys(this.renderText.split("\n").map(function(t){return By(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"textHeight",{get:function(){return rg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"height",{get:function(){var t=this.attributes.height;return ws(t)&&0!==t?t:rg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Wy(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Wy(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return Ry(t,ws(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&ws(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"font",{get:function(){return qs(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return _(_(_({},Ky),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return _({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return hg({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),$b.prototype.init=function(){this.initShape(),this.update({})},$b.prototype.update=function(t){this.attr(hg({},this.attributes,t)),this.render()},$b.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new Ub({style:t}))})},$b.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},$b.prototype.initShape=function(){this.backgroundShape=new F.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new F.Group({name:"decoration-group"}),this.textShape=new F.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},$b.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&ws(n)&&"clip"===e&&(this.clipRect=new F.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},$b.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;ws(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},$b.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},$b.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},$b.defaultOptions={type:$b.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var Zb,ca=_(_({},Ky),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),Kb={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},Jb={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function Qb(t){return Zb.call(this,I({},Qb.defaultOptions,t))||this}i(Qb,Zb=la),Qb.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,D(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=Bs({},this.checked?Kb.selected:Kb.default,r),r=Bs({},Jb,i),t=(this.checkboxBoxShape=D(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(S,e).node(),D(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(S,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;D(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(S,n)},Qb.defaultOptions={type:Qb.tag="checkbox",style:{x:0,y:0,label:_({text:""},ca),spacing:4,checked:!1}};var t2="gui-poptip",e2="gui-poptip-arrow",n2="gui-poptip-text",r2=((c={})[".".concat(t2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},c[".".concat(n2)]={"text-align":"center"},c[".".concat(t2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},c[".".concat(t2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},c[".".concat(t2,"[data-position='right']")]={transform:"translate(0, -50%)"},c[".".concat(t2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},c[".".concat(t2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},c[".".concat(t2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},c[".".concat(t2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},c[".".concat(t2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},c[".".concat(t2,"[data-position='right-top']")]={transform:"translate(0, 0)"},c[".".concat(t2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},c[".".concat(t2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},c[".".concat(t2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},c[".".concat(e2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},c[".".concat(t2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},c["[data-position='top'] .".concat(e2)]={bottom:"-2px"},c[".".concat(t2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},c["[data-position='left'] .".concat(e2)]={right:"-2px"},c[".".concat(t2,"[data-position='right']")]={transform:"translate(5px, -50%)"},c["[data-position='right'] .".concat(e2)]={left:"-2px"},c[".".concat(t2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},c["[data-position='bottom'] .".concat(e2)]={top:"-2px"},c[".".concat(t2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},c["[data-position='top-left'] .".concat(e2)]={left:"10px",bottom:"-2px"},c[".".concat(t2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},c["[data-position='top-right'] .".concat(e2)]={right:"10px",bottom:"-2px"},c[".".concat(t2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},c["[data-position='left-top'] .".concat(e2)]={right:"-2px",top:"8px"},c[".".concat(t2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},c["[data-position='left-bottom'] .".concat(e2)]={right:"-2px",bottom:"8px"},c[".".concat(t2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},c["[data-position='right-top'] .".concat(e2)]={left:"-2px",top:"8px"},c[".".concat(t2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},c["[data-position='right-bottom'] .".concat(e2)]={left:"-2px",bottom:"8px"},c[".".concat(t2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},c["[data-position='bottom-left'] .".concat(e2)]={top:"-2px",left:"8px"},c[".".concat(t2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},c["[data-position='bottom-right'] .".concat(e2)]={top:"-2px",right:"8px"},c),i2=void 0;var a2;function o2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function s2(t){var n,r;return n=o2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(i2,t)}(t)}function l2(t){t=a2.call(this,I({style:{id:"gui-poptip"}},l2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(l2,a2=la),Object.defineProperty(l2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),l2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},l2.prototype.update=function(t){this.attr(I({},this.style,t)),this.render(this.attributes,this)},l2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=K(i,["html","target"]),n=Bs({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=R(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},l2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=R(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},l2.prototype.clear=function(){this.container.innerHTML=""},l2.prototype.destroy=function(){var t,e=this;re([],R(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},l2.prototype.showTip=function(t,e,n){var r,i=Gs(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(n2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},l2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},l2.prototype.getContainer=function(){return this.container},l2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(t2).concat(t?" ".concat(t):"")},l2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=s2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},l2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(e2,'"></span>'));t.innerHTML=n,bs(r)?t.innerHTML+=r:r&&Ts(r)&&t.appendChild(r),e&&(t.getElementsByClassName(n2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},l2.prototype.applyStyles=function(){var t,e=hg({},r2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=R(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=R(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},l2.prototype.setOffsetPosition=function(t,e,n){var n=R(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},l2.tag="poptip",l2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:r2,template:'<div class="'.concat(n2,'"></div>')}};function c2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return h1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=F1(l,t),t=F1(t,i),i=F1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),h1()(s)}const u2=ey(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=K(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=J(e,"background"),h=f["padding"],f=K(f,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=K(d,["points"]),i=[[+i,+a],[+n,+r]],a=Q(t).maybeAppend("text","text").call(B,e).node(),n=c2(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(B,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(B,o?f:{}).node(),i,p,u),r=l&&new E({id:"startMarker",style:J(e,"startMarker")}),a=c&&new E({id:"endMarker",style:J(e,"endMarker")});Q(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(B,s?d:{})}),f2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return Q(new u2).style("x",i).style("y",o).call(B,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(B,a).call(B,l).node()}};f2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const h2=ey(t=>{var e=K(t.attributes,["class","x","y"]);const n=J(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(Q(t).maybeAppend("marker",()=>new E({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",a).call(B,e)}),d2=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return Q(new h2).call(B,r).style("x",e).style("y",a).call(B,o).call(B,s).node()}},p2=(d2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},ey(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new F.Path({})).style("d",n).call(B,i),Q(t).maybeAppend("area-path",()=>new F.Path({})).style("d",e).call(B,r)}));const y2=t=>{const{curve:u,gradient:f=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connectNulls:d=!1}=t,p=K(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=U1(n,r,i,a),r=n["fill"],i=K(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,s=(e=e,bu(s=c)?(e=e["transform"],`translate(${(s=s.getCenter())[0]}, ${s[1]}) `+(e||"")):""),e=f&&n?G1(n,r,o,f):a;const l=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:e,fill:e}),s&&{transform:s}),p);var[n,r]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,h),o=J(p,"connect"),a=!!r.length,i=t=>Q(new F.Path({})).style("d",t).call(B,l).node();return bu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=d1().curve(p1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,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 m1(a())},delete t.lineX0,t.lineEndAngle=function(){return m1(o())},delete t.lineX1,t.lineInnerRadius=function(){return m1(s())},delete t.lineY0,t.lineOuterRadius=function(){return m1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(g1(t)):e()._curve},t.angle((t,e)=>R1(j1(r[e],n))).outerRadius((t,e)=>F1(r[e],n)).innerRadius((t,e)=>F1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!a||d&&!Object.keys(o).length?i(e(n)):a&&!d?i(e(t)):Q(new p2).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},o),p)).style("areaPath",e(t)).style("connectPath",r.map(e).join("")).node()):(s=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return d1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(h)).curve(u)(n)},!a||d&&!Object.keys(o).length?i(s(n)):a&&!d?i(s(t)):Q(new p2).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},o),p)).style("areaPath",s(t)).style("connectPath",r.map(s).join("")).node())}},g2=(y2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=bu(n)?A1:c1;return y2(Object.assign({curve:i},a))(t,e,n,r)}),m2=(g2.props=Object.assign({},y2.props),t=>{const{alpha:a=.5}=t,o=K(t,["alpha"]);return(t,e,n,r)=>{var i=bu(n)?S1:O1;return y2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),v2=(m2.props=Object.assign({},y2.props),i=>(t,e,n,r)=>y2(Object.assign({curve:N1},i))(t,e,n,r)),b2=(v2.props=Object.assign({},y2.props),t=>{const l=t["arrowSize"],c=K(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=U1(r,a,o,s),a=r["stroke"],o=K(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=z0();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=H1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),Q(new F.Path).call(B,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(B,c).node()}}),x2=(b2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=z0();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),Q(new F.Path).call(B,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(B,s).node()}});x2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const w2=t=>{const{cornerRatio:u=1/3}=t,f=K(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=U1(r,o,s,l),o=r["stroke"],s=K(r,["stroke"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=z0(),bu(o)?(i=F1(t,c=o.getCenter()),i=(F1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),V1(a,t,e,c,i)):vu(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return Q(new F.Path).call(B,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(B,f).node()}},M2=(w2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=z0();return t.moveTo(e[0],e[1]),bu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):V1(t,e,i,D1(e,i),F1(e,i)/2),Q(new F.Path).call(B,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(B,s).node()}}),k2=(M2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return Q(new F.Image).call(B,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(B,u).node()}});k2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const O2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=U1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),r=function(i,t){const a=z0();if(bu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>F1(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?V1(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return Q(new F.Path).call(B,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(B,l).node()}};O2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=U1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,a]=t,o=z0();return bu(e)?(n=F1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),V1(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),V1(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return Q(new F.Path).call(B,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(B,l).node()}};_2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const S2=t=>{const g=K(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=U1(r,e,f,h),{fill:e,stroke:f}=r,h=K(r,["fill","stroke"]),y=(r=t,t=n,n=z0(),bu(t)?([i,a]=t=t.getCenter(),o=I1(j1(r[0],t)),s=I1(j1(r[1],t)),y=F1(t,r[2]),l=F1(t,r[3]),c=F1(t,r[8]),u=F1(t,r[10]),t=F1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,y,o,s),n.arc(i,a,y,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return Q(new F.Path).call(B,h).style("d",y.toString()).style("stroke",f).style("fill",d||e).style("transform",p).call(B,g).node()}};S2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const E2=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=K(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,bu(t=n)?(t=t.getCenter(),o1()({startAngle:0,endAngle:2*Math.PI,outerRadius:F1(a[0],t),innerRadius:F1(a[1],t)})):h1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,bu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return Q(new F.Path({})).call(B,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(B,s).node()}};function A2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}E2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const P2=ey(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=K(e,["points","class","endMarker","direction"]),i=J(e,"endMarker"),n=(n=n,h1().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new E({className:"marker",style:Object.assign(Object.assign({},i),{symbol:A2})}):null).call(B,e)});const N2=t=>{const{offset:s=0,connectLength1:l}=t,c=K(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=l}=r,i=K(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(vu(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,o);return Q(new P2).call(B,i).style("points",n).style("stroke",r||a).style("transform",e).call(B,c).node()}};function T2(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=df(a.x,c),i=df(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function L2(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=Y1(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=j2(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?C2(s,h,n):D1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function C2(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function j2(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function F2(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:f=.5,offset:h=0}=e,d=Y1(n,t,[i,a]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),y=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?f:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+h]})();const g=0<Math.sin(y)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=C2(p,y,t),[e,r]=C2(p,y,e),i=l?g*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:l,connectorPoints:m,dx:l?+u*g:0},v=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},v(e,"x0","y0")),v(t)),(e=r,v=0<g||xu(n),t=j2(y,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function I2(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(xu(r)?L2:Ou(r)?F2:T2)(t,e,n,r)}N2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var R2=Object.freeze({__proto__:null,top:I2,bottom:I2,right:I2,left:I2,topLeft:I2,topRight:I2,bottomLeft:I2,bottomRight:I2,inside:I2,outside:I2,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=lu(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=I1(j1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function B2(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:Ou(a)?"inside":vu(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=R2[i.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},a),e(i,t,r,n));throw new Error("Unknown position: "+i)}const D2=t=>(t,e,n,r)=>{var i=e["text"],a=K(e,["text","x","y"]),t=B2(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=K(t,["rotate","transform"]);return Q(new u2).call(B,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(B,a).node()},z2=(D2.props={},t=>{const s=t["colorAttribute"],l=K(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=K(U1(r,i,a,o),["stroke"]),{d:i,color:a}=e;return Q(new F.Path).call(B,r).style("d",i).style(s,a).call(B,l).node()}}),W2=(z2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>z2(Object.assign({colorAttribute:"fill"},t))),H2=(W2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>z2(Object.assign({fill:"none",colorAttribute:"stroke"},t))),V2=(H2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=K(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),G2=(V2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),q2={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Y2="#416180",U2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:G2[100],enter:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:Y2,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Y2,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Y2,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Y2,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Y2,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Y2,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Y2,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Y2,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Y2,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:G2[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:G2[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:G2[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:G2[25],tickLineLineWidth:1,tickLineLength:4,labelFill:G2[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:G2[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:G2[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:G2[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:G2[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:G2[100],navButtonFillOpacity:1,navPageNumFill:G2[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:G2[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:G2[6],handleMarkerStroke:G2[25],handleMarkerLineWidth:1,handleLabelFill:G2[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:G2[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Y2,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:q2[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:Y2,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:G2[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:G2[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:G2[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:G2[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},X2=(U2.props={},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),$2={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Z2="#F9FBFD",K2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:$2[100],enter:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:$2[65],fontSize:12,connectorStroke:Z2,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Z2,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Z2,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Z2,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Z2,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Z2,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Z2,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Z2,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Z2,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:$2[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:$2[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:$2[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:$2[25],tickLineLineWidth:1,tickLineLength:4,labelFill:$2[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:$2[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:$2[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:$2[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:$2[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:$2[100],navButtonFillOpacity:1,navPageNumFill:$2[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:$2[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:$2[6],handleMarkerStroke:$2[25],handleMarkerLineWidth:1,handleLabelFill:$2[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:$2[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Z2,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:X2[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:Z2,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:$2[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:$2[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:$2[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:$2[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function J2(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}K2.props={};var Q2,tx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ex(t){var e;if(e=tx.exec(t))return new nx({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]});throw new Error("invalid format: "+t)}function nx(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function rx(t,e){var n,e=J2(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}ex.prototype=nx.prototype,nx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ix={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>rx(100*t,e),r:rx,s:function(t,e){var n,r,i=J2(t,e);return i?(n=i[0],(i=(i=i[1])-(Q2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+J2(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ax(t){return t}var ox,sx,lx=Array.prototype.map,cx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ux(t){var e,s,l,M=void 0===t.grouping||void 0===t.thousands?ax:(s=lx.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",k=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?ax:(e=lx.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=ex(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,y=t.precision,g=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):ix[m]||(void 0===y&&(y=12),g=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=ix[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?cx[8+Q2/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?k+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=M(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=M(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return O(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=ex(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=J2(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=cx[8+e/3];return function(t){return n(r*t)+i}}}}function fx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function hx(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Wc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new Zp({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return ku(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Zp({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Zp({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return bu(s)||vu(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:vu(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,text:u(t,e,n)}}),xu(s)&&"arcY"===o?i.map(({value:t,text:e})=>({value:1-t,text:e})):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),text:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n)}})}function dx(t,e,n,r,i){var a;return bu(a=n)&&vu(a)||Mu(n)?[]:t.map(t=>{t=function(t,e,n,r,i){var[r,a]=r,[i,o]=i,[n,s]=fx(n);let l,c,u,f;return"bottom"===e||"top"===e?(l=c=r+(i-r)*t,u=a,f="bottom"===e?a-s:a+s):(u=f=a+(o-a)*t,l=r,c="left"===e?r+n:r-n),[[l,u],[c,f]]}(t.value,e,n,r,i);return{points:bu(n)?[t[0]]:t}})}ua=ux({thousands:",",grouping:[3],currency:["$",""]}),ox=ua.format,ua.formatPrefix;const px=t=>{const{position:u,labelFormatter:f=t=>""+t,tickFilter:h,tickCount:d,tickMethod:p}=t,y=K(t,["position","labelFormatter","tickFilter","tickCount","tickMethod"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=hx(t,e,d,f,h,p,u,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),{grid:c=!1}=y,c=c?function(t,e,n,r,i,a,o){const[s,l]=e;var[e,o]=fx(o),e=Math.min(e,o)/2;const c=i*e,u=a*e;return t.map(({value:t})=>{var t=(r-n)*t+n,e=Math.cos(t*Math.PI/180),t=Math.sin(t*Math.PI/180);return{points:[[s+c*e,l+c*t],[s+u*e,l+u*t]]}})}(a,i,e,o,s,l,n):[];return new rv({style:I({},{center:i,radius:t,startAngle:e,endAngle:o,ticks:a,verticalFactor:"arc"===u?1:-1,axisLine:{style:Object.assign({lineWidth:0,strokeOpacity:0},J(y,"line"))},grid:{items:c,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.1,lineDash:[0,0]},J(y,"grid"))},tickLine:{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},J(y,"tick"))},label:{align:"arcInner"===u?"radial":"tangential",tickPadding:2,style:J(y,"label")}})})}},yx=v=>{const{position:b,title:x,labelFormatter:w=t=>""+t,direction:M="left",tickCount:k,tickFilter:O,tickMethod:_,titleAnchor:S}=v,E=K(v,["position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod","titleAnchor"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{startPos:a,endPos:o,labelOffset:s,titlePosition:l,titlePadding:c,titleRotate:u,verticalFactor:f,titleOffsetY:h,labelAlign:d,axisLine:p,label:y=void 0===v.label||v.label,tickLine:g=void 0===v.tickLine||v.tickLine}=function(t,e,n){var{x:n,y:r,width:i,height:a}=n;return"bottom"===t?{startPos:[n,r],endPos:[n+i,r],labelOffset:8,titlePosition:"end",titlePadding:2,titleRotate:0,verticalFactor:1}:"left"===t||"centerHorizontal"===t?{startPos:[n+i,r],endPos:[n+i,r+a],titlePosition:"center",titlePadding:6,titleRotate:-90,labelAlign:"end",labelOffset:4,verticalFactor:-1}:"right"===t?{startPos:[n,r],endPos:[n,r+a],titlePosition:"center",titlePadding:16,titleRotate:-90,labelAlign:"start",labelOffset:4,verticalFactor:1}:"arcY"===t?{startPos:[n,r],endPos:[n+i,r+a],titlePosition:"start",titlePadding:4,titleOffsetY:-5,titleRotate:0,labelOffset:"left"===e?4:"right"===e?-4:0,verticalFactor:-1,labelAlign:"center"===e?"center":"right"===e?"start":void 0,axisLine:!1}:{startPos:[n,r+a],endPos:[n+i,r+a],titlePosition:"end",titlePadding:2,titleRotate:0,labelOffset:4,verticalFactor:-1}}(b,M,i),e=hx(t,e,k,w,O,_,b,n),l="arcY"===b||t.getTicks?l:"center",[,m]=n.getCenter(),{grid:t=!!t.getTicks}=E,t=t?dx(e,b,n,a,o):[],n=J(E,"line");return new Um({style:I(Object.assign({startPos:a,endPos:o,verticalFactor:f,ticks:e,label:y?Object.assign(Object.assign({tickPadding:s,autoHide:!1,autoRotate:!0},J(E,"label")),{style:Object.assign(Object.assign({},d&&{textAlign:d}),J(E,"label"))}):null,axisLine:p||Object.keys(n).length?{stroke:"#BFBFBF",style:n}:null,grid:Object.assign({items:t,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.05,lineDash:[0,0]},J(E,"grid"))},"arcY"===b&&{type:"circle",center:[i.x,m+i.y],closed:!0}),tickLine:g?{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},J(E,"tick"))}:null},x&&{title:{content:(a=x,Array.isArray(a)?a.join(", "):""+a),titleAnchor:S||l,style:Object.assign({fontWeight:"bold",fillOpacity:1,dy:h,textAnchor:l},J(E,"title")),titlePadding:c,rotate:u}}))})}},gx=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?ox(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?px:yx)(a)(t,e,n,r)},mx=(gx.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>gx(t)),vx=(mx.props=Object.assign(Object.assign({},gx.props),{defaultPosition:"bottom"}),t=>gx(t)),bx=(vx.props=Object.assign(Object.assign({},gx.props),{defaultPosition:"left"}),t=>{const{position:c,labelFormatter:u=t=>""+t,dx:f=0,dy:h=0,title:d,cols:p=void 0,autoWrap:y=!1}=t,g=K(t,["position","labelFormatter","dx","dy","title","cols","autoWrap"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,name:u(t),color:e.map(t)})),l=y&&p?o/p:void 0,t=I({},Object.assign(Object.assign({items:t,x:i+f,y:a+h,orient:["right","left","arcCenter"].includes(c)?"vertical":"horizontal",maxWidth:o,maxHeight:s,autoWrap:y,maxItemWidth:l,itemWidth:l,spacing:[8,0],itemName:{style:{fontSize:12,fillOpacity:1,fill:"#000",fontWeight:"lighter",active:{fillOpacity:.8},inactive:{fill:"#d8d8d8"},unchecked:{fill:"#d8d8d8"}}}},d&&{title:{content:Array.isArray(d)?d[0]:d,style:{fontSize:12,fontWeight:"bold",fillOpacity:1}}}),{itemMarker:{size:8,symbol:"circle",style:{fillOpacity:1,inactive:{fillOpacity:.2},unchecked:{fill:"#d8d8d8",stroke:"#d8d8d8"}}},itemBackgroundStyle:{fill:"transparent"}}),Object.assign({},g));return new nb({className:"category-legend",style:t})}}),xx=(bx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const c=t["title"];return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,o=(null==(o=e.getTicks)?void 0:o.call(e))||[],[s,l]=t;return new Mb({style:Object.assign(Object.assign({x:i,y:a,rail:{length:120,size:12,ticks:o},min:s,max:l,indicator:null,handle:null},c&&{title:{content:Array.isArray(c)?c[0]:c,style:{fontSize:12}}}),{color:t.map(t=>e.map(t))})})}});function wx(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}xx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};sx={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=wx(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(B,r||{}).node().getLocalBounds();wx(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===a||void 0===a?void 0:a.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},a))})}};const Mx=class extends F.CustomElement{constructor(t){super(t),this.descriptor=sx}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(I({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},kx=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new Mx({style:I({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:l})})}};kx.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class Ox{constructor(t){this.$value=t}static of(t){return new Ox(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function _x(t,e,n){return Ox.of({}).call(Sx,t).call(Sx,e).call(Sx,n).value()}function Sx(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function Ex(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const Ax=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],Px=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,_x(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Nx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,_x(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Tx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,_x(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Lx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,_x(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Cx=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],_x(i,n,l))},jx=(Cx.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],_x(i,n,l))});function Fx(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function Ix(t,e){var[n,r,i,t]=Fx(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(m,N,S){"use strict";const C="main-layer",rt="label-layer",it="element",G="view",at="plot",ot="component",st="label",lt="area";var j="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function F(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,f=e[n],h=r,d=i;for(R(e,r,n),0<a(e[i],f)&&R(e,r,i);h<d;){for(R(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?R(e,r,d):R(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||I)}function R(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function I(t,e){return t<e?-1:e<t?1:0}function D(t,e){z(t,0,t.children.length,e,t)}function z(t,e,n,r,i){(i=i||X(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];W(i,t.leaf?r(o):o)}return i}function W(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function H(t,e){return t.minX-e.minX}function q(t,e){return t.minY-e.minY}function V(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function Y(t){return t.maxX-t.minX+(t.maxY-t.minY)}function $(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function U(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function X(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(F(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(U(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;U(t,s)&&(e.leaf?n.push(o):$(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(U(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(U(t,a)){if(e.leaf||$(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=X([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!$(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)D(i=X(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=X([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));K(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);K(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}D(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=V(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var f,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),W(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=X(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,D(n,this.toBBox),D(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=X([t,e]),this.data.height=t.height+1,this.data.leaf=!1,D(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=z(t,0,c,this.toBBox),f=z(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=V(u)+V(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:H,i=t.leaf?this.compareMinY:q;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=z(t,0,e,i),o=z(t,n-e,n,i),s=Y(a)+Y(o),l=e;l<n-e;l++){var c=t.children[l];W(a,t.leaf?i(c):c),s+=Y(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];W(o,t.leaf?i(f):f),s+=Y(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)W(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():D(t[e],this.toBBox)};var Z=1e-6,Q="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new Q(9);return Q!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ut=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function ft(){var t=new Q(16);return Q!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function ht(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function dt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function yt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,O=i*c-a*l,M=u*g-f*p,k=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,L=m*A-v*E+b*S+x*_-w*k+O*M;return L?(t[0]=(s*A-l*E+c*S)*(L=1/L),t[1]=(i*E-r*A-a*S)*L,t[2]=(g*O-y*w+e*x)*L,t[3]=(h*w-f*O-d*x)*L,t[4]=(l*_-o*A-c*k)*L,t[5]=(n*A-i*_+a*k)*L,t[6]=(y*b-p*O-e*v)*L,t[7]=(u*O-h*b+d*v)*L,t[8]=(o*E-s*_+c*M)*L,t[9]=(r*_-n*E-a*M)*L,t[10]=(p*w-g*b+e*m)*L,t[11]=(f*b-u*w-d*m)*L,t[12]=(s*k-o*S-l*M)*L,t[13]=(n*S-r*k+i*M)*L,t[14]=(g*v-p*x-y*m)*L,t[15]=(u*x-f*v+h*m)*L,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function vt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*g,t[1]=v*i+b*l+x*h+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*g,t[5]=v*i+b*l+x*h+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*g,t[9]=v*i+b*l+x*h+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*g,t[13]=v*i+b*l+x*h+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function Ot(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function Mt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function kt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function St(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Et(t,e){var n=new Q(3),r=(St(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function At(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],y=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(m*g+h*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Lt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Tt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Pt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var Ct=Pt;function jt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?pt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function Nt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var Bt=Object.freeze({__proto__:null,create:ft,clone:function(t){var e=new Q(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:ht,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new Q(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,O,M,k=r[0],_=r[1],r=r[2],S=Math.hypot(k,_,r);return S<Z?null:(k*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=k*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+k*S,w=k*r*i+_*S,O=_*r*i-k*S,M=r*r*i+n,t[0]=a*(n=k*k*i+n)+c*(m=_*k*i+r*S)+d*(r=r*k*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+g*r,t[3]=l*n+h*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+g*x,t[7]=l*v+h*b+y*x,t[8]=a*w+c*O+d*M,t[9]=o*w+u*O+p*M,t[10]=s*w+f*O+g*M,t[11]=l*w+h*O+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:Ot,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Mt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:kt,fromQuat2:function(t,e){var n=new Q(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),kt(t,e,n),t},getTranslation:_t,getScaling:St,getRotation:Et,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:At,fromQuat:Lt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Tt,perspective:Tt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Pt,ortho:Ct,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:jt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:Nt,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],O=e[5],M=e[6],k=e[7],_=e[8],S=e[9],E=e[10],A=e[11],L=e[12],T=e[13],P=e[14],e=e[15];return Math.abs(n-m)<=Z*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=Z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-O)<=Z*Math.max(1,Math.abs(s),Math.abs(O))&&Math.abs(l-M)<=Z*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-k)<=Z*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(u-_)<=Z*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=Z*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=Z*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-L)<=Z*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(g-T)<=Z*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(y-P)<=Z*Math.max(1,Math.abs(y),Math.abs(P))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:Nt});function Ft(){var t=new Q(3);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Rt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function It(t,e,n){var r=new Q(3);return r[0]=t,r[1]=e,r[2]=n,r}function Dt(t,e){t[0]=e[0],t[1]=e[1],t[2]=e[2]}function zt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Gt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Ht(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function qt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Vt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Yt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function $t(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Ut(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var Xt=Rt;function Kt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Zt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Qt(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Jt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function te(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function ee(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function ne(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}Ft(),Kt();var re=function(t,e,n,r){var i=new Q(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ie=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ae=te,oe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function se(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function le(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ce(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ue(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function fe(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function he(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}Ft(),It(1,0,0),It(0,1,0),Qt(),Qt(),ct();var de=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function pe(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new Q(2),Q!=Float32Array&&(e[0]=0,e[1]=0);var ge=function(t,e){return(ge=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ge(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function J(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ye(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function me(r,i){var a,o,s,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},c={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function t(n){return function(t){var e=[n,t];if(a)throw new TypeError("Generator is already executing.");for(;l=c&&e[c=0]?0:l;)try{if(a=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return l.label++,{value:e[1],done:!1};case 5:l.label++,o=e[1],e=[0];continue;case 7:e=l.ops.pop(),l.trys.pop();continue;default:if(!(s=0<(s=l.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){l=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3]))l.label=e[1];else if(6===e[0]&&l.label<s[1])l.label=s[1],s=e;else{if(!(s&&l.label<s[2])){s[2]&&l.ops.pop(),l.trys.pop();continue}l.label=s[2],l.ops.push(e)}}e=i.call(r,l)}catch(t){e=[6,t],o=0}finally{a=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}}function ve(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function O(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function be(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var xe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var we={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Oe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return we[e]===t.length-1&&"achlmqstvz".includes(e)})}function Me(t){return Oe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function ke(t){return Me(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function _e(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=we[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,we[n]))),we[n]););}function Se(t){return 48<=t&&t<=57}function Ee(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Ae(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=we[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,Ee(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Se(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&Se(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Se(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;Se(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&Se(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Se(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Ee(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,Ee(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}_e(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Le=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Te(t){var o,s,l,c;return Me(t)?pe(t):(t=function(t){if(Oe(t))return pe(t);var e=new Le(t);for(Ee(e);e.index<e.max&&!e.err.length;)Ae(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function Pe(t){if(ke(t))return pe(t);for(var e,n,r,i,a,o,s,l=Te(t),c=v({},xe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function Ce(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function je(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Ne(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Be(t,e,n,r,i){var a=Ne([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=je([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Fe(t,e,n,r){var t=[t,e],e=[n,r],i=je(t,e,.5),e=je(e,i,.5),a=je(i,e,.5),o=je(e,a,.5),s=je(a,o,.5),t=Be(t[0],t[1],i[0],i[1],a[0]).point,i=Be(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Re(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(y=Ce(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=Ce(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*y*y-m*g*g)/(p*y*y+m*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),g=(Math.abs(p)>f&&(m=w,y=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,y,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),y=Math.tan(p/4),o=4/3*r*y,m=4/3*i*y,v=[e,n],b=[e+o*f,n-m*g],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var O=[],M=0,k=(d=b.concat(x,w,d)).length;M<k;M+=1)O[M]=M%2?Ce(d[M-1],d[M],h).y:Ce(d[M],d[M+1],h).x;return O}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Fe(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(Fe(h,d,p,g))}return t}function Ie(t,e){var n;if(void 0===e&&(e=!1),ke(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=pe(t),e?[n,[]]:n;for(var r,i=Pe(t),a=v({},xe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Re(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function De(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var O,M,k,_,S,E,A,L,T,P,C=0;C<=d;C+=1)O=t,M=e,k=n,_=r,S=i,E=a,A=o,L=s,P=void 0,P=1-(T=C/d),g=(O={x:Math.pow(P,3)*O+3*Math.pow(P,2)*T*k+3*P*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(P,3)*M+3*Math.pow(P,2)*T*_+3*P*Math.pow(T,2)*E+Math.pow(T,3)*L}).x,y=O.y,f&&w.push({x:g,y:y}),h&&(m+=Ne(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(k=(m-l)/(m-v[2]),x={x:b[0]*(1-k)+v[0]*k,y:b[1]*(1-k)+v[1]*k}),v=[g,y,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function ze(t){return(c=l=s=0)<=Ie(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function We(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?De(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=je(n,i,r),i=je(i,a,r),a=je(a,e,r),o=je(n,i,r),i=je(i,a,r),r=je(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Ge=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},He=function(t){return"function"==typeof t},b=function(t){return null==t},qe={}.toString,Ve=function(t,e){return qe.call(t)==="[object "+e+"]"},Ye=function(t){return Array.isArray?Array.isArray(t):Ve(t,"Array")},$e=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function Ue(t,e){if(t)if(Ye(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if($e(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Xe=function(t){return"object"==typeof t&&null!==t},Ke=function(t){if(!Xe(t)||!Ve(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Ze=function(t){if(Ye(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Qe=function(t){if(Ye(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Je=function(t){return Ve(t,"String")},tn=function(t,e,n){return t<e?e:n<t?n:t},en=function(t){return Ve(t,"Number")};var nn=function(t,e){return(t%e+e)%e},rn=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return Ue(n,function(t,e){He(n)&&"prototype"===e||r.push(t)}),r};var an=function(t){return Ve(t,"Boolean")},on=function(t){return void 0===t},sn=function(t){return t instanceof Element||t instanceof HTMLDocument};function ln(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function cn(t,e,n,r){return e&&ln(t,e),n&&ln(t,n),r&&ln(t,r),t}function un(t){if("object"!=typeof t||null===t)return t;if(Ye(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=un(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=un(t[i]):e[i]=t[i];return e}var fn=un;function hn(a,o){var s;if(He(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var dn=5;function pn(t,e){if(t===e)return!0;if(t&&e&&!Je(t)&&!Je(e)){if(Ge(t)||Ge(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=pn(t[r],e[r]));r++);return n}if(Xe(t)||Xe(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=pn(t[i[r]],e[i[r]]));r++);return n}}return!1}function gn(e,t){var n;return null!==e&&Ke(e)?(n={},Ue(t,function(t){xn.call(e,t)&&(n[t]=e[t])}),n):{}}function yn(){}var mn=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||dn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Ke(o)?(Ke(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ye(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},vn=pn,bn=function(t,e,n){for(var r=0,i=Je(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},xn=Object.prototype.hasOwnProperty;function wn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function On(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Mn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kn=/^#([0-9a-f]{3,8})$/,_n=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Sn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),En=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),An=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Ln=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Tn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Pn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Cn(){return this.rgb().formatHex()}function jn(){return this.rgb().formatRgb()}function Nn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=kn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Bn(e):3===n?new Rn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Fn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Fn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=_n.exec(t))?new Rn(e[1],e[2],e[3],1):(e=Sn.exec(t))?new Rn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=En.exec(t))?Fn(e[1],e[2],e[3],e[4]):(e=An.exec(t))?Fn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ln.exec(t))?Wn(e[1],e[2]/100,e[3]/100,1):(e=Tn.exec(t))?Wn(e[1],e[2]/100,e[3]/100,e[4]):Pn.hasOwnProperty(t)?Bn(Pn[t]):"transparent"===t?new Rn(NaN,NaN,NaN,0):null}function Bn(t){return new Rn(t>>16&255,t>>8&255,255&t,1)}function Fn(t,e,n,r){return new Rn(t=r<=0?e=n=NaN:t,e,n,r)}function Rn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function In(){return"#"+zn(this.r)+zn(this.g)+zn(this.b)}function Dn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function zn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Wn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Hn(t,e,n,r)}function Gn(t){var e,n,r,i,a,o,s,l;return t instanceof Hn?new Hn(t.h,t.s,t.l,t.opacity):(t=t instanceof Mn?t:Nn(t))?t instanceof Hn?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new Hn(o,s,l,t.opacity)):new Hn}function Hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function qn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Vn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Yn(t,e){return Math.abs(t-e)<.001}function $n(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Un(t){return(t+2*Math.PI)%(2*Math.PI)}wn(Mn,Nn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Cn,formatHex:Cn,formatHsl:function(){return Gn(this).formatHsl()},formatRgb:jn,toString:jn}),wn(Rn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Mn?i:Nn(i))?new Rn((i=i.rgb()).r,i.g,i.b,i.opacity):new Rn:new Rn(t,e,n,null==r?1:r);var i},On(Mn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:In,formatHex:In,formatRgb:Dn,toString:Dn})),wn(Hn,function(t,e,n,r){return 1===arguments.length?Gn(t):new Hn(t,e,n,null==r?1:r)},On(Mn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new Rn(qn(240<=t?t-240:120+t,n,e),qn(t,n,e),qn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Xn={box:function(t,e,n,r){return $n([t,n],[e,r])},length:Vn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?Vn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Vn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(he(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Kn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Vn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(f<1e-4);g++){var y=o-f,m=o+f,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Vn(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Vn(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Zn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Qn(t,e,n){n=t+n-2*e;return Yn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Jn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function tr(t,e,n,r,i,a,o){var s=Zn(t,n,i,o),l=Zn(e,r,a,o),c=Xn.pointAt(t,e,n,r,o),n=Xn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function er(t,e,n,r,i,a,o){return 0===o?(Vn(t,e,n,r)+Vn(n,r,i,a)+Vn(t,e,i,a))/2:(e=(t=tr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),er.apply(void 0,e)+er.apply(void 0,n))}var nr={box:function(t,e,n,r,i,a){var o=Qn(t,n,i)[0],s=Qn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Zn(t,n,i,o)),void 0!==s&&c.push(Zn(e,r,a,s)),$n(l,c)},length:function(t,e,n,r,i,a){return er(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Kn([t,n,i],[e,r,a],o,s,Zn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Vn(t.x,t.y,o,s)},interpolationAt:Zn,pointAt:function(t,e,n,r,i,a,o){return{x:Zn(t,n,i,o),y:Zn(e,r,a,o)}},divide:tr,tangentAngle:function(t,e,n,r,i,a,o){t=Jn(t,n,i,o),n=Jn(e,r,a,o);return Un(Math.atan2(n,t))}};function rr(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function ir(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function ar(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Yn(r,0)?Yn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Yn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function or(t,e,n,r,i,a,o,s,l){var c=rr(t,n,i,o,l),u=rr(e,r,a,s,l),f=Xn.pointAt(t,e,n,r,l),n=Xn.pointAt(n,r,i,a,l),r=Xn.pointAt(i,a,o,s,l),i=Xn.pointAt(f.x,f.y,n.x,n.y,l),a=Xn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function sr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=Vn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=or(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return sr.apply(void 0,e)+sr.apply(void 0,n)}var lr={extrema:ar,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=ar(t,n,i,o),f=ar(e,r,a,s),h=0;h<u.length;h++)l.push(rr(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(rr(e,r,a,s,f[d]));return $n(l,c)},length:function(t,e,n,r,i,a,o,s){return sr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Kn([t,n,i,o],[e,r,a,s],l,c,rr,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Vn(t.x,t.y,l,c)},interpolationAt:rr,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:rr(t,n,i,o,l),y:rr(e,r,a,s,l)}},divide:or,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=ir(t,n,i,o,l),n=ir(e,r,a,s,l);return Un(Math.atan2(n,t))}};function cr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var ur=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);h+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+cr(d,n),y:e+cr(p,r)}};function fr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function hr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function dr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function pr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var gr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=fr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var O=hr(0,e,n,r,i,v[w]);O<y&&(y=O),m<O&&(m=O)}return{x:l,y:y,width:c-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=pr(s-t,l-e,-i),l=s[0],s=s[1],l=ur(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=dr(n,r,a):o<c&&(l=dr(n,r,o)),pr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return Vn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:fr(t,0,n,r,i,o),y:hr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return Un(Math.atan2(i,s))}};function yr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Vn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var mr,vr,br={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return $n(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=Vn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=yr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Xn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Xn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=yr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function xr(){}function wr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Or(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new wr(n,r||t,i),r=vr?vr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Mr(t,e){0==--t._eventsCount?t._events=new xr:delete t._events[e]}function kr(){this._events=new xr,this._eventsCount=0}r=e,mr=Object.prototype.hasOwnProperty,vr="~",Object.create&&(xr.prototype=Object.create(null),(new xr).__proto__||(vr=!1)),kr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)mr.call(t,e)&&n.push(vr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},kr.prototype.listeners=function(t){var t=vr?vr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},kr.prototype.listenerCount=function(t){t=vr?vr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},kr.prototype.emit=function(t,e,n,r,i,a){var o=vr?vr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},kr.prototype.on=function(t,e,n){return Or(this,t,e,n,!1)},kr.prototype.once=function(t,e,n){return Or(this,t,e,n,!0)},kr.prototype.removeListener=function(t,e,n,r){t=vr?vr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Mr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:Mr(this,t)}}else Mr(this,t);return this},kr.prototype.removeAllListeners=function(t){return t?(t=vr?vr+t:t,this._events[t]&&Mr(this,t)):(this._events=new xr,this._eventsCount=0),this},kr.prototype.off=kr.prototype.removeListener,kr.prototype.addListener=kr.prototype.on,kr.prefixed=vr,r.exports=kr.EventEmitter=kr;var _r=e.exports;function Sr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Sr.Cache||Map),l}(n=u=u||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",Sr.Cache=Map;var Er=Sr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function Ar(t){return"function"==typeof t}var Lr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Tr=Sr(function(t){var t=Er(t),e=Lr[t];return(null==e?void 0:e.alias)||t});var s,Pr,Cr,jr,Nr="Method not implemented.";function Br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Fr(t,e,n){e&&Br(t.prototype,e),n&&Br(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Rr(){return(Rr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Ir(t,e){t.prototype=Object.create(e.prototype),Dr(t.prototype.constructor=t,e)}function Dr(t,e){return(Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function zr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Gr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Wr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r=s=s||{})[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",(e=Pr=Pr||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=Cr=Cr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(r=jr=jr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo";function Hr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function qr(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}function Vr(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw new Error;n="NaN"}else n=0<t?"infinity":"-infinity";return n+e}function Yr(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return Pr.kUNumber;case s.kPercentage:return Pr.kUPercent;case s.kPixels:return Pr.kULength;case s.kMilliseconds:case s.kSeconds:return Pr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return Pr.kUAngle;default:return Pr.kUOther}}(t)){case Pr.kUNumber:return s.kNumber;case Pr.kULength:return s.kPixels;case Pr.kUPercent:return s.kPercentage;case Pr.kUTime:return s.kSeconds;case Pr.kUAngle:return s.kDegrees;default:return s.kUnknown}}function $r(t){return ai[t]||(ai[t]=new Jr(t)),ai[t]}var Ur,Xr,Kr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],Zr=((e=Ur=Ur||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return Kr.find(function(t){return t.name===e}).unit_type}),n=function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(Cr.kNo,jr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Ur.kUnitType&&this.getType()<=Ur.kClampType},t}(),r=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}Ir(t,n);var e=t.prototype;return e.getType=function(){return Ur.kColorType},e.to=function(t){return this},t}(n),Qr=((e=Xr=Xr||{})[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}Ir(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Ur.kColorType},t}(n)),Jr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}Ir(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Ur.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n),ti=function(i){function n(t,e){var n,r;return void 0===e&&(e=s.kNumber),(n=i.call(this)||this).unit=void 0,n.value=void 0,r="string"==typeof e?(r=e)?"number"===r?s.kNumber:"percent"===r||"%"===r?s.kPercentage:Zr(r):s.kUnknown:e,n.unit=r,n.value=t,n}Ir(n,i);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Ur.kUnitType},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Yr(this.unit))!==Yr(t)||e===s.kUnknown?null:(e=Hr(this.unit)/Hr(t),new n(this.value*e,t))},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=qr(this.unit);i=a<-999999||999999<a?(r=qr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?Vr(a,r):a+(r||"")):""+a+o}return n+=i},n}(n),ei=new ti(0,"px"),ni=(new ti(1,"px"),new ti(0,"deg")),ri=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}Ir(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(r),ii=new Jr("unset"),e=new Jr("initial"),n=new Jr("inherit"),ai={"":ii,unset:ii,initial:e,inherit:n},oi=new ri(0,0,0,0,!0),si=new ri(0,0,0,0),li=Sr(function(t,e,n,r){return new ri(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ci=function(t,e){return void 0===e&&(e=s.kNumber),new ti(t,e)},ui=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,fi=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,hi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,di=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var pi={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},gi=Sr(function(t){t="angular"===t.type?Number(t.value):pi[t.value]||0;return ci(t,"deg")}),yi=Sr(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:ci(n,i),cy:ci(r,a)}}),mi=Sr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return ao(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!b(c)&&!b(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:ci(Number(t.length.value),"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Qr(Xr.LinearGradient,{angle:n?gi(n):ni,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=yi(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?$r(n):ci(n,f)),new Qr(Xr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ui.exec(t);if(n)return r=(null==(r=n[2].match(di))?void 0:r.map(function(t){return t.split(":")}))||[],[new Qr(Xr.LinearGradient,{angle:ci(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ci(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=fi.exec(t);if(t)return t=(null==(t=t[4].match(di))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ci(50,"%"),cy:ci(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ci(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!Je(n))return[new Qr(Xr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=hi.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function vi(t){return $e(t)&&!b(t.r)&&!b(t.g)&&!b(t.b)}var x,bi=Sr(function(t){var e;return $e(e=t)&&e.image?Rr({repetition:"repeat"},t):"transparent"===(t=b(t)?"":t)?si:mi(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Nn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),li.apply(void 0,e))});function xi(t,e){if(vi(t)&&vi(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(tn(e[n],0,255));return e[3]=tn(e[3],0,1),"rgba("+e.join(",")+")"}]}function wi(t,e){if(b(e))return ci(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ci(Number(e),"px");if(0<="deg".search(t))return ci(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ci(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}(r=x=x||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh";var Oi=Sr(function(t){return wi(new RegExp("px","g"),t)}),Mi=(Sr(function(t){return wi(new RegExp("%","g"),t)}),function(t){return en(t)||isFinite(Number(t))?ci(Number(t),"px"):wi(new RegExp("px|%|em|rem","g"),t)}),ki=Sr(function(t){return wi(new RegExp("deg|rad|grad|turn","g"),t)});function _i(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=$a(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function Si(t){return Je(t)?t.split(" ").map(function(t){return Mi(t)}):t.map(function(t){return Mi(t.toString())})}function Ei(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Zo.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var Ai=function(t){return wi(/deg|rad|grad|turn|px|%/g,t)},Li=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ti(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Li.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Ai(t)||bi(t)})}),n.lastIndex===t.length)return r}return[]}function Pi(t){return t.toString()}var Ci=Sr(function(t){return"number"==typeof t?ci(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ci(Number(t)):ci(0)});function ji(t,e){return[t,e,Pi]}function Ni(n,r){return function(t,e){return[t,e,function(t){return Pi(tn(t,n,r))}]}}function Bi(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Sr(function(t){return(Je(t)?t.split(" "):t).map(Ci)});var Fi=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=Pe(e)}catch(t){n=Pe(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=nn(Ya(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=Bo([1,0],p),f=Bo(p,u);No(p,u)<=-1&&(f=Math.PI);1<=No(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:Eo(t,[c,e])?0:n,ry:Eo(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&Eo(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=Lo((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=Lo((p=e[s-1]).currentPoint,b),y=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(g=Co(u,0),b=g.x,y=g.y,c=Co(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=nr.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=lr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=gr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=Qe(n),d=Qe(r),p=Ze(n),g=Ze(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint,b=void 0;v[0]===h?(b=Ao(m,e),h-=b.xExtra):v[0]===p&&(b=Ao(m,e),p+=b.xExtra),v[1]===d?(b=Ao(m,e),d-=b.yExtra):v[1]===g&&(b=Ao(m,e),g+=b.yExtra)}return{x:h,y:d,width:p-h,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},Ri=Sr(Fi);function Ii(t,e){t=(Je(t)?Ri:Fi)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Di(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Ie(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Ie(e.absolutePath,!1),e.curve=d),[h,d]),h=ze((t=h.length!==d.length?function t(e,n,r){var i,e=We(e),n=We(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==ze(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):pe(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=Ne(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function zi(t,e){var n,r,i=Je(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=br.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Xn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var Wi=null;function Gi(t){return function(e){var n=0;return t.map(function(t){return t===Wi?e[n++]:t})}}function Hi(t){return t}var qi={matrix:["NNNNNN",[Wi,Wi,0,0,Wi,Wi,0,0,0,0,1,0,Wi,Wi,0,1],Hi],matrix3d:["NNNNNNNNNNNNNNNN",Hi],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Gi([Wi,Wi,new ti(1)]),Hi],scalex:["N",Gi([Wi,new ti(1),new ti(1)]),Gi([Wi,new ti(1)])],scaley:["N",Gi([new ti(1),Wi,new ti(1)]),Gi([new ti(1),Wi])],scalez:["N",Gi([new ti(1),new ti(1),Wi])],scale3d:["NNN",Hi],skew:["Aa",null,Hi],skewx:["A",null,Gi([Wi,ni])],skewy:["A",null,Gi([ni,Wi])],translate:["Tt",Gi([Wi,Wi,ei]),Hi],translatex:["T",Gi([Wi,ei,ei]),Gi([Wi,ei])],translatey:["T",Gi([ei,Wi,ei]),Gi([ei,Wi])],translatez:["L",Gi([ei,ei,Wi])],translate3d:["TTL",Hi]};function Vi(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=qi[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?ni:ki(t)},N:Ci,T:Mi,L:Oi}[h.toUpperCase()](f):{a:ni,n:c[0],t:ei}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Yi(t){switch(t.t){case"rotatex":return i=Ya(_i(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Ya(_i(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Ya(_i(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Ya(_i(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=Ya(_i(t.d[0])),a=Ya(_i(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Ya(_i(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Ya(_i(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ei(t.d[0],0,null)||0,n=Ei(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ei(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Ei(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Ei(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ei(t.d[0],0,null)||0,n=Ei(t.d[1],0,null)||0,r=Ei(t.d[2],0,null)||0,1];case"perspective":a=Ei(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function $i(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Ui(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Ka,t))return;if(ht(Za,Ka),Za[3]=0,Za[7]=0,Za[11]=0,Za[15]=1,Math.abs(mt(Za))<1e-8)return;var t=Ka[3],o=Ka[7],s=Ka[11],l=Ka[12],c=Ka[13],u=Ka[14],f=Ka[15];if(0!==t||0!==o||0!==s){if(Qa[0]=t,Qa[1]=o,Qa[2]=s,Qa[3]=f,!yt(Za,Za))return;gt(Za,Za),Zt(i,Qa,Za)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,Ka),n[0]=Rt(d[0]),Ht(d[0],d[0]),r[0]=qt(d[0],d[1]),to(d[1],d[1],d[0],1,-r[0]),n[1]=Rt(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=qt(d[0],d[2]),to(d[2],d[2],d[0],1,-r[1]),r[2]=qt(d[1],d[2]),to(d[2],d[2],d[1],1,-r[2]),n[2]=Rt(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Vt(Ja,d[1],d[2]),qt(d[0],Ja)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Yi).reduce($i),e,n,r,i,a),[[e,n,r,a,i]]}var Xi=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=Ki(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=Ki(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=Ki(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=Ki(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function Ki(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Zi(t){return t.toFixed(6).replace(".000000","")}function Qi(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Ui(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Ui(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=tn(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return Xi(t[0],t[1],t[2],e,t[4]).map(Zi).join(",")}])}function Ji(t){return t.replace(/[xy]/,"")}function ta(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var ea=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function na(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ci(n):ci(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=Qi(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=qi[u],g=qi[f],y=void 0;if(ea(u,f)){var m=Qi([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&Ji(u)===Ji(f))y=Ji(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||ta(u)!==ta(f)){m=Qi(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=ta(u),h=p[1](h),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var O=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Yr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=qr(t.unit)):(ti.isLength(t.unit)||ti.isLength(e.unit))&&(o=Ei(t,i,n),s=Ei(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=O[0],b[w]=O[1],x.push(O[2])}a.push(v),o.push(b),s.push([y,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var ra=Sr(function(t){var e;return Je(t)?"text-anchor"===t?[ci(0,"px"),ci(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Mi(ia(e[0])),Mi(ia(e[1]))]):[ci(t[0]||0,"px"),ci(t[1]||0,"px")]});function ia(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=ki,this.mixer=ji}return t.prototype.calculator=function(t,e,n,r){return _i(n)},t}(),n=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Jr&&(n=null),M.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&M.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=bi,this.mixer=xi}return t.prototype.calculator=function(t,e,n,r){return n instanceof Jr?"none"===n.value?oi:si:n},t}(),aa=function(){function t(){this.parser=Ti}return t.prototype.calculator=function(t,e,n){return n instanceof Jr?[]:n},t}();function oa(t){t=t.parsedStyle.fontSize;return b(t)?null:t}function sa(){this.parser=ra}var la=function(){function t(){this.parser=Mi,this.mixer=ji}return t.prototype.calculator=function(t,e,n,r,i){if(en(n))return n;if(!ti.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=oa(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=oa(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),ca=function(){function t(){this.mixer=Bi}var e=t.prototype;return e.parser=function(t){t=Si(en(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ua=function(){function t(){this.mixer=Bi}var e=t.prototype;return e.parser=function(t){t=Si(en(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),a=function(t){function e(){return t.apply(this,arguments)||this}return Ir(e,t),e.prototype.postProcessor=function(t,e){var n,r;switch(t.nodeName){case x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;b(a)||(l=a),b(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:b(t.parsedStyle.x)||(l=t.parsedStyle.x),b(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),b(l)&&b(c)&&b(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?no(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(b(l)?n:l,b(c)?r:c,b(u)?e:u)))},e}(la),fa=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Jr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),o=function(){function t(){this.mixer=ji,this.parser=Ci}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ha=function(){function t(){this.parser=Ci,this.mixer=Ni(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),da=function(){function t(){this.parser=Ci,this.mixer=Ni(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),pa=function(){function t(){this.parser=Ii,this.mixer=Di}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Jr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ts(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===x.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),ga=function(){function t(){this.parser=zi}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),ya=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=Ni(0,1/0),t}return Ir(t,i),t}(la),ma=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Jr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),va=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),ba=function(){function t(){this.parser=Vi,this.mixer=na}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Jr?[]:n},e.postProcessor=function(t){no(t.parsedStyle.transform,t)},t}(),xa=function(){function t(){this.parser=Ci}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),wa=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}();var Oa,Ma,ka=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new wa,this.page=new wa,this.canvas=new wa,this.viewport=new wa,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(Nr)},Fr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),_a=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(zr(n),e),n}return Ir(t,r),t}(ka),Sa=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}Ir(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(Nr)},t.lookupNamespaceURI=function(t){throw new Error(Nr)},t.lookupPrefix=function(t){throw new Error(Nr)},t.normalize=function(){throw new Error(Nr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e,t){void 0===t&&(t=!1),e(this)||(t?this.childNodes.slice():this.childNodes).forEach(function(t){t.forEach(e)})},Fr(d,[{key:"textContent",get:function(){var t="";this.nodeName===x.TEXT&&(t+=this.style.text);for(var e=Gr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===x.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===x.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new _r}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=an(n)&&n||$e(n)&&n.capture,n=$e(n)&&n.once,s=Ar(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=Ar(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=an(n)&&n||$e(n)&&n.capture,i=Ar(e)?void 0:e;return e=Ar(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new _a(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!t.type)throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),Ea=(Sa.DOCUMENT_POSITION_DISCONNECTED=1,Sa.DOCUMENT_POSITION_PRECEDING=2,Sa.DOCUMENT_POSITION_FOLLOWING=4,Sa.DOCUMENT_POSITION_CONTAINS=8,Sa.DOCUMENT_POSITION_CONTAINED_BY=16,Sa.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,Oa=Oa||{},Oa[Oa.Standard=0]="Standard",(l=Ma=Ma||{}).DESTROY="destroy",l.ATTR_MODIFIED="DOMAttrModified",l.INSERTED="DOMNodeInserted",l.REMOVED="removed",l.MOUNTED="DOMNodeInsertedIntoDocument",l.UNMOUNTED="DOMNodeRemovedFromDocument",l.BOUNDS_CHANGED="bounds-changed",l.RENDER_ORDER_CHANGED="render-order-changed",l.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return Ir(t,c),t}(ka)),Aa=(Ea.ADDITION=2,Ea.MODIFICATION=1,Ea.REMOVAL=3,0),La=new Ea(Ma.INSERTED,null,"","","",0,"",""),Ta=new Ea(Ma.REMOVED,null,"","","",0,"",""),Pa=new _a(Ma.DESTROY),l=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=Aa++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Oa.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:ft(),localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:ft(),origin:[0,0,0]},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:ii,opacity:ii,fillOpacity:ii,strokeOpacity:ii,fill:ii,stroke:ii,transform:ii,transformOrigin:ii,visibility:ii,pointerEvents:ii,lineWidth:ii,lineCap:ii,lineJoin:ii,increasedLineWidthForHitTesting:ii,fontSize:ii,fontFamily:ii,fontStyle:ii,fontWeight:ii,fontVariant:ii,textAlign:ii,textBaseline:ii,textTransform:ii,zIndex:ii,filter:ii,shadowType:ii},t.parsedStyle={},t.attributes={},t}Ir(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Nr)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return M.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),La.relatedNode=this,t.dispatchEvent(La),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return Ta.relatedNode=this,t.dispatchEvent(Ta),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),M.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return M.sceneGraphService.matches(t,this)},e.getElementById=function(t){return M.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return M.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return M.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return M.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return M.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return M.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(M.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Pa),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return M.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return M.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return M.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return M.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return M.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e;return"symbol"==typeof t||void 0===(e=this.attributes[t])&&(t=Tr(t),e=this.attributes[t],b(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(Nr)},e.getAttributeNode=function(t){throw new Error(Nr)},e.getAttributeNodeNS=function(t,e){throw new Error(Nr)},e.hasAttributeNS=function(t,e){throw new Error(Nr)},e.removeAttributeNS=function(t,e){throw new Error(Nr)},e.removeAttributeNode=function(t){throw new Error(Nr)},e.setAttributeNS=function(t,e,n){throw new Error(Nr)},e.setAttributeNode=function(t){throw new Error(Nr)},e.setAttributeNodeNS=function(t){throw new Error(Nr)},e.toggleAttribute=function(t,e){throw new Error(Nr)},Fr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(Sa);var Ca=new Ea(Ma.ATTR_MODIFIED,null,null,null,null,Ea.MODIFICATION,null,null),ja={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Na={anchor:[0,0],fill:oi,stroke:oi,transform:[],zIndex:0,filter:[],shadowType:"outer"},Ba=Rr({},Na,{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),Fa=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),Ra=function(i){function t(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||x.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,M.enableCSSParsing?Na:Ba,r.config.initialParsedStyle),M.enableCSSParsing&&Object.assign(r.attributes,ja),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),M.displayObjectPool.add(r.entity,zr(r)),r}Ir(t,i);var e=t.prototype;return e.destroy=function(){i.prototype.destroy.call(this),M.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},e.cloneNode=function(e,t){var n,r,i=Rr({},this.attributes);for(n in i){var a=i[n];null!=(r=a)&&r.nodeName&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(i[n]=a.cloneNode(e)),t&&(i[n]=t(n,a))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),o.appendChild(t))}),o},e.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};M.enableCSSParsing&&(n.usedAttributes=Fa),M.styleValueRegistry.processProperties(this,t,n),e.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=Tr(t);on(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},e.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(M.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Ca.relatedNode=this,Ca.prevValue=i,Ca.newValue=e,Ca.attrName=t,Ca.prevParsedValue=a,Ca.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Ca):(Ca.target=this).ownerDocument.defaultView.dispatchEvent(Ca,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},e.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new ts(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return M.sceneGraphService.setOrigin(this,Va(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return M.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return M.sceneGraphService.setPosition(this,Va(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return M.sceneGraphService.setLocalPosition(this,Va(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return M.sceneGraphService.translate(this,Va(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return M.sceneGraphService.translateLocal(this,Va(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return M.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return M.sceneGraphService.getLocalPosition(this)},e.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=Va(t,e=e||t,n=n||t)),M.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=Va(t,e=e||t,n=n||t)),M.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return M.sceneGraphService.getLocalScale(this)},e.getScale=function(){return M.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return $a(Ua(Ft(),M.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return $a(Ua(Ft(),M.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return M.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return M.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return b(e)&&b(n)?M.sceneGraphService.rotateLocal(this,0,0,t):M.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return b(e)&&b(n)?M.sceneGraphService.rotate(this,0,0,t):M.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return M.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return M.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return M.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return M.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return M.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return M.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return M.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return M.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return M.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){M.sceneGraphService.resetLocalTransform(this)},e.getAnimations=function(){return this.activeAnimations},e.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},e.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},e.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},e.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},e.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},e.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},e.getConfig=function(){return this.config},e.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?$e(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},e.getMatrix=function(t){var t=t||this.getWorldTransform(),e=_t(Ft(),t),n=e[0],e=e[1],r=St(Ft(),t),i=r[0],r=r[1],t=Et(Qt(),t),t=Ua(Ft(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new Q(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=Xa(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},e.setLocalMatrix=function(t){var t=Xa(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},e.show=function(){this.style.visibility="visible"},e.hide=function(){this.style.visibility="hidden"},e.getCount=function(){return this.childElementCount},e.getParent=function(){return this.parentElement},e.getChildren=function(){return this.children},e.getFirst=function(){return this.firstElementChild},e.getLast=function(){return this.lastElementChild},e.getChildByIndex=function(t){return this.children[t]||null},e.add=function(t,e){return this.appendChild(t,e)},e.setClip=function(t){this.style.clipPath=t},e.set=function(t,e){this.config[t]=e},e.get=function(t){return this.config[t]},e.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.setZIndex=function(t){return this.style.zIndex=t,this},Fr(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(l),Ia={},Da=[],ka=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Ia[t]},e.getAll=function(){return Object.keys(Ia).map(function(t){return Ia[t]})},e.add=function(t,e){(Ia[t]=e).nodeName===x.HTML&&Da.push(e)},e.remove=function(t){var e=Ia[t];e&&(delete Ia[t],e.nodeName===x.HTML)&&(t=Da.indexOf(e),Da.splice(t,1))},e.getHTMLs=function(){return Da},t}();function za(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Wa(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function Ga(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ha(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function qa(t){return void 0===t?0:360<t||t<-360?t%360:t}function Va(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),en(t)?It(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new Q(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):It(t[0],t[1]||e,t[2]||n)}function Ya(t){return t*(Math.PI/180)}function $a(t){return t*(180/Math.PI)}function Ua(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=St(Ft(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Xa(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=$a(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Ka=ft(),Za=ft(),Qa=Kt(),d=[Ft(),Ft(),Ft()],Ja=Ft();function to(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var eo=ft();function no(t,l){var c,u;t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new Ra({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ei,ei],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ei],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ei],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ei],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ei,ei,ei],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[ni],l.rotateLocal(0,0,_i(o[0]))):"rotatex"===s?(o=t||[ni],l.rotateLocal(_i(o[0]),0,0)):"rotatey"===s?(o=t||[ni],l.rotateLocal(0,_i(o[0]),0)):"rotatez"===s?(o=t||[ni],l.rotateLocal(0,0,_i(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Ya(o[0]),Ya(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Ya(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Ya(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(dt(eo,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(dt.apply(Bt,[eo].concat(t.map(function(t){return t.value}))),eo[12]+=c,eo[13]+=u,l.setLocalTransform(eo)))})),l.getLocalTransform()}ro={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},io="";var ro,io,ao=function(t){return io=t,so()};function oo(t){throw new Error(io+": "+t)}function so(){var t=vo(lo);return 0<io.length&&oo("Invalid input not EOF"),t}function lo(){return co("linear-gradient",ro.linearGradient,fo)||co("repeating-linear-gradient",ro.repeatingLinearGradient,fo)||co("radial-gradient",ro.radialGradient,ho)||co("repeating-radial-gradient",ro.repeatingRadialGradient,ho)||co("conic-gradient",ro.conicGradient,ho)}function co(n,t,r){return uo(t,function(t){var e=r();return e&&!_o(ro.comma)&&oo("Missing comma before color stops"),{type:n,orientation:e,colorStops:vo(bo)}})}function uo(t,e){t=_o(t);if(t)return _o(ro.startCall)||oo("Missing ("),e=e(t),_o(ro.endCall)||oo("Missing )"),e}function fo(){return ko("directional",ro.sideOrCorner,1)||ko("angular",ro.angleValue,1)}function ho(){var t,e,n=po();return n&&((t=[]).push(n),e=io,_o(ro.comma))&&((n=po())?t.push(n):io=e),t}function po(){var t,e=function(){var t=ko("shape",/^(circle)/i,0);t&&(t.style=Mo()||go());return t}()||function(){var t=ko("shape",/^(ellipse)/i,0);t&&(t.style=wo()||go());return t}();return e?e.at=yo():(t=go())?(e=t,(t=yo())&&(e.at=t)):(t=mo())&&(e={type:"default-radial",at:t}),e}function go(){return ko("extent-keyword",ro.extentKeywords,1)}function yo(){var t;if(ko("position",/^at/,0))return(t=mo())||oo("Missing positioning value"),t}function mo(){var t={x:wo(),y:wo()};if(t.x||t.y)return{type:"position",value:t}}function vo(t){var e=t(),n=[];if(e)for(n.push(e);_o(ro.comma);)(e=t())?n.push(e):oo("One extra comma");return n}function bo(){var t=ko("hex",ro.hexColor,1)||uo(ro.rgbaColor,function(){return{type:"rgba",value:vo(xo)}})||uo(ro.rgbColor,function(){return{type:"rgb",value:vo(xo)}})||ko("literal",ro.literalColor,0);return t||oo("Expected color definition"),t.length=wo(),t}function xo(){return _o(ro.number)[1]}function wo(){return ko("%",ro.percentageValue,1)||Oo()||Mo()}function Oo(){return ko("position-keyword",ro.positionKeywords,1)}function Mo(){return ko("px",ro.pixelValue,1)||ko("em",ro.emValue,1)}function ko(t,e,n){e=_o(e);if(e)return{type:t,value:e[n]}}function _o(t){var e=/^[\n\r\t\s]+/.exec(io),e=(e&&So(e[0].length),t.exec(io));return e&&So(e[0].length),e}function So(t){io=io.substring(t)}function Eo(t,e){return t[0]===e[0]&&t[1]===e[1]}function Ao(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function Lo(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function To(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=Ya(r=nn(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=Po({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Po(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var Po=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function Co(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=To({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=To({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function jo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function No(t,e){return jo(t)*jo(e)?(t[0]*e[0]+t[1]*e[1])/(jo(t)*jo(e)):1}function Bo(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(No(t,e))}Sa=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Gr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return Ir(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(Sa)),new(function(t){function e(){return t.apply(this,arguments)||this}return Ir(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(Sa)),new(function(t){function e(){return t.apply(this,arguments)||this}return Ir(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(Sa));new(function(t){function e(){return t.apply(this,arguments)||this}return Ir(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(Sa));var Fo=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Ro=/([\"\'])[^\'\"]+\1/;function Io(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-Ko)?0:16-e,r=Vo();return Xo[r]=t,1<Object.keys(Xo).length||setTimeout(function(){Ko=n;var e=Xo;Xo={},Object.keys(e).forEach(function(t){return e[t](Uo())})},e),r}function Do(t){delete Xo[t]}function zo(t){return"string"!=typeof t?Io:""===t?Yo.requestAnimationFrame:Yo[t+"RequestAnimationFrame"]}var Wo,Go,Ho,qo=1,Vo=function(){return qo++},Yo="object"==typeof self&&self.self==self?self:"object"==typeof j&&j.global==j?j:{},$o=Date.now(),Uo=function(){return Yo.performance&&"function"==typeof Yo.performance.now?Yo.performance.now():Date.now()-$o},Xo={},Ko=Date.now(),l=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],zo),Sa=zo(l),l="string"!=typeof(l=l)?Do:""===l?Yo.cancelAnimationFrame:Yo[l+"CancelAnimationFrame"]||Yo[l+"CancelRequestAnimationFrame"],Zo=(Yo.requestAnimationFrame=Sa,Yo.cancelAnimationFrame=l,function(){function y(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0],this.update(t,e)}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){za(this.center,t),za(this.halfExtents,e),Wa(this.min,this.center,this.halfExtents),Ga(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Ga(this.center,e,t),Ha(this.center,this.center,.5),Wa(this.halfExtents,e,t),Ha(this.halfExtents,this.halfExtents,.5),za(this.min,t),za(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),O=Math.abs(d);n[0]=e[12]+a*i[0]+o*i[1]+s*i[2],n[1]=e[13]+l*i[0]+c*i[1]+u*i[2],n[2]=e[14]+f*i[0]+h*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+y*t[2],r[1]=m*t[0]+v*t[1]+b*t[2],r[2]=x*t[0]+w*t[1]+O*t[2],Wa(this.min,n,r),Ga(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new y,i=[0,0,0],n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=[0,0,0],i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?za([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?za([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},y}()),Qo=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||It(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return qt(t,this.normal)-this.distance},e.normalize=function(){var t,e,n,r=1/Xt(this.normal);t=this.normal,e=this.normal,n=r,t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,this.distance*=r},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),Jo=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Qo)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];zt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,zt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,zt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,zt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,zt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,zt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),ts=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),es=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:u.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:u.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:u.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:u.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:u.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:u.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:u.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:u.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:u.FILTER},{n:"clipPath",syntax:u.DEFINED_PATH},{n:"textPath",syntax:u.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:u.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:u.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:u.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:u.COORDINATE},{n:"cy",int:!0,d:"0",syntax:u.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:u.COORDINATE},{n:"y",int:!0,d:"0",syntax:u.COORDINATE},{n:"z",int:!0,d:"0",syntax:u.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:u.COORDINATE},{n:"y1",int:!0,l:!0,syntax:u.COORDINATE},{n:"z1",int:!0,l:!0,syntax:u.COORDINATE},{n:"x2",int:!0,l:!0,syntax:u.COORDINATE},{n:"y2",int:!0,l:!0,syntax:u.COORDINATE},{n:"z2",int:!0,l:!0,syntax:u.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:u.PATH,p:50},{n:"points",l:!0,syntax:u.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:u.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:u.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:u.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:u.MARKER},{n:"markerEnd",syntax:u.MARKER},{n:"markerMid",syntax:u.MARKER},{n:"markerStartOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"}],ns={},rs=new WeakMap,Sa=function(){function t(){var e=this;es.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){ns[t]=e})},e.unregisterMetadata=function(t){delete ns[t]},e.getPropertySyntax=function(t){return M.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i,e,a,o,s,l=this;void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),M.enableCSSParsing?(i=(t=t).skipUpdateAttribute,e=t.skipParse,a=t.forceUpdateGeometry,t=t.usedAttributes,o=a,(s=Object.keys(r)).forEach(function(t){var e=Tr(t);i||(n.attributes[e]=r[t]),!o&&null!=(t=ns[e])&&t.l&&(o=!0)}),e||s.forEach(function(t){n.computedStyle[t]=l.parseProperty(t,n.attributes[t],n)}),null!=t&&t.length&&(s=Array.from(new Set(s.concat(t)))),["path","points","text","textTransform","anchor","transform","transformOrigin"].forEach(function(t){var e=s.indexOf(t);-1<e&&(s.splice(e,1),s.push(t))}),s.forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=l.computeProperty(t,n.computedStyle[t],n))}),o&&this.updateGeometry(n),s.forEach(function(t){t in n.parsedStyle&&l.postProcessProperty(t,n,s)}),M.enableCSSParsing&&n.children.length&&s.forEach(function(e){e in n.parsedStyle&&l.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})):(Object.assign(n.attributes,r),n.parsedStyle=Object.assign(n.parsedStyle,r),r.fill&&(n.parsedStyle.fill=bi(r.fill)),r.stroke&&(n.parsedStyle.stroke=bi(r.stroke)),(r.cx||r.cy)&&M.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n),this.updateGeometry(n))},e.parseProperty=function(t,e,n){var r,t=ns[t],i=e;return"unset"===(e=""!==e&&!b(e)?e:"unset")||"initial"===e||"inherit"===e?i=$r(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=$r(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=ns[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Jr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))b(r)||(e=this.parseProperty(t,Ar(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),b(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Jr?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=ns[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=rs.get(t);n||(rs.set(t,[]),n=rs.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=rs.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=rs.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),rs.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y,m,v=M.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new Zo),s.renderBounds||(s.renderBounds=new Zo),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=[Math.abs(d)/2,Math.abs(h)/2,p/2],l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,y=e.shadowType,g=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===x.TEXT&&delete e.anchor,d=[(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v],s.contentBounds.update(d,p),f=t.nodeName===x.POLYLINE||t.nodeName===x.POLYGON||t.nodeName===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&(p[0]+=h=((c||0)+(u||0))*f,p[1]+=h),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,g=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],g),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Ga(s.renderBounds.halfExtents,s.renderBounds.halfExtents,[i,i,0]))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,y=(n?-1:1)*(a?Ei(a[0],0,t):0),m=(r?-1:1)*(a?Ei(a[1],1,t):0),y-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(y,m),M.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=ns[t];return!!t&&t.inh},t}();(l=Wo=Wo||{})[l.ORBITING=0]="ORBITING",l[l.EXPLORING=1]="EXPLORING",l[l.TRACKING=2]="TRACKING",(l=Go=Go||{})[l.DEFAULT=0]="DEFAULT",l[l.ROTATIONAL=1]="ROTATIONAL",l[l.TRANSLATIONAL=2]="TRANSLATIONAL",l[l.CINEMATIC=3]="CINEMATIC",(l=Ho=Ho||{})[l.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",l[l.PERSPECTIVE=1]="PERSPECTIVE";var is="updated",l=function(){function t(){this.canvas=void 0,this.eventEmitter=new _r,this.matrix=ft(),this.right=It(1,0,0),this.up=It(0,1,0),this.forward=It(0,0,1),this.position=It(0,0,1),this.focalPoint=It(0,0,0),this.distanceVector=It(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=Wo.EXPLORING,this.trackingMode=Go.DEFAULT,this.projectionMode=Ho.PERSPECTIVE,this.frustum=new Jo,this.orthoMatrix=ft()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Ho.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===Wo.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Wo.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==Wo.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return yt(ft(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ft(),[t,e,0]);this.jitteredProjectionMatrix=vt(ft(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Ho.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Ho.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ho.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=It(t.x-r,t.y-n,0),e=qt(i,this.right)/Rt(this.right),r=qt(i,this.up)/Rt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Ho.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(Ya(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,xt(this.projectionMatrix,this.projectionMatrix,It(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Ho.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),Ct(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,It(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=Va(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=It(0,1,0);return this.focalPoint=Va(t,e,n),this.trackingMode===Go.CINEMATIC&&(t=(r=Gt(Ft(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Rt(r),e=$a(Math.asin(e/r)),r=90+$a(Math.atan2(n,t)),Ot(n=ft(),n,Ya(r)),wt(n,n,Ya(e)),i=Yt(Ft(),[0,1,0],n)),yt(this.matrix,jt(ft(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=Ft(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=qa(t),this.computeMatrix(),this._getAxes(),this.type===Wo.ORBITING||this.type===Wo.EXPLORING?this._getPosition():this.type===Wo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=qa(t),this.computeMatrix(),this._getAxes(),this.type===Wo.ORBITING||this.type===Wo.EXPLORING?this._getPosition():this.type===Wo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=qa(t),this.computeMatrix(),this._getAxes(),this.type===Wo.ORBITING||this.type===Wo.EXPLORING?this._getPosition():this.type===Wo.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Jt(Qt(),[0,0,1],Ya(this.roll)),e=(pt(this.matrix),Jt(Qt(),[1,0,0],Ya((this.rotateWorld&&this.type!==Wo.TRACKING||this.type===Wo.TRACKING?1:-1)*this.elevation))),n=Jt(Qt(),[0,1,0],Ya((this.rotateWorld&&this.type!==Wo.TRACKING||this.type===Wo.TRACKING?1:-1)*this.azimuth)),n=te(Qt(),n,e),n=te(Qt(),n,t),e=Lt(ft(),n);this.type===Wo.ORBITING||this.type===Wo.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===Wo.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=Va(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Dt(this.right,Va(Zt(Kt(),[1,0,0,0],this.matrix))),Dt(this.up,Va(Zt(Kt(),[0,1,0,0],this.matrix))),Dt(this.forward,Va(Zt(Kt(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Rt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Wo.TRACKING||this.rotateWorld?(this.elevation=$a(Math.asin(e/r)),this.azimuth=$a(Math.atan2(-t,-n))):(this.elevation=-$a(Math.asin(e/r)),this.azimuth=-$a(Math.atan2(-t,-n)))},e._getPosition=function(){Dt(this.position,Va(Zt(Kt(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=ct(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Gt(Ft(),this.focalPoint,this.position),this.distance=Rt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Ho.ORTHOGRAPHIC&&(t=this.position,e=Jt(Qt(),[0,0,1],-this.roll*Math.PI/180),At(this.orthoMatrix,e,It((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),It(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(is))},e.rotate=function(t,e,n){throw new Error(Nr)},e.pan=function(t,e){throw new Error(Nr)},e.dolly=function(t){throw new Error(Nr)},e.createLandmark=function(t,e){throw new Error(Nr)},e.gotoLandmark=function(t,e){throw new Error(Nr)},t}(),as=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),os=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),c=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),ss=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),ls=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),cs=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!Je(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),us=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!b(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),fs=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t,e){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d",e);else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",e),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",e)}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}(),hs=(0,/\[\s*(.*)=(.*)\s*\]/),ds=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(hs),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!b(t))&&t.toString?t.toString():""},t}();function ps(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var gs=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new _a(Ma.BOUNDS_CHANGED),this.rotate=(o=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=It(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(r=Qt(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ie(o,a),ee(o,o),te(r,o,r),te(n.localRotation,r,i),oe(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=It(e,n,r));n=t.transformable;ne(i,e[0],e[1],e[2]),ae(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Qt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=It(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(ne(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ie(a,ee(Qt(),r)),ae(n.localRotation,n.localRotation,a),g.dirtifyLocal(t,n)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=It(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Ut(e,Ft())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Wt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ft(),s=Ft(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Ut(g.getPosition(t),s)||(Dt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ht(r,e.worldTransform),yt(r,r),Yt(n.localPosition,s,r)):Dt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=Ft(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Ut(n.localPosition,l)||(Dt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=Ft(),u=Ft(),f=Ft(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Ut(e="number"==typeof e?zt(u,e,n,r):e,c)||(Wt(f,g.getPosition(t),e),g.setPosition(t,f))}),this.setRotation=function(){var o=Qt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=re(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ie(o,n),ee(o,o),te(a.localRotation,o,e),oe(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ft(),h=Ft(),d=re(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(At(t.localTransform,t.localRotation,t.localPosition,It(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=At(n,d,h,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):At(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,b(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=It(e,n,r));n=t.transformable;Ut(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=It(e,n,r));n=t.transformable;ne(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=It(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=It(e[0],e[1],e[2]||n.localScale[2]);Ut(e,n.localScale)||(Dt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=re(e,n,r,i));n=t.transformable;ie(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new Q(2))[0]=i,r[1]=n,e=r);var r,i=t.transformable;n=i.localSkew,r=e,n[0]=r[0],n[1]=r[1],this.dirtifyLocal(t,i)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).isMutationObserved?t.dispatchEvent(n.boundsChangedEvent):t.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.clearPendingEvents(),i.clear()},e.clearPendingEvents=function(){this.pendingEvents=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)ps(n),n=n.parentNode;e&&t.forEach(function(t){ps(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t,!0),t.dispatchEvent(new Ea(Ma.ATTR_MODIFIED,t,n,n,e,Ea.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Et(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return St(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=_t(Ft(),e),r=Et(Qt(),e),e=St(Ft(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Zo.isEmpty(e)?null:((n=n||new Zo).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new Zo},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new Zo).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Zo)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=ft(),r=(t.parentNode.transformable&&(n=yt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Zo.isEmpty(r))return(e=new Zo).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Zo.isEmpty(i)||(r=new Zo).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new ts(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new ts((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?vt(e.worldTransform,n.worldTransform,e.localTransform):ht(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),ys={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},ms=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,vs=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),bs=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),xs=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!bs.exec(e)&&!vs.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,ys.MetricsString+ys.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(ys.BaselineSymbol).width),s=ys.HeightMultiplier*o,o=o*ys.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=en(e)&&e+"px"||"16px",a=Je(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!Ro.test(s)&&Fo.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new ts(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var O=0;O<g.length;O++)p.measureText(g[O]).width,g[O].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],O=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+O){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var M=f[h].length,k=0,_=M,S=0;S<M;S++){var E=g(f[h][S]);if(c<k+E+y){_=S;break}k+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=O,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=ys.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=ys.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!ms.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!ms.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),M={},as=(cs=new cs,ls=new ls,(oc={})[x.CIRCLE]=new as,oc[x.ELLIPSE]=new os,oc[x.RECT]=cs,oc[x.IMAGE]=cs,oc[x.GROUP]=cs,oc[x.LINE]=new c,oc[x.TEXT]=new us(M),oc[x.POLYLINE]=ls,oc[x.POLYGON]=ls,oc[x.PATH]=new ss,oc[x.HTML]=null,oc[x.MESH]=null,oc),us=(os=new r,cs=new la,(c={})[u.PERCENTAGE]=null,c[u.NUMBER]=new o,c[u.ANGLE]=new e,c[u.DEFINED_PATH]=new n,c[u.PAINT]=os,c[u.COLOR]=os,c[u.FILTER]=new aa,c[u.LENGTH]=cs,c[u.LENGTH_PERCENTAGE]=cs,c[u.LENGTH_PERCENTAGE_12]=new ca,c[u.LENGTH_PERCENTAGE_14]=new ua,c[u.COORDINATE]=new a,c[u.OFFSET_DISTANCE]=new ha,c[u.OPACITY_VALUE]=new da,c[u.PATH]=new pa,c[u.LIST_OF_POINTS]=new ga,c[u.SHADOW_BLUR]=new ya,c[u.TEXT]=new ma,c[u.TEXT_TRANSFORM]=new va,c[u.TRANSFORM]=new ba,c[u.TRANSFORM_ORIGIN]=new sa,c[u.Z_INDEX]=new xa,c[u.MARKER]=new fa,c),ls=(M.CameraContribution=l,M.AnimationTimeline=null,M.EasingFunction=null,M.offscreenCanvas=new fs,M.displayObjectPool=new ka,M.sceneGraphSelector=new ds,M.sceneGraphService=new gs(M),M.textService=new xs(M),M.geometryUpdaterFactory=as,M.CSSPropertySyntaxFactory=us,M.styleValueRegistry=new Sa,M.layoutRegistry=null,M.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==j)return j;throw new Error("Unable to locate global `this`")}(),M.enableCSSParsing=!0,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function ws(){ws=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(O([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function O(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=O,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Os(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ms(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Os(r,e,n,i,a,"next",t)}function a(t){Os(r,e,n,i,a,"throw",t)}i(void 0)})}}function ks(){return(ks=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function _s(t,e){return(_s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(ss=Kb=Kb||{}).READY="ready",ss.BEFORE_RENDER="beforerender",ss.RERENDER="rerender",ss.AFTER_RENDER="afterrender",ss.BEFORE_DESTROY="beforedestroy",ss.AFTER_DESTROY="afterdestroy",ss.RESIZE="resize",ss.DIRTY_RECTANGLE="dirtyrectangle",new _a(Ma.MOUNTED),new _a(Ma.UNMOUNTED),new _a(Kb.BEFORE_RENDER),new _a(Kb.RERENDER),new _a(Kb.AFTER_RENDER);function Ss(t){return Cs(t,"Function")}function Es(t){return null==t}var As=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,f=u===p,h=f&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");h&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=Ms(ws().mark(function t(e){var n,r,i;return ws().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Ne([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,Ms(ws().mark(function t(){return ws().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),Ls=(As.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),_s(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new As(ks({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(ls)),Ts=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Ps={}.toString,Cs=function(t,e){return Ps.call(t)==="[object "+e+"]"},js=function(t){return Array.isArray?Array.isArray(t):Cs(t,"Array")};function Ns(t){if(!Fs(t)||!Cs(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Bs(t){return(t=zs(t)).charAt(0).toLowerCase()+t.substring(1)}var Fs=function(t){return"object"==typeof t&&null!==t},Rs=function(t){return Cs(t,"String")},Is=function(t){return Cs(t,"Number")},Ds=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){Ss(n)&&"prototype"===e||r.push(t)};if(e)if(js(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},zs=function(t){return Es(t)?"":t.toString()},Ws=function(t){t=zs(t);return t.charAt(0).toUpperCase()+t.substring(1)};var Gs=5;function Hs(t){return t}var qs,tt=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Gs,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Ns(o)?(Ns(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):js(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Vs=function(t,e){if(!Ts(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},Ys=function(t,e){if(t===e)return!0;if(t&&e&&!Rs(t)&&!Rs(e)){if(Ts(t)||Ts(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Ys(t[r],e[r]));r++);return n}if(Fs(t)||Fs(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=Ys(t[i[r]],e[i[r]]));r++);return n}}return!1},$s=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Us(t){return Es(t)?0:(Ts(t)?t:Object.keys(t)).length}!function(a,o){var s;if(Ss(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(qs=qs||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),qs.measureText(Rs(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Ds(e=void 0===e?{}:e)).join("")});Ks.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},Ks.prototype.once=function(t,e){return this.on(t,e,!0)},Ks.prototype.emit=function(a){for(var o=this,s=[],t=1;t<arguments.length;t++)s[t-1]=arguments[t];function e(t){for(var e,n,r=t.length,i=0;i<r;i++)t[i]&&(n=(e=t[i]).callback,e.once&&(t.splice(i,1),0===t.length&&delete o._events[a],r--,i--),n.apply(o,s))}var n=this._events[a]||[],r=this._events["*"]||[];e(n),e(r)},Ks.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},Ks.prototype.getEvents=function(){return this._events};var Xs=Ks;function Ks(){this._events={}}const Zs=()=>[["cartesian"]],Qs=(Zs.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),Js=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=Qs(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},tl=(Js.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),el=(tl.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),nl=(el.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...el(),...Js({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),rl=(nl.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),il=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=rl(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...Js({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},al=(il.props={},()=>[["parallel",0,1,0,1]]),ol=(al.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),sl=(ol.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...al(),...Js({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),ll=(sl.props={},({value:e})=>t=>t.map(()=>e)),cl=(ll.props={},({value:e})=>t=>t.map(e)),ul=(cl.props={},({value:e})=>t=>t.map(t=>t[e])),fl=(ul.props={},({value:t})=>()=>t);function hl(t,e){return t.parent===e.parent?1:2}function dl(t,e){return t+e.x}function pl(t,e){return Math.max(t,e.y)}function gl(){var s=hl,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(dl,0)/e.length,t.y=1+n.reduce(pl,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function yl(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function ml(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=bl)):void 0===e&&(e=vl);for(var n,r,i,a,o,t=new Ol(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new Ol(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(wl)}function vl(t){return t.children}function bl(t){return Array.isArray(t)?t[1]:null}function xl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function wl(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function Ol(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ml(t){return null==t?null:kl(t)}function kl(t){if("function"!=typeof t)throw new Error;return t}function _l(){return 0}function Sl(t){return function(){return t}}fl.props={},Ol.prototype=ml.prototype={constructor:Ol,count:function(){return this.eachAfter(yl)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(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},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return ml(this).eachBefore(xl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const El=4294967296;function Al(t,e){for(var n,r,i=0,a=(t=function(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}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Tl(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Cl(t[0],t[1]);case 3:return jl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Pl(e,t))return[e];for(n=0;n<t.length;++n)if(Ll(e,t[n])&&Pl(Cl(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(Ll(Cl(t[n],t[r]),e)&&Ll(Cl(t[n],e),t[r])&&Ll(Cl(t[r],e),t[n])&&Pl(jl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Ll(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Tl(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Pl(t,e){for(var n=0;n<e.length;++n)if(!Tl(t,e[n]))return;return 1}function Cl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function jl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function Nl(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Bl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Fl(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Rl(t){this._=t,this.next=null,this.previous=null}function Il(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;Nl(r,d,i=t[2]),d=new Rl(d),r=new Rl(r),i=new Rl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Nl(d._,r._,i=t[l]),i=new Rl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Bl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Bl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Fl(d);(i=i.next)!==r;)(s=Fl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Al(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Dl(t){return Math.sqrt(t.value)}function zl(){var n=null,r=1,i=1,a=_l;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%El)/El}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Wl(n)).eachAfter(Gl(a,.5,e)).eachBefore(Hl(1)):t.eachBefore(Wl(Dl)).eachAfter(Gl(_l,1,e)).eachAfter(Gl(a,t.r/Math.min(r,i),e)).eachBefore(Hl(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Ml(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Sl(+t),e):a},e}function Wl(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Gl(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Il(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Hl(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function ql(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 Vl(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Yl={depth:-1},$l={},Ul={};function Xl(t){return t.id}function Kl(t){return t.parentId}function Zl(){var y,m=Xl,v=Kl;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=Jl(t,e-1)&&!Jl(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Ql);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Ql(r)),c.push(Ul));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new Ol(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?$l:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===$l)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=y){for(;i.data===Ul&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Ul;--t)o.data=null}if(i.parent=Yl,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(wl),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=Ml(t),e):m},e.parentId=function(t){return arguments.length?(v=Ml(t),e):v},e.path=function(t){return arguments.length?(y=Ml(t),e):y},e}function Ql(t){let e=t.length;if(e<2)return"";for(;1<--e&&!Jl(t,e););return t.slice(0,e)}function Jl(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function tc(t,e){return t.parent===e.parent?1:2}function ec(t){var e=t.children;return e?e[0]:t.t}function nc(t){var e=t.children;return e?e[e.length-1]:t.t}function rc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function ic(){var h=tc,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new rc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new rc(r[i],i)),n.parent=e;return(t.parent=new rc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=nc(o),i=ec(i),o&&i;)s=ec(s),(a=nc(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(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(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!nc(a)&&(a.t=o,a.m+=u-c),i&&!ec(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function ac(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}rc.prototype=Object.create(Ol.prototype);var oc=(1+Math.sqrt(5))/2;function sc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,O=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(O*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?Vl(o,n,r,i,O?r+=c*u/O:a):ac(o,n,r,O?n+=l*u/O:i,a),O-=u,b=x}return m}var lc=function e(a){function t(t,e,n,r,i){sc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(oc);function cc(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function uc(t,e,n,r,i){(1&t.depth?ac:Vl)(t,e,n,r,i)}var fc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Vl(o,e,n,r,h?n+=(i-n)*o.value/h:i):ac(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=sc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(oc);function hc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function dc(t={}){return[...hc(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function pc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function gc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function yc(t={}){return hc(t)}function mc(){return[{type:"maybeKey"}]}function vc(t,e){return t.getBandWidth(t.invert(e))}function bc(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?vc(l,a[e]):0;var r=p?vc(c,o[e]):0,e=g&&s?(vc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function xc(t){return parseFloat(t)/100}function wc(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?xc(e)*o:+e,"string"==typeof t?xc(t)*s:+t]]})]}function Oc(e){return"function"==typeof e?e:t=>t[e]}function Mc(t,e){return Array.from(t,Oc(e))}function kc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=Mc(t,e),o=Mc(t,n),s=Mc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function _c(t,e){return t.getBandWidth(t.invert(e))}const Sc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=_c(c,a[t]),n=e*(u?_c(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Sc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...mc(),...gc()],interaction:{shareTooltip:!0}};const Ec=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function Ac(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Lc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=Ac,o=(t,e)=>Ac(n(t),e),(t,e)=>n(t)-e):(a=n===Ac||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Tc,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Tc(){return 0}function*Pc(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}Ec.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...mc(),...gc()],interaction:{shareTooltip:!0}};r=Lc(Ac);const Cc=r.right,jc=r.left,Nc=Lc(function(t){return null===t?NaN:+t}).center;function Bc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Fc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Rc(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Ic{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Dc extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(zc(this,t))}has(t){return super.has(zc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function zc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Wc(t){return t}function Gc(t,...e){return Vc(t,Wc,Wc,e)}function Hc(t,e,...n){return Vc(t,Wc,e,n)}function qc(t,e,...n){return Vc(t,Array.from,e,n)}function Vc(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Dc,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Yc(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Uc(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Uc(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort($c(n))}function $c(r=Ac){if(r===Ac)return Uc;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Uc(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Xc=Array.prototype.slice;function Kc(t){return()=>t}const Zc=Math.sqrt(50),Qc=Math.sqrt(10),Jc=Math.sqrt(2);function tu(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=Zc?10:r>=Qc?5:r>=Jc?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/s<t&&++a,o/s>e&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*s<t&&++a,o*s>e&&--o),o<a&&.5<=n&&n<2?tu(t,e,2*n):[a,o,s]}function eu(t,e,n){return tu(t=+t,e=+e,n=+n)[2]}function nu(t){return Math.ceil(Math.log(Bc(t))/Math.LN2)+1}function ru(){var m=Wc,v=Rc,b=nu;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===Rc&&([s,l]=function(t,e,n){let r;for(;;){var i=eu(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(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}}(s,l,u)),(c=function(t,e,n){if(!(0<(n=+n)))return[];if((t=+t)===(e=+e))return[t];var r=e<t,[i,a,o]=r?tu(e,t,n):tu(t,e,n);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}(s,l,u))[0]<=s&&(n=eu(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===Rc){const n=eu(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Cc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Kc(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Kc([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Kc(Array.isArray(t)?Xc.call(t):t),e):b},e}function iu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function au(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function ou(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function su(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function lu(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?Uc:$c(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),lu(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,f=n[r];let t=i,e=a;for(cu(n,i,r),0<o(n[a],f)&&cu(n,i,a);t<e;){for(cu(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?cu(n,i,e):cu(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function cu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function uu(t,e,n){var r;if((n=(t=Float64Array.from(Pc(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?ou(t):1<=e?iu(t):(n=(n-1)*e,(r=iu(lu(t,e=Math.floor(n)).subarray(0,e+1)))+(ou(t.subarray(e+1))-r)*(n-e))}function fu(r,t,i){if((i=(r=Float64Array.from(Pc(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return su(r);if(1<=t)return au(r);t=Math.floor((i-1)*t),i=lu(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>Uc(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<Ac(o,t):0===Ac(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function hu(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function du(t,e){return uu(t,.5,e)}function pu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function gu(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=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function yu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function mu(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function vu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function bu(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function xu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function wu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function Ou(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Mu(t){return xu(t)||vu(t)}function ku(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function _u(t){var t=t.getOptions()["transformations"],[,t,e]=t.find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}const Su=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Gc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Eu=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Au=()=>(t,e,n,r)=>{return(wu(r)?Eu:Su)(t,e,n,r)};Au.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...mc(),...gc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Lu=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=bc(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Lu.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...mc(),{type:"maybeSize"},...pc()]};const Tu=s=>{const{cartesian:l=!1}=s;return l?wc:(t,e,n,r)=>{if(l)return wc(t,0,n,r);const{x:i,y:a}=n,o=bc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Tu.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...mc(),...pc()]};const Pu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Pu.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...mc(),...pc()]};const Cu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Gc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Cu.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...mc(),...gc()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const ju=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=bc(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};ju.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...mc(),...pc()]};const Nu=s=>{var t=s["cartesian"];return t?wc:(t,e,n,r)=>{const{x:i,y:a}=n,o=bc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Nu.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...mc(),...pc()]};const Bu=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};Bu.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...mc(),...pc()]};const Fu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},Ru=(Fu.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...mc(),...gc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Ru.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...mc(),...pc()]};const Iu=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Iu.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...mc()]};const Du=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Du.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...mc()]};const zu=(...t)=>ju(...t);function Wu(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Gu(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=Wu("x",r,n,e.x),o=Wu("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}zu.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...mc()]};const Hu=()=>Gu();Hu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...mc()]};const qu=()=>Gu({extendY:!0});qu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...mc()]};const Vu=()=>Gu({extendX:!0});function Yu(t){return t.target.depth}function $u(t,e){return t.sourceLinks.length?t.depth:e-1}function Uu(t){return function(){return t}}function Xu(t,e){return Zu(t.source,e.source)||t.index-e.index}function Ku(t,e){return Zu(t.target,e.target)||t.index-e.index}function Zu(t,e){return t.y0-e.y0}function Qu(t){return t.value}function Ju(t){return t.index}function tf(t){return t.nodes}function ef(t){return t.links}function nf(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function rf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function af(){let x=0,w=0,O=1,M=1,k=24,_=8,S,E=Ju,A=$u,L,T,P,C=tf,j=ef,N=6;function e(e){e={nodes:C(e),links:j(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=nf(g,n)),"object"!=typeof r&&(r=t.target=nf(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=P)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(P),r.sort(P)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(yu(y.sourceLinks,Qu),yu(y.targetLinks,Qu)):y.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(L){var s,l=Math.max(iu(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=L.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(iu(t,t=>t.depth)+1,0),n=(O-x-k)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+k,r[i]?r[i].push(a):r[i]=[a]}if(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(_,(M-w)/(iu(u,t=>t.length)-1)),u),f=ou(t,t=>(M-w-(t.length-1)*S)/yu(t,Qu));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===P)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Ku),n.sort(Xu)}(m)}for(let t=0;t<N;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/N);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,F(c))}void 0===T&&o.sort(Zu),o.length&&B(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,F(c))}void 0===T&&o.sort(Zu),o.length&&B(o,i)}}(u,d,p)}return rf(e),e}function B(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,M,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function F({sourceLinks:t,targetLinks:e}){if(void 0===P){for(const{source:{sourceLinks:t}}of e)t.sort(Ku);for(const{target:{targetLinks:e}}of t)e.sort(Xu)}}return e.update=function(t){return rf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Uu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Uu(t),e):A},e.nodeDepth=function(t){return arguments.length?(L=t,e):L},e.nodeSort=function(t){return arguments.length?(T=t,e):T},e.nodeWidth=function(t){return arguments.length?(k=+t,e):k},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(C="function"==typeof t?t:Uu(t),e):C},e.links=function(t){return arguments.length?(j="function"==typeof t?t:Uu(t),e):j},e.linkSort=function(t){return arguments.length?(P=t,e):P},e.size=function(t){return arguments.length?(x=w=0,O=+t[0],M=+t[1],e):[O-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],O=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[O,M]]},e.iterations=function(t){return arguments.length?(N=+t,e):N},e}Vu.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...yc({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...mc()]};const of={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},sf={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?ou(t.sourceLinks,Yu)-1:0},justify:$u};const lf=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},of,f),l=af().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?sf[n]||$u:"function"==c?n:$u).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function cf(t){return t}function uf(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function ff(t=""){throw new Error(t)}function hf(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function df(t){return null!=t&&!Number.isNaN(t)}function et(t,e){return pf(t,e)||{}}function pf(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Bs(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function gf(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function yf(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t}lf.props={};const mf=y=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=y,{links:t,nodes:l}=kc(t,e),c=et(e,"node"),e=et(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=lf(Object.assign(Object.assign(Object.assign({},m),{nodeId:Oc(u)}),i))({links:t,nodes:l});const h=et(r,"label"),{text:d=u,spacing:p=5}=h,g=J(h,["text","spacing"]);return[tt({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:et(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),g),...a],animate:"object"==typeof s?et(s,"node"):s,axis:!1}),tt({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},et(r,"link")),animate:"object"==typeof s?et(s,"link"):s})]}},vf=(mf.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);vf.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...dc({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...mc()]};const bf=t=>t?parseInt(t):0;function xf(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||bf(t.width),e=e.clientHeight||bf(t.height),{width:(i={width:i-(bf(t.paddingLeft)+bf(t.paddingRight)),height:e-(bf(t.paddingTop)+bf(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function wf(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function Of(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:cc,treemapDice:Vl,treemapSlice:ac,treemapSliceDice:uc,treemapSquarify:lc,treemapResquarify:fc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?Zl().path(p):Zl():ml)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(ql),t}function y(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=lc,i=!1,s=a=1,l=[0],d=h=f=u=c=_l,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=kl(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Sl(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Sl(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Sl(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Sl(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Sl(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const Mf=u=>t=>{var{width:t,height:e}=wf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=J(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=Of(n,tt({},c,o),r),n=et(a,"label");return[tt({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0}),n),...s]},l),{axis:!1}))]},kf=(Mf.props={},u=>t=>{var{width:t,height:e}=wf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=J(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(js(t)?Zl().path(e.path):ml)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),zl().size(e.size).padding(e.padding)(n),n.descendants()})(n,tt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),tt({},c.encode,r)),t=et(a,"label");return[tt({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function _f(t,e){return ou(t,t=>e[t])}function Sf(t,e){return iu(t,t=>e[t])}function Ef(t,e){const n=2.5*Af(t,e)-1.5*Tf(t,e);return ou(t,t=>e[t]>=n?e[t]:NaN)}function Af(t,e){return uu(t,.25,t=>e[t])}function Lf(t,e){return uu(t,.5,t=>e[t])}function Tf(t,e){return uu(t,.75,t=>e[t])}function Pf(t,e){const n=2.5*Tf(t,e)-1.5*Af(t,e);return iu(t,t=>e[t]<=n?e[t]:NaN)}function Cf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Gc(t,t=>a[+t]).values()).flatMap(t=>{const e=Ef(t,i),n=Pf(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}kf.props={};const jf=s=>()=>{var{data:t,encode:e,style:n={}}=s,r=J(s,["data","encode","style","transform"]),{extend:i=!1}=n,n=J(n,["extend"]),a=e["y"],a={y:a,y1:a,y2:a,y3:a,y4:a},o={y1:Af,y2:Lf,y3:Tf};return i?[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:_f},o),{y4:Sf})],encode:Object.assign(Object.assign({},e),a),style:n},r)]:(i=et(n,"box"),n=et(n,"point"),[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Ef},o),{y4:Pf})],encode:Object.assign(Object.assign({},e),a),style:i},r),{type:"point",data:t,transform:[{type:Cf}],encode:e,style:Object.assign({},n)}])},Nf=(jf.props={},s=>{var t=s["cartesian"];return t?wc:(t,e,n,r)=>{const{x:i,y:a}=n,o=bc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Bf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Ff(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Rf(t){return t[0]}function If(t){return t[1]}function Df(t,e,n){e=new zf(null==e?Rf:e,null==n?If:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function zf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Wf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Nf.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};la=Df.prototype=zf.prototype;function Gf(t){return function(){return t}}function Hf(t){return 1e-6*(t()-.5)}function qf(t){return t.index}function Vf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Yf(c){var u,f,a,o,h,d,s=qf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Gf(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||Hf(d),o=i.y+i.vy-r.y-r.vy||Hf(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Vf(r,t.source)),"object"!=typeof t.target&&(t.target=Vf(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Gf(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Gf(+t),g(),e):r},e}la.copy=function(){var t,e,n=new zf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Wf(e));else n._root=Wf(r);return n},la.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Bf(this.cover(e,n),e,n,t)},la.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Bf(this,i[u],a[u],t[u]);return this},la.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},la.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},la.extent=function(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]]},la.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new Ff(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new Ff(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new Ff(y[2],s,c,a,i),new Ff(y[1],a,l,o,c),new Ff(y[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},la.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},la.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},la.root=function(){return this._root},la.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},la.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Ff(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new Ff(e,o,s,i,a)),(e=c[2])&&l.push(new Ff(e,n,s,o,a)),(e=c[1])&&l.push(new Ff(e,o,r,i,s)),e=c[0])&&l.push(new Ff(e,n,r,o,s));return this},la.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Ff(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Ff(i,a,o,c,u)),(i=f[1])&&n.push(new Ff(i,c,o,s,u)),(i=f[2])&&n.push(new Ff(i,a,u,c,l)),i=f[3])&&n.push(new Ff(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},la.x=function(t){return arguments.length?(this._x=t,this):this._x},la.y=function(t){return arguments.length?(this._y=t,this):this._y};var $f={value:()=>{}};function Uf(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Xf(r)}function Xf(t){this._=t}function Kf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=$f,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Xf.prototype=Uf.prototype={constructor:Xf,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Kf(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Kf(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Xf(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Zf,Qf,Jf=0,th=0,eh=0,nh=1e3,rh=0,ih=0,ah=0,oh="object"==typeof performance&&performance.now?performance:Date,sh="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function lh(){return ih||(sh(ch),ih=oh.now()+ah)}function ch(){ih=0}function uh(){this._call=this._time=this._next=null}function fh(t,e,n){var r=new uh;return r.restart(t,e,n),r}function hh(){ih=(rh=oh.now())+ah,Jf=th=0;try{lh(),++Jf;for(var t,e=Zf;e;)0<=(t=ih-e._time)&&e._call.call(void 0,t),e=e._next;--Jf}finally{for(var n,r,i=Zf,a=1/(Jf=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Zf=r);Qf=n,ph(a),ih=0}}function dh(){var t=oh.now(),e=t-rh;nh<e&&(ah-=e,rh=t)}function ph(t){Jf||(th=th&&clearTimeout(th),24<t-ih?(t<1/0&&(th=setTimeout(hh,t-oh.now()-ah)),eh=eh&&clearInterval(eh)):(eh||(rh=oh.now(),eh=setInterval(dh,nh)),Jf=1,sh(hh)))}uh.prototype=fh.prototype={constructor:uh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?lh():+n)+(null==e?0:+e),this._next||Qf===this||(Qf?Qf._next=this:Zf=this,Qf=this),this._call=t,this._time=n,ph()},stop:function(){this._call&&(this._call=null,this._time=1/0,ph())}};const gh=4294967296;function yh(t){return t.x}function mh(t){return t.y}var vh=10,bh=Math.PI*(3-Math.sqrt(5));function xh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=fh(i),n=Uf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%gh)/gh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=vh*Math.sqrt(.5+r),e=r*bh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function wh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,F=(r=Gf(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,R()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Gf(+t),R(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=Df(i,yh,mh).visitAfter(I);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function R(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function I(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=Hf(c))*i),0===a&&(s+=(a=Hf(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=Hf(c))*i),0===a&&(s+=(a=Hf(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,O,M,k,_,S,E,A,L,n=Yf(a).id(Oc(n)),T=("function"==typeof o&&F.strength(o),"function"==typeof s&&n.strength(s),xh(t).force("link",n).force("charge",F));function P(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function C(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function j(t){for(var e,n=0,r=O.length;n<r;++n)(e=O[n]).vx+=(k[n]-e.x)*M[n]*t}function N(){if(O){var t,e=O.length;for(M=new Array(e),k=new Array(e),t=0;t<e;++t)M[t]=isNaN(k[t]=+w(O[t],t,O))?0:+_(O[t],t,O)}}function B(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*L,r=(r/e-E)*L,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(L=1,null==S&&(S=0),null==E&&(E=0),B.initialize=function(t){A=t},B.x=function(t){return arguments.length?(S=+t,B):S},B.y=function(t){return arguments.length?(E=+t,B):E},B.strength=function(t){return arguments.length?(L=+t,B):L},B)):T.force("x",(_=Gf(.1),"function"!=typeof w&&(w=Gf(null==w?0:+w)),j.initialize=function(t){O=t,N()},j.strength=function(t){return arguments.length?(_="function"==typeof t?t:Gf(+t),N(),j):_},j.x=function(t){return arguments.length?(w="function"==typeof t?t:Gf(+t),N(),j):w},j)).force("y",(x=Gf(.1),"function"!=typeof y&&(y=Gf(null==y?0:+y)),P.initialize=function(t){m=t,C()},P.strength=function(t){return arguments.length?(x="function"==typeof t?t:Gf(+t),C(),P):x},P.y=function(t){return arguments.length?(y="function"==typeof t?t:Gf(+t),C(),P):y},P)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const Oh=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=et(e,"node"),c=et(e,"link"),{links:t,nodes:u}=kc(t,e),{nodesData:t,linksData:u}=wh({links:t,nodes:u},tt({},{joint:!0},i),e);return[tt({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:et(r,"link"),animate:"object"==typeof s?et(s,"link"):s}),tt({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:et(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),et(r,"label")),...a],animate:"object"==typeof s?et(s,"node"):s})]},Mh=(Oh.props={},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=ml(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),kh=t=>Mh(gl)(t),_h=(kh.props={},t=>Mh(ic)(t)),Sh=(_h.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=_h(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[tt({},h,{data:l,encode:et(e,"link"),scale:et(n,"link"),labels:o,style:Object.assign({stroke:"#999"},et(r,"link")),animate:"object"==typeof s?et(s,"link"):s}),tt({},f,{data:i,scale:et(n,"node"),encode:et(e,"node"),labels:[Object.assign(Object.assign({},d),et(r,"label")),...a],style:Object.assign({},et(r,"node")),animate:"object"==typeof s?et(s,"node"):s})]}});Sh.props={};var Eh={},Ah={},Lh=34,Th=10,Ph=13;function Ch(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function jh(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Nh(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Bh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Nh(-e,6):9999<e?"+"+Nh(e,6):Nh(e,4))+"-"+Nh(t.getUTCMonth()+1,2)+"-"+Nh(t.getUTCDate(),2)+(a?"T"+Nh(n,2)+":"+Nh(r,2)+":"+Nh(i,2)+"."+Nh(a,3)+"Z":i?"T"+Nh(n,2)+":"+Nh(r,2)+":"+Nh(i,2)+"Z":r||n?"T"+Nh(n,2)+":"+Nh(r,2)+"Z":"")}function Fh(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return Ah;if(l)return l=!1,Eh;var t,e,n=a;if(r.charCodeAt(n)===Lh){for(;a++<i&&r.charCodeAt(a)!==Lh||r.charCodeAt(++a)===Lh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Th?l=!0:e===Ph&&(l=!0,r.charCodeAt(a)===Th)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Th)l=!0;else if(e===Ph)l=!0,r.charCodeAt(a)===Th&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Th&&--i,r.charCodeAt(i-1)===Ph&&--i;(e=c())!==Ah;){for(var u=[];e!==Eh&&e!==Ah;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Bh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Ch(n=t),function(t,e){return r(i(t),e,n)}):Ch(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?jh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?jh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function Rh(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Ih&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Ih=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Dh=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ye(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Fh(i).parse(t,a?Rh:cf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Dh.props={};const zh=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};zh.props={};const Wh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},Gh=(Wh.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});Gh.props={};const Hh=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};Hh.props={};const qh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};qh.props={};const Vh=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Yh=(Vh.props={},t=>{const e=t["value"];return()=>e}),$h=(Yh.props={},t=>{const{callback:e=cf}=t;return t=>e(t)}),Uh=($h.props={},t=>{const{callback:e=cf}=t;return t=>Array.isArray(t)?t.map(e):t});Uh.props={};var Xh=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Kh={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Zh(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},Kh),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=y(t),t.targetWeight=m(t)});const i=Gc(r,t=>t.source),a=Gc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=yu(e,t=>t.sourceWeight)+yu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:Xh[v])&&r.sort(n),!(n=(r=e).length))throw ff("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Gc(e,t=>t.source),l=Gc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Qh=e=>t=>Zh(e)(t),Jh=(Qh.props={},Math.PI/180),td=64,ed=2048;function nd(t){return t.text}function rd(){return"serif"}function id(){return"normal"}function ad(t){return t.value}function od(){return 90*~~(2*Math.random())}function sd(){return 1}function ld(){}function cd(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(td<<5)/c,ed/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*Jh),h=Math.cos(o.rotate*Jh),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=td<<5&&(i=0,a+=n,n=0),a+e>=ed)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*Jh),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(td<<5)/c,ed/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(td<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*m)}}}function ud(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function fd(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function hd(){return document.createElement("canvas")}function dd(t){return"function"==typeof t?t:function(){return t}}const pd={archimedean:ud,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function gd(){let b=[256,256],r=nd,i=rd,p=ad,g=id,y=od,m=sd,x=ud,w=Math.random,v=ld,O=[],M=null,k=1/0;const _=id,S=hd,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(td<<5)/e,t.height=ed/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||fd((b[0]>>5)*b[1]),c=O.length,u=[],f=O.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<k&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,cd(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=fd((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){k=null==t?1/0:t},E.words=function(t){O=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=dd(t)},E.font=function(t){i=dd(t)},E.fontWeight=function(t){g=dd(t)},E.rotate=function(t){y=dd(t)},E.spiral=function(t){x=pd[t]||t},E.fontSize=function(t){p=dd(t)},E.padding=function(t){m=dd(t)},E.random=function(t){w=dd(t)},E.on=function(t){v=dd(t)},E}const yd={size:[500,500],fontSize:[14,28]};function md(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const vd=h=>f=>ye(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},yd,h),e=gd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ye(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[ou(e),iu(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",md,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=J(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function bd(e){return"string"==typeof e?t=>t[e]:e}vd.props={};const xd=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=bd(r),l=bd(t),c=Hc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},wd=(xd.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});wd.props={};const Od=u=>c=>ye(void 0,void 0,void 0,function*(){var{width:t,height:e}=wf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=J(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield vd(Object.assign(Object.assign({},l),o))(e);return[tt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),Md=(Od.props={},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),kd=(Md.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),_d=(kd.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),Sd=(_d.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),Ed=(Sd.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),Ad=(Ed.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),Ld=(Ad.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),Td=(Ld.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),Pd=(Td.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),Cd=(Pd.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),jd=(Cd.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Nd=(jd.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),Bd=(Nd.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),Fd=(Bd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Rd=(Fd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Id=(Rd.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Dd=(Id.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),zd=(Dd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Wd=(zd.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Gd=(Wd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function Hd(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function qd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Vd(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Gd.props={};const Yd=Math.sqrt(50),$d=Math.sqrt(10),Ud=Math.sqrt(2);function Xd(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Yd?10:n>=$d?5:n>=Ud?2:1)*10**t:-(10**-t)/(n>=Yd?10:n>=$d?5:n>=Ud?2:1)}function Kd(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Yd?r*=10:n>=$d?r*=5:n>=Ud&&(r*=2),e<t?-r:r}const Zd=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Xd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Xd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Xd(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},Qd=36e5,Jd=864e5,tp=7*Jd;Jd,Jd;function ep(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}o=ep(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),e=ep(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),n=ep(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),os=ep(Qd,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Qd*e)},t=>t.getHours()),aa=ep(Jd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Jd*e)},t=>t.getDate()-1);const np=ep(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());cs=ep(tp,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+tp*e)},t=>{var e=np.floor(t),t=new Date(+t);return Math.floor((+t-+e)/tp)}),ca=ep(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const rp={millisecond:o,second:e,minute:n,hour:os,day:aa,week:cs,month:np,year:ca};ua=ep(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),a=ep(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ha=ep(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),da=ep(Qd,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Qd*e)},t=>t.getUTCHours()),pa=ep(Jd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Jd*e)},t=>t.getUTCDate()-1);const ip=ep(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());ga=ep(tp,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+tp*e)},t=>{var e=ip.floor(t),t=new Date(+t);return Math.floor((+t-+e)/tp)}),ya=ep(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const ap={millisecond:ua,second:a,minute:ha,hour:da,day:pa,week:ga,month:ip,year:ya};function op(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?ap:rp;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Vd(i,l,0,c,s);let f;return f=u===c?[a,Kd(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Kd(t,e,n),1)]}const sp=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=op(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function lp(t){return null!=t&&!Number.isNaN(t)}const cp=e=>t=>-e(-t),up=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?cp(t):t},fp=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?cp(n):n},hp=(t,e,n,r)=>{var i=t<0,a=up(r,i),r=fp(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function dp(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return Is(t)?Math.round(t):t}):i;this.output=Hd(a,r,e,t)},t.prototype.invert=void 0}}var pp,ma={exports:{}},va={exports:{}},gp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},yp=Array.prototype.concat,mp=Array.prototype.slice,vp=va.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];gp(i)?e=yp.call(e,mp.call(i)):e.push(i)}return e},bp=(vp.wrap=function(t){return function(){return t(vp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),xp=va.exports,wp=Object.hasOwnProperty,Op=Object.create(null);for(pp in bp)wp.call(bp,pp)&&(Op[bp[pp]]=pp);var Mp=ma.exports={to:{},get:{}};function kp(t,e,n){return Math.min(Math.max(e,t),n)}function _p(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}Mp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=Mp.get.hsl(t),n="hsl";break;case"hwb":e=Mp.get.hwb(t),n="hwb";break;default:e=Mp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},Mp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:wp.call(bp,e[1])?((i=bp[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=kp(i[n],0,255);return i[3]=kp(i[3],0,1),i},Mp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,kp(parseFloat(t[2]),0,100),kp(parseFloat(t[3]),0,100),kp(isNaN(e)?1:e,0,1)]):null},Mp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,kp(parseFloat(t[2]),0,100),kp(parseFloat(t[3]),0,100),kp(isNaN(e)?1:e,0,1)]):null},Mp.to.hex=function(){var t=xp(arguments);return"#"+_p(t[0])+_p(t[1])+_p(t[2])+(t[3]<1?_p(Math.round(255*t[3])):"")},Mp.to.rgb=function(){var t=xp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},Mp.to.rgb.percent=function(){var t=xp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},Mp.to.hsl=function(){var t=xp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},Mp.to.hwb=function(){var t=xp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},Mp.to.keyword=function(t){return Op[t.slice(0,3)]};var Sp=ma.exports;function Ep(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Ap(t){var e,n,r,t=Sp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Ep(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Ep(n,r,e),255*Ep(n,r,e-1/3),t]):null):null}const Lp=(e,n)=>t=>e*(1-t)+n*t,Tp=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Lp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Ap(n),c=Ap(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Pp=(t,e)=>{const n=Lp(t,e);return t=>Math.round(n(t))};function Cp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function jp(t){return"object"==typeof t?t.valueOf():t}class Np extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=jp,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Cp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Cp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class Bp{constructor(t){this.options=tt({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tt({},this.options,t),this.rescale(t)}rescale(t){}}const Fp=Symbol("defaultUnknown");function Rp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Ip(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Fp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Dp(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class zp extends Bp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Fp}}map(t){return 0===this.domainIndexMap.size&&Rp(this.domainIndexMap,this.getDomain(),this.domainKey),Ip({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Rp(this.rangeIndexMap,this.getRange(),this.rangeKey),Ip({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Dp(e),this.rangeKey=Dp(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new zp(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function Wp(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new Np(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new Np(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class Gp extends zp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Fp,flex:[]}}clone(){return new Gp(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return Wp(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const Hp=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Xd(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};class qp extends Bp{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:Hp}}map(t){var[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){var[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){var{tickMethod:t,domain:e,tickCount:n}=this.options,[e,r]=e;return Is(e)&&Is(r)?t(e,r,n):[]}clone(){return new qp(this.options)}}function Vp(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Yp=[1,5,2,2.5,4,3],$p=100*Number.EPSILON;const Up=(n,r,t=5,i=!0,a=Yp,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=y,p=void 0,p=Us(h),1-Vs(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,O=(k=r,O=w*(e-1),(k-=n)<O?1-((O-k)/2)**2/(.1*k)**2:1);if(o[0]*v+o[1]*O+o[2]*b+o[3]<g.score)break;var M=Math.floor(r/w)*y-(e-1)*y,k=Math.ceil(n/w)*y;if(M<=k){var _=k-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(w/y),E=S+w*(e-1),A=w,L=function(t,e,n,r,i,a){var o=Us(e),e=Vs(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<$p||a-t<$p)&&r<=0&&0<=i?1:s)}(m,a,y,S,E,A),T=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,P=(l=e,P=n,l=(l-1)/(E-(C=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(P,C)),2-Math.max(l/c,c/l)),C=o[0]*L+o[1]*T+o[2]*P+ +o[3];g.score<C&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=C)}}t+=1}e+=1}}y+=1}var t=Vp(g.lmax),e=Vp(g.lmin),j=Vp(g.lstep),N=Math.floor((t=(t-e)/j,Math.round(1e12*t)/1e12))+1,B=new Array(N);B[0]=Vp(e);for(let t=1;t<N;t+=1)B[t]=Vp(B[t-1]+j);return B};class Xp extends Bp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Up}}map(t){return lp(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Xp(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Is(t)&&Is(r)?n(t,r,e):[]}}const Kp=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Hd(o=t<r?(a=qd(t,r),n(e,i)):(a=qd(r,t),n(i,e)),a)},Zp=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=qd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Vd(r,t,1,i)-1,n=a[e];return Hd(o[e],n)(t)}},Qp=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Zp:Kp)(t,e,r?Pp:n)};class Jp extends Bp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Lp,tickCount:5}}map(t){return lp(t)?this.output(t):this.options.unknown}invert(t){return lp(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Zd}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return Hs}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Qp(n.map(t),r,a,i);this.output=Hd(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Qp(i,r.map(t),Lp);this.input=Hd(e,n,i)}}class t0 extends Jp{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Tp,tickMethod:Hp,tickCount:5}}chooseTransforms(){return[Hs,Hs]}clone(){return new t0(this.options)}}class e0 extends Gp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Fp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new e0(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const n0=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class r0 extends Jp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Tp,tickMethod:Hp,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[Hs,Hs]:(t=.5===r?n0:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new r0(this.options)}}class i0 extends r0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Tp,tickMethod:Hp,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new i0(this.options)}}class a0 extends Bp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return lp(t)?(t=Vd(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new a0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const o0=(t,e,n,r=10)=>{var i=t<0,a=fp(r,i),o=up(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=Hp(l,c,n))}else h=Hp(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class s0 extends Jp{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Tp,tickMethod:o0,tickCount:5}}chooseNice(){return hp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[up(t,e),fp(t,e)]}clone(){return new s0(this.options)}}class l0 extends a0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Up}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Zd(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new l0(this.options)}}function c0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class u0 extends a0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Up}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=c0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new u0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var f0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,h0=/\[([^]*?)\]/gm;function d0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function p0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function g0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var y0,ba=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xa=["January","February","March","April","May","June","July","August","September","October","November","December"],u=d0(xa,3),m0=p0({},{dayNamesShort:d0(ba,3),dayNames:ba,monthNamesShort:u,monthNames:xa,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),v0={D:function(t){return String(t.getDate())},DD:function(t){return g0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return g0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return g0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return g0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return g0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return g0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return g0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return g0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return g0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return g0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return g0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+g0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+g0(Math.floor(Math.abs(t)/60),2)+":"+g0(Math.abs(t)%60,2)}},b0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const x0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=op(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function w0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class O0 extends Jp{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:x0,interpolate:Lp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return sp}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?ap:rp,s=t?w0:Hs;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=b0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=b0[t]||t).replace(h0,function(t,e){return r.push(e),"@@@"}),p0(p0({},m0),n));return(t=t.replace(f0,function(t){return v0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new O0(this.options)}}var M0;let k0=y0=class extends t0{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Hs,tickMethod:Hp,tickCount:5}}constructor(t){super(t)}clone(){return new y0(this.options)}};k0=y0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([dp(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Hd(Lp(0,1),qd(t,e))})],k0);let _0=M0=class extends t0{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Hs,tickMethod:Hp,tickCount:5}}constructor(t){super(t)}clone(){return new M0(this.options)}};_0=M0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([dp(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Hd(Lp(0,.5),qd(e,n)),a=Hd(Lp(.5,1),qd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],_0);const S0=t=>new Gp(t),E0=(S0.props={},t=>new t0(t)),A0=(E0.props={},t=>new zp(t)),L0=(A0.props={},t=>new Xp(t)),T0=(L0.props={},t=>new e0(t)),P0=(T0.props={},t=>new O0(t)),C0=(P0.props={},t=>new s0(t)),j0=(C0.props={},t=>new r0(t)),N0=(j0.props={},t=>new a0(t)),B0=(N0.props={},t=>new u0(t)),F0=(B0.props={},t=>new l0(t)),R0=(F0.props={},t=>new i0(t)),I0=(R0.props={},t=>new k0(t)),D0=(I0.props={},t=>new qp(t));function z0(t){return function(){return t}}D0.props={};const W0=Math.abs,G0=Math.atan2,H0=Math.cos,q0=Math.max,V0=Math.min,Y0=Math.sin,$0=Math.sqrt,U0=1e-12,X0=Math.PI,K0=X0/2,Z0=2*X0;function Q0(t){return 1<=t?K0:t<=-1?-K0:Math.asin(t)}const J0=Math.PI,t1=2*J0,e1=1e-6,n1=t1-e1;function r1(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class i1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?r1:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return r1;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,f=s-t,h=l-e,d=f*f+h*h;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>e1&&(Math.abs(h*c-u*f)>e1&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((J0-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>e1&&this._append`L${t+d*f},${e+d*h}`,this._append`A${i},${i},0,0,${+(f*s<h*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,f=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>e1||Math.abs(this._y1-c)>e1)&&this._append`L${l},${c}`,n&&((f=f<0?f%t1+t1:f)>n1?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>e1&&this._append`A${n},${n},0,${+(f>=J0)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function a1(){return new i1}function o1(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new i1(r)}function s1(t){return t.innerRadius}function l1(t){return t.outerRadius}function c1(t){return t.startAngle}function u1(t){return t.endAngle}function f1(t){return t&&t.padAngle}function h1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/$0(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*$0(q0(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function d1(){var A=s1,L=l1,T=z0(0),P=null,C=c1,j=u1,N=f1,B=null,F=o1(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,O=+A.apply(this,arguments),M=+L.apply(this,arguments),k=C.apply(this,arguments)-K0,_=j.apply(this,arguments)-K0,S=W0(_-k),E=k<_;if(B=B||(t=F()),M<O&&(e=M,M=O,O=e),M>U0?S>Z0-U0?(B.moveTo(M*H0(k),M*Y0(k)),B.arc(0,0,M,k,_,!E),O>U0&&(B.moveTo(O*H0(_),O*Y0(_)),B.arc(0,0,O,_,k,E))):(r=e=k,i=n=_,o=a=S,h=(u=N.apply(this,arguments)/2)>U0&&(P?+P.apply(this,arguments):$0(O*O+M*M)),w=x=s=V0(W0(M-O)/2,+T.apply(this,arguments)),h>U0&&(f=Q0(h/O*Y0(u)),h=Q0(h/M*Y0(u)),(a-=2*f)>U0?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(k+_)/2),(o-=2*h)>U0?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(k+_)/2)),u=M*H0(e),f=M*Y0(e),h=O*H0(i),k=O*Y0(i),s>U0&&(d=M*H0(n),p=M*Y0(n),g=O*H0(r),y=O*Y0(r),S<X0)&&((_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<U0))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,k))?(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/Y0((1<(S=(S*b+v*m)/($0(S*S+v*v)*$0(b*b+m*m)))?0:S<-1?X0:Math.acos(S))/2),b=$0(_[0]*_[0]+_[1]*_[1]),x=V0(s,(O-b)/(v-1)),w=V0(s,(M-b)/(1+v))):x=w=0),o>U0?w>U0?(l=h1(g,y,u,f,M,w,E),c=h1(d,p,h,k,M,w,E),B.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?B.arc(l.cx,l.cy,w,G0(l.y01,l.x01),G0(c.y01,c.x01),!E):(B.arc(l.cx,l.cy,w,G0(l.y01,l.x01),G0(l.y11,l.x11),!E),B.arc(0,0,M,G0(l.cy+l.y11,l.cx+l.x11),G0(c.cy+c.y11,c.cx+c.x11),!E),B.arc(c.cx,c.cy,w,G0(c.y11,c.x11),G0(c.y01,c.x01),!E))):(B.moveTo(u,f),B.arc(0,0,M,e,n,!E)):B.moveTo(u,f),O>U0&&a>U0?x>U0?(l=h1(h,k,d,p,O,-x,E),c=h1(u,f,g,y,O,-x,E),B.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?B.arc(l.cx,l.cy,x,G0(l.y01,l.x01),G0(c.y01,c.x01),!E):(B.arc(l.cx,l.cy,x,G0(l.y01,l.x01),G0(l.y11,l.x11),!E),B.arc(0,0,O,G0(l.cy+l.y11,l.cx+l.x11),G0(c.cy+c.y11,c.cx+c.x11),E),B.arc(c.cx,c.cy,x,G0(c.y11,c.x11),G0(c.y01,c.x01),!E))):B.arc(0,0,O,i,r,E):B.lineTo(h,k)):B.moveTo(0,0),B.closePath(),t)return B=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +L.apply(this,arguments))/2,e=(+C.apply(this,arguments)+ +j.apply(this,arguments))/2-X0/2;return[H0(e)*t,Y0(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:z0(+t),e):A},e.outerRadius=function(t){return arguments.length?(L="function"==typeof t?t:z0(+t),e):L},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:z0(+t),e):T},e.padRadius=function(t){return arguments.length?(P=null==t?null:"function"==typeof t?t:z0(+t),e):P},e.startAngle=function(t){return arguments.length?(C="function"==typeof t?t:z0(+t),e):C},e.endAngle=function(t){return arguments.length?(j="function"==typeof t?t:z0(+t),e):j},e.padAngle=function(t){return arguments.length?(N="function"==typeof t?t:z0(+t),e):N},e.context=function(t){return arguments.length?(B=null==t?null:t,e):B},e}function p1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function g1(t){this._context=t}function y1(t){return new g1(t)}function m1(t){return t[0]}function v1(t){return t[1]}function b1(o,s){var l=z0(!0),c=null,u=y1,f=null,h=o1(e);function e(t){var e,n,r,i=(t=p1(t)).length,a=!1;for(null==c&&(f=u(r=h())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?m1:z0(o),s="function"==typeof s?s:void 0===s?v1:z0(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:z0(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:z0(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:z0(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function x1(u,f,h){var d=null,p=z0(!0),g=null,y=y1,m=null,v=o1(e);function e(t){var e,n,r,i,a,o=(t=p1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return b1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?m1:z0(+u),f="function"==typeof f?f:z0(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?v1:z0(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:z0(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:z0(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:z0(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:z0(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:z0(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:z0(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:z0(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}a1.prototype=i1.prototype,g1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}};var w1=M1(y1);function O1(t){this._curve=t}function M1(e){function t(t){return new O1(e(t))}return t._curve=e,t}function k1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(M1(t)):e()._curve},t}function _1(){}function S1(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 E1(t,e){this._context=t,this._k=(1-e)/6}function A1(t,e){this._context=t,this._k=(1-e)/6}function L1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>U0&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>U0&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function T1(t,e){this._context=t,this._alpha=e}O1.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))}},E1.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:S1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:S1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new E1(t,n)}return t.tension=function(t){return e(+t)},t}(0),A1.prototype={areaStart:_1,areaEnd:_1,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)}},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:S1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new A1(t,n)}return t.tension=function(t){return e(+t)},t}(0),T1.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:L1(this,t,e)}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}};var P1=function e(n){function t(t){return n?new T1(t,n):new E1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function C1(t,e){this._context=t,this._alpha=e}C1.prototype={areaStart:_1,areaEnd:_1,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)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:L1(this,t,e)}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}};var j1=function e(n){function t(t){return n?new C1(t,n):new A1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function N1(t){this._context=t}function B1(t){return new N1(t)}function F1(t,e){this._context=t,this._t=e}function R1(t){return new F1(t,.5)}function I1(t){return new F1(t,0)}function D1(t){return new F1(t,1)}function nt(t){return new z1([t],null,t,t.ownerDocument)}N1.prototype={areaStart:_1,areaEnd:_1,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))}},F1.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(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:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class z1{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new z1(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new z1(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new z1([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new z1(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new z1(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new z1([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Gc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const Gc=f.get(d);s.push([h,Gc]);for(const y of Gc)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new z1([],i,this._parent,this._document),new z1(a,null,this._parent,this._document),new z1(o,null,this._parent,this._document),new z1([],s,this._parent,this._document),new z1(l,null,this._parent,this._document)];return new z1(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new z1(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=z1.registry[t])?new e:ff("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){var e=this._transitions[t];e?(e=Array.isArray(e)?e:[e],Promise.all(e.map(t=>t.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new z1([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function W1([t,e],[n,r]){return[t-n,e-r]}function G1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function H1([t,e]){return Math.atan2(e,t)}function q1([t,e]){return H1([t,e])+Math.PI/2}function V1(t,e){t=H1(t),e=H1(e);return t<e?e-t:2*Math.PI-(t-e)}function Y1(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function $1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function U1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function X1(t){return t.map((t,e)=>e)}function K1(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function Z1(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)Z1(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function Q1(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...Z1(e,t));return n}function A(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function J1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*G1(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function tg(t,e,n,r,i){e=H1(W1(r,e))+Math.PI,n=H1(W1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function eg(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=X1(a),[r,o]=Rc(t,t=>a[t]);const s=new t0({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function ng(t){var[t,e,n,r]=t;return[r,t,e,n]}function rg(t,e,n){var[e,r,,i]=mu(t)?ng(e):e,[n,a]=n,t=t.getCenter(),o=q1(W1(e,t)),r=q1(W1(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:G1(i,t),outerRadius:G1(e,t)}}function ig(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function ag(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function og(t,e){return vu(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function sg(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:f=a,radiusTopLeft:h=a,radiusTopRight:d=a}=r,r=J(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!vu(n)&&!xu(n)){var[p,,g]=!!mu(n)?ng(t):t;const[x,v]=p;var[g,p]=W1(g,p),y=(0<g?x:x+g)+o,m=(0<p?v:v+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return nt(new N.Rect({})).style("x",y).style("y",m).style("width",g).style("height",o).style("radius",[h,d,f,u]).call(A,r).node()}const{y:v,y1:b}=e;l=n.getCenter(),p=rg(n,t,[v,b]),s=d1().cornerRadius(a).padAngle(i*Math.PI/180);return nt(new N.Path({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(A,r).node()}z1.registry={g:N.Group,rect:N.Rect,circle:N.Circle,path:N.Path,text:N.Text,ellipse:N.Ellipse,image:N.Image,line:N.Line,polygon:N.Polygon,polyline:N.Polyline,html:N.HTML};const lg=M=>{const{colorAttribute:k,first:_=!0,last:S=!0}=M,E=J(M,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=J(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:f=a,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,lineWidth:r="stroke"===k||s?r:0,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y}=E,w=J(E,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:O}=e;return nt(sg(t,e,n,{radius:a,radiusTopLeft:_?l:d,radiusTopRight:_?c:p,radiusBottomRight:S?u:g,radiusBottomLeft:S?f:h,inset:y,insetLeft:m,insetRight:v,insetBottom:b,insetTop:x})).call(A,o).style(k,i).style(ag(M),O).style("lineWidth",r).style("stroke",void 0===s?i:s).call(A,w).node()}},cg=(lg.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>lg(Object.assign({colorAttribute:"fill"},t))),ug=(cg.props=Object.assign({},lg.props),t=>lg(Object.assign({colorAttribute:"stroke"},t)));ug.props=Object.assign({},lg.props);const fg=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(mu(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=J(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return lg(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function hg(t,e,n){var[t,r,i,a]=t;if(mu(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}fg.props=Object.assign({},lg.props);const dg=t=>fg(Object.assign({adjustPoints:hg},t));function pg(t){const e="function"==typeof t?t:t.render;return class extends N.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}dg.props=Object.assign({},lg.props);const gg=pg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;nt(t).maybeAppend("line",()=>new N.Path({})).style("d",e).call(A,r),nt(t).maybeAppend("line1",()=>new N.Path({})).style("d",n).call(A,i)});const yg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:g=!1}=t,y=J(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=J(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?eg(a,s,l,h,d):r,s=og(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(vu(n)){const u=n.getCenter();c=n=>k1(b1().curve(w1)).angle((t,e)=>q1(W1(n[e],u))).radius((t,e)=>G1(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=b1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=et(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?nt(new N.Path({})).style("d",c(r)).call(A,l):a&&!g?nt(new N.Path({})).style("d",c(t)).call(A,l):nt(new gg).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},mg=(yg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=vu(n)?B1:y1;return yg(Object.assign({curve:i},a))(t,e,n,r)}),vg=(mg.props=Object.assign({},yg.props),t=>{const{alpha:a=.5}=t,o=J(t,["alpha"]);return(t,e,n,r)=>{var i=vu(n)?j1:P1;return yg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),bg=(vg.props=Object.assign({},yg.props),t=>yg(Object.assign({curve:D1},t))),xg=(bg.props=Object.assign({},yg.props),t=>yg(Object.assign({curve:I1},t))),wg=(xg.props=Object.assign({},yg.props),t=>yg(Object.assign({curve:R1},t)));function Og(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}wg.props=Object.assign({},yg.props);var Mg,kg=Object.freeze({__proto__:null,point:Og,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const f=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,g=J(h,["colorAttribute","symbol","mode"]),y=kg[t]||Og;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=ig(r,a,o,s),{defaultColor:a,lineWidth:o}=r,s=J(r,["defaultColor","lineWidth"]),r=g.stroke?o||1:o,{color:o=a,transform:a,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||Ou(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||g.r||s.r;return nt(new N.Path).call(A,s).style("d",y(c,u,f)).style("lineWidth",r).style("transform",a).style("stroke",o).style(ag(h),l).style(d,o).call(A,g).node()}},_g=(f.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>f(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Sg=(_g.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),Eg=(Sg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),Ag=(Eg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Lg=(Ag.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),Tg=(Lg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),Pg=(Tg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),Cg=(Pg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),jg=(Cg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Ng=(jg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Bg=(Ng.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),Fg=(Bg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Rg=(Fg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Ig=(Rg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),Dg=(Ig.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"point"},t))),zg=(Dg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Wg=(zg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Gg=(Wg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Hg=(Gg.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),qg=(Hg.props=Object.assign({},f.props),t=>{const{arrowSize:u="40%"}=t,f=J(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=ig(r,e,i,a),e=r["defaultColor"],i=J(r,["defaultColor"]),[a,r]=t,[t,l]=J1(a,r,{arrowSize:u}),c=a1();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),nt(new N.Path).call(A,i).style("d",c.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(A,f).node()}});function Vg(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Vg)}function Yg(){this.constructor=Mg}qg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Mg=Vg,fa=Error,Yg.prototype=fa.prototype,Mg.prototype=new Yg,Vg.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var $g;function Ug(t,e,n,r){var i,a,o,s=Xg(r=void 0===r?"...":r,n),l=Je(t)?t:b(i=t)?"":i.toString(),c=e,u=[];if(Xg(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=Xg(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=Xg(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var Xg=hn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return($g=$g||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),$g.measureText(Je(t)?t:"").width},function(t,e){return O([t],w(rn(e=void 0===e?{}:e)),!1).join("")});function Kg(t,e){return"string"==typeof t?Xg(t,e):t}function Zg(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Qg(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Jg(t){if(en(t))return[t,t,t,t];if(Ye(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var ty=["default","active","selected","disabled","inactive"];function ey(t){var r=v({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}var ny={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function ry(t){var e;return t?null==t?void 0:t.default:(e=fn(t)||{},ty.forEach(function(t){t in e&&delete e[t]}),e)}function iy(t,e,n){return void 0===n&&(n=!1),e?(e=bn(t,e),n?mn({},ry(t),e):e):ry(t)||{}}function ay(t,r,i,e){void 0===i&&(i=!1);var a=(e=void 0===e?!0:e)?ey(t):t;return Object.keys(a).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(r,"[A-Z].*")).test(n)!==i&&(i?t[e]=a[e]:t[(n=e.slice(r.length)).charAt(0).toLowerCase()+n.slice(1)]=a[e]),t},{})}function oy(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(ay(i,n)),i=ay(i,n,!0)),t},[]);return t.push(i),t}function sy(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function ly(t,n){void 0===n&&(n=["x","y","class"]);var r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function cy(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}k.prototype.selectAll=function(t){return new k("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},k.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new k(this._elements,null,this._parent,this._document,void 0,void 0,t)},k.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new k([t],null,t,this._document)},k.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=w(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new k(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new k(r,null,r[0],this._document)},k.prototype.maybeAppend=function(t,e){e=be(this,uy,"m",fy).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},k.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=be(this,uy,"m",fy).call(this,t.startsWith(".")?t:".".concat(t),e);return e.addClassName(t),e},k.prototype.maybeAppendByName=function(t,e){e=be(this,uy,"m",fy).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},k.prototype.addClassName=function(r){var e,t;try{for(var n=ve(this._elements),i=n.next();!i.done;i=n.next())!function(t){var e=t.attr("class")||void 0,n=new Set((null==e?void 0:e.split(" "))||[]);r.split(" ").forEach(function(t){return n.add(t)}),t.attr("class",Array.from(n).join(" "))}(i.value)}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return this},k.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=Gc(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var m=h.get(g);l.push([p,m]);try{r=void 0;for(var v=ve(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new k([],a,this._parent,this._document),new k(o,null,this._parent,this._document),new k(s,null,this._parent,this._document),new k([],l,this._parent,this._document),new k(c,null,this._parent,this._document)];return new k(this._elements,null,this._parent,this._document,w)},k.prototype.merge=function(t){var e=O(O([],w(this._elements),!1),w(t._elements),!1),t=O(O([],w(this._transitions),!1),w(t._transitions),!1);return new k(e,null,this._parent,this._document,void 0,t)},k.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=k.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},k.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},k.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new k([],null,this._parent,this._document,void 0,this._transitions)},k.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},k.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},k.prototype.style=function(n,r,t){void 0===t&&(t=!0);var i="function"==typeof r&&t?r:function(){return r};return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},k.prototype.styles=function(e,s){return void 0===s&&(s=!0),this.each(function(i,a){var o=this,t=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],r=e[1],e="function"==typeof r&&s?r:function(){return r};return void 0!==r&&(t[n]=e.call(o,i,a)),t},{});this.attr(t)})},k.prototype.update=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},k.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},k.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},k.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,O([this._parent,this],w(e),!1)),this},k.prototype.node=function(){return this._elements[0]},k.prototype.nodes=function(){return this._elements},k.prototype.transitions=function(){return this._transitions},k.prototype.parent=function(){return this._parent},uy=new WeakSet,fy=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new k([t],null,this._parent,this._document)},k.registry={g:N.Group,rect:N.Rect,circle:N.Circle,path:N.Path,text:N.Text,ellipse:N.Ellipse,image:N.Image,line:N.Line,polygon:N.Polygon,polyline:N.Polyline,html:N.HTML};var uy,fy,hy=k;function k(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),uy.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function _(t){return new hy([t],null,t,t.ownerDocument)}function dy(t,e,n){return t.querySelector(e)?_(t).select(e):_(t).append(n)}function py(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function gy(t){var t=t.getLocalBounds(),t=w([t.min,t.max],2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function yy(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function my(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function vy(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)xy(t,e[r]);return t}var by=5,xy=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=by),Object.entries(i).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Ke(t)?(Ke(r[e])||(n[e]={}),a<o?xy(r[e],t,a+1,o):n[e]=i[e]):Ye(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function wy(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function Oy(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function My(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function ky(a,o){return void 0===a&&(a=0),void 0===o&&(o=!1),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,o&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var _y,Sy=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function Ey(t){return Je(t)||en(t)?new N.Text({style:{text:String(t)}}):t}function Ay(t){return t*Math.PI/180}function Ly(t){return Number((180*t/Math.PI).toPrecision(5))}function Ty(t,e){var t=(t instanceof N.DisplayObject?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function Py(t,e){if(e)try{var o=t instanceof N.DisplayObject?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof N.DisplayObject?r:r.node()).getBBox()).width,a=r.height,[(r=w([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function Cy(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function jy(t,e){return He(t)?t.apply(void 0,O([],w(e),!1)):t}function Ny(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t instanceof hy?t.node().removeChildren():t instanceof N.DisplayObject?t.removeChildren():t instanceof HTMLElement&&(t.innerHTML="")}),t?n(e):(r&&i(e),null)}function By(){return null!==_y&&_y.apply(this,arguments)||this}function Fy(e,n){return i(t,r=N.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t,e){var n;this.attr(mn({},this.attributes,t=void 0===t?{}:t)),null!=(n=(t=this.descriptor).render)&&n.call(t,this.attributes,this,e)},t;function t(t){t=r.call(this,vy({},{style:n},t))||this;return t.descriptor=e,t}var r}i(By,_y=N.CustomElement);function Ry(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=w(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function Iy(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Dy(t,e,n){void 0===n&&(n="...");t=t instanceof N.Text?t:t.node();"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}Object.defineProperty(Wy.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(Wy.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(Wy.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(Wy.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Wy.fromRect=function(t){return new Wy(t.x,t.y,t.width,t.height)},Wy.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}};var zy=Wy;function Wy(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}function Gy(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,o=w([s+o.width,l+o.height],2),c=o[0],o=o[1];s<e&&(e=s),l<n&&(n=l),r<c&&(r=c),i<o&&(i=o)}return new zy(e,n,r-e,i-n)}function Hy(n,t,e){function r(t){var e=w(u?["height",a]:["width",i],2),n=e[0],r=e[1];switch(c){case"flex-start":return 0;case"flex-end":return r-t[n];case"center":return r/2-t[n]/2;default:return 0}}var i=n.width,a=n.height,o=void 0===(o=e.flexDirection)?"row":o,s=(e.flexWrap,e.justifyContent),l=void 0===s?"flex-start":s;e.alignContent;var c=void 0===(s=e.alignItems)?"flex-start":s,u="row"===o,e="row"===o||"column"===o,f=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],h=(s=w([0,0],2))[0],d=s[1],e=Gy(o=t.map(function(t){var e=t.width,t=t.height,n=w([h,d],2),r=n[0],n=n[1],i=w([h+e*f[0],d+t*f[1]],2);return h=i[0],d=i[1],new zy(r,n,e,t)})),p={"flex-start":0,"flex-end":u?i-e.width:a-e.height,center:u?(i-e.width)/2:(a-e.height)/2};return Gy(s=o.map(function(t){var e=t.x,n=t.y,t=zy.fromRect(t);return t.x=u?e+p[l]:e,t.y=u?n:n+p[l],t})),s.map(function(t){var e=t.x,n=t.y,t=zy.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=zy.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function qy(t,e,n){return[]}function Vy(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}function Yy(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r.attr(e);b(t)||b(n)||n===t||(i[e]=n,a[e]=t)}),e?0<Object.keys(i).length?r.animate([i,a],v({fill:"both"},e)):null:("update"in r?r.update(t):r.attr(t),null)}var $y,Uy=function(e,n){return function(t){return e*(1-t)+n*t}};function Xy(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?Uy(e,t):Array.isArray(e)&&Array.isArray(t)?(i=e,o=(a=t)?a.length:0,s=i?Math.min(o,i.length):0,function(t){for(var e=new Array(s),n=new Array(o),r=0,r=0;r<s;++r)e[r]=Xy(i[r],a[r]);for(;r<o;++r)n[r]=a[r];for(r=0;r<s;++r)n[r]=e[r](t);return n}):"object"==typeof e&&"object"==typeof t?(void 0===(n=e)&&(n={}),void 0===(t=t)&&(t={}),r={},l={},Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];e in n?r[e]=Xy(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function Ky(t,e){var n=e?"visibility":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t instanceof N.DisplayObject&&e(t,n)})}(t,function(t){t.attr("visible",n)})}function Zy(){return null!==$y&&$y.apply(this,arguments)||this}i(Zy,$y=N.Group),Zy.prototype.appendChild=function(t,e){return this.destroyChildren(),Ky(t,!1),$y.prototype.appendChild.call(this,t,e)};i(Jy,Qy=N.CustomElement),Jy.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},Jy.prototype.update=function(t,e){return this.attr(vy({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},Jy.prototype.clear=function(){this.removeChildren()},Jy.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},Jy.prototype.attributeChangedCallback=function(){},Jy.prototype.bindEvents=function(t,e){};var Qy,c=Jy;function Jy(t){return Qy.call(this,t)||this}function tm(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function em(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function nm(t,e,n){return[["M",t-n,e],["L",t+n,e]]}l=tm,fs=nm;function rm(t){n="default",$e(e=t)&&e instanceof Image?n="image":He(e)?n="symbol":Je(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}i(om,im=c),om.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=(t.class,J(t,["x","y","symbol","size","class"])),l=rm(a);Ny(!!l,_(e),function(t){t.maybeAppendByClassName("marker",l).addClassName("".concat(l,"-marker")).call(function(t){var e,n;"image"===l?t.styles({img:a,width:e=2*o,height:e,x:-o,y:-o}):(e=o/2,n=He(a)?a:om.getSymbol(a),t.styles(v({path:null==n?void 0:n(r,i,e)},s)))})})},om.MARKER_SYMBOL_MAP=new Map,om.registerSymbol=function(t,e){om.MARKER_SYMBOL_MAP.set(t,e)},om.getSymbol=function(t){return om.MARKER_SYMBOL_MAP.get(t)};var im,am=om;function om(){return null!==im&&im.apply(this,arguments)||this}am.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),am.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),am.registerSymbol("line",em),am.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),am.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),am.registerSymbol("circle",tm),am.registerSymbol("point",l),am.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),am.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),am.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),am.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),am.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),am.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),am.registerSymbol("line",em),am.registerSymbol("dot",nm),am.registerSymbol("dash",fs),am.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),am.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),am.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),am.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),am.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});i(cm,sm=c),cm.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=w(Jg(void 0===i?0:i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=dy(e,".tag-content","g").attr("className","tag-content").node(),y=dy(g,".tag-marker",function(){return new am({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(y=y).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):y.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:y.style.y}),m=u.x,y=u.y,y=(_(g).maybeAppendByClassName("tag-text","text").styles(v(v({fontFamily:"sans-serif",fontSize:12,text:b(o)?"":"".concat(o),x:m,y:y},s),{textBaseline:"middle"})).call(function(t){o||t.remove()}),u=i,m=h,y=f||"start",s=t||"top",t=(f=g).getLocalBounds(),r=n=0,"start"===y&&(n=u),"center"===y&&(n=-t.halfExtents[0]),"end"===y&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),g.getLocalBounds());_(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:(g.style.zIndex||0)-1,y:y.min[1]-h,x:y.min[0]-i,width:null!==c?i+d+2*y.halfExtents[0]:0,height:null!==c?h+p+2*y.halfExtents[1]:0,radius:null!=l?l:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},c))},cm.tag="tag",cm.defaultOptions={style:{padding:4,spacing:4}};var sm,lm=cm;function cm(t){return sm.call(this,mn({},cm.defaultOptions,t))||this}var um,fm,hm={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},dm={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},pm={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function gm(t){var n=um.call(this,vy({},gm.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function ym(t){return fm.call(this,mn({},ym.defaultOptions,t))||this}i(gm,um=c),Object.defineProperty(gm.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(gm.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=on(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(gm.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),gm.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=mn({},bn(hm,[n,e]),iy(bn(dm,[t,e]),r),iy(bn(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in pm[e]&&(i[t]=bn(pm,[e,t]))}),Object.keys(pm.strict[e]).forEach(function(t){i[t]=bn(pm,["strict",e,t])}),mn(i,iy(bn(this.attributes,e),"disabled"))),i},gm.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.marker,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),w(Jg(r),4)),a=(r[0],r[1]),o=(r[2],r[3]),s=this.buttonHeight,l=this.getStyle("markerStyle"),c=this.markerSize,r=dy(e,".marker",function(){return new am({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},l),{symbol:i,x:o+c/2,y:s/2,size:c}))}).node().getLocalBounds(),u=this.getStyle("textStyle"),r=(this.textShape=dy(e,".text","text").attr("className","text").styles(v(v({x:c?r.max[0]+t:o,y:s/2},u),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),u=this.getStyle("buttonStyle");_(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},u),{height:s,width:o+(c?c+t:0)+2*r.halfExtents[0]+a}))},gm.prototype.update=function(t){this.attr(mn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},gm.prototype.setState=function(t){this.update({state:t})},gm.prototype.hide=function(){this.style.visibility="hidden"},gm.prototype.show=function(){this.style.visibility="visible"},gm.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},gm.tag="button",gm.defaultOptions={style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},i(ym,fm=c),ym.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=w(Jg(void 0===i?0:i),3),i=t[0],f=t[1],t=t[2],h=dy(e,".container","g").styles({className:"container",x:n+t,y:r+i}),d=0,p=0,g=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new lm({className:"breadcrumb-item",style:v(v({x:d,y:p,text:b(n.text)?n.id:n.text,textStyle:l},gn(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,b(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),g.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new N.Text({className:"".concat(ym.tag,"-separator"),id:"".concat(ym.tag,"-separator-").concat(t),style:v(v(v(v({},ny),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},ym.prototype.update=function(t){this.attr(mn({},this.attributes,t)),this.render(this.attributes,this)},ym.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},ym.tag="breadcrumb",ym.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},ny),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(bm,mm=N.DisplayObject),bm.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},bm.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},bm.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},bm.prototype.createLines=function(t){_(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){_(this).styles(t)})},function(t){return t.each(function(t){_(this).styles(t)})},function(t){return t.remove()})},bm.prototype.createAreas=function(t){_(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){_(this).styles(t)})},function(t){return t.each(function(t){_(this).styles(t)})},function(t){return t.remove()})};var mm,vm=bm;function bm(t){var e=this,n=t.style,t=J(t,["style"]);return(e=mm.call(this,mn({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=e.appendChild(new N.Group({name:"lines"})),e.areasGroup=e.appendChild(new N.Group({name:"areas"})),e.render(),e}i(Om,xm=N.DisplayObject),Om.prototype.render=function(){var t=this.attributes.columns;_(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){_(this).styles(t)})},function(t){return t.each(function(t){_(this).styles(t)})},function(t){return t.remove()})},Om.prototype.update=function(t){this.attr(mn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Om.prototype.clear=function(){this.removeChildren()};var xm,wm=Om;function Om(t){var e=this,n=t.style,t=J(t,["style"]);return(e=xm.call(this,mn({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new N.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Mm(t){return 0===t.length?[0,0]:[Qe(function(t,e){if(Ye(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return Qe(t)||0})),Ze(function(t,e){if(Ye(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=He(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Ze(t)||0}))]}function km(t){for(var e=fn(t),n=e[0].length,t=w([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function _m(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=le([0,0],c,x=t[s]),u=ce([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=ue(m=de([0,0],d,h),m,e),0!==(y=(p=fe(x,h))+(g=fe(x,d)))&&(p/=y,g/=y),y=ue([0,0],m,-p),m=ue([0,0],m,g),v=se([0,0],x,y),b=le([0,0],b=se([0,0],x,m),ce([0,0],d,x)),b=ce([0,0],b,le([0,0],d,x)),v=le([0,0],v=se([0,0],x,y=ue([0,0],y=de([0,0],b,x),-p/g)),ce([0,0],h,x)),v=ce([0,0],v,le([0,0],h,x)),b=se([0,0],x,m=ue([0,0],m=de([0,0],x,v),g/p)),o&&(v=le([0,0],v=ce([0,0],v,c),u),b=le([0,0],b=ce([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function Sm(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return O([e===n?"M":"L"],w(t),!1)});return e?t.reverse():t}function Em(t,e){if(void 0===e&&(e=!1),t.length<=2)return Sm(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];vn(a,n.slice(-2))||n.push.apply(n,O([],w(a),!1))}var o=_m(n,!1);return e?o.unshift(O(["M"],w(t[r-1]),!1)):o.unshift(O(["M"],w(t[0]),!1)),o}function Am(t,e,n){t=fn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(Pm,Lm=c),Object.defineProperty(Pm.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=fn(t),en(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"data",{get:function(){return this.attributes.isStack?km(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"baseline",{get:function(){var t=this.scales.y,e=w(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,l,c,u=this.attributes,f=u.isStack,h=u.smooth,d=ay(this.attributes,"area"),p=ay(this.attributes,"line"),u=this.containerCfg.width,g=this.data;return 0===g[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,g=g,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=w(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=w([a,o],2),o=e[0],a=e[1]),t=g.map(function(t){return t.map(function(t,e){return[r.map(e),tn(i.map(t),o,a)]})}),e=[],d&&(g=this.baseline,e=f?(h?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Em(o),l=void 0,l=0===i?Am(s,e,n):(a=Em(t[i-1],!0),o=o[0],a[0][0]="L",O(O(O([],w(s),!1),w(a),!1),[O(["M"],w(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Sm(t[i]),s=void 0,s=0===i?Am(o,e,n):((a=Sm(t[i-1],!0))[0][0]="L",O(O(O([],w(o),!1),w(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(s=h,l=u,c=g,t.map(function(t){return Am((s?Em:Sm)(t),l,c)}))),{lines:t.map(function(t,e){return v({stroke:n.getColor(e),path:(h?Em:Sm)(t)},p)}),areas:e.map(function(t,e){return v({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Pm.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=ay(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=km(s));var e=this.createScales(s),l=e.x,c=e.y,e=w(Mm(s),2),n=e[0],e=e[1],u=new t0({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return v(v({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Pm.prototype.render=function(t,e){this.containerShape=dy(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=dy(e,".".concat(r),function(){return new("line"===n?vm:wm)({className:r,style:i})}).styles(i).node()},Pm.prototype.update=function(t){this.attr(mn({},this.attributes,t)),this.render(this.attributes,this)},Pm.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Pm.prototype.getColor=function(t){var e=this.attributes.color;return Ye(e)?e[t%e.length]:He(e)?e.call(null,t):e},Pm.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=w(Mm(t),2),s=o[0],o=o[1],s=new t0({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new t0({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new Gp({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},Pm.tag="sparkline",Pm.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var Lm,Tm=Pm;function Pm(t){return Lm.call(this,mn({},Pm.defaultOptions,t))||this}var Cm,jm={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},Nm={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},Bm={orient:"horizontal",type:"start",showLabel:!0},Fm=Ry({labelGroup:"label-group",label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Rm=Fy({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,J(t,["size","radius","orient","class"])),a=2.4*n,r=_(e).maybeAppendByClassName(Fm.iconRect,"rect").styles(v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(Fm.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(Fm.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),Im=(i(Dm,Cm=c),Dm.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=w(ly(ay(this.attributes,"label"),[]),2),i=r[0],r=r[1];Ny(!!n,_(t).maybeAppendByClassName(Fm.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(Fm.label,"text").styles(v(v({},Nm),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},Dm.prototype.renderIcon=function(t){var e=this.attributes,n=e.iconShape,n=void 0===n?function(){return new Rm({style:r})}:n,e=e.orient,r=v(v({orient:e},jm),ay(this.attributes,"icon"));this.icon=_(t).maybeAppendByClassName(Fm.icon,n).update(r)},Dm.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},Dm);function Dm(t){return Cm.call(this,vy({},{style:Bm},t))||this}i(Gm,zm=c),Object.defineProperty(Gm.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Gm.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=ay(this.attributes,"sparkline")).padding,t=J(t,["padding"]),e=(i=w(Jg(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.trackLineWidth,v(v({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(Gm.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=w(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(Gm.prototype,"availableSpace",{get:function(){var t=w(Jg(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),Gm.prototype.getValues=function(){return this.values},Gm.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attr("values",t=void 0===t?[0,0]:t);t=!1!==e&&this.animation;Yy(this.selectionShape.node(),this.selectionCfg,t),Yy(this.startHandle.node(),this.getHandleShapeCfg("start"),t),Yy(this.endHandle.node(),this.getHandleShapeCfg("end"),t)},Gm.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.update({values:t}),e&&this.onValueChange(n)},Gm.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=ay(this.attributes,"track");this.trackShape=_(t).maybeAppendByClassName("slider-track","rect").styles(v(v(v({},this.shape),n),{cursor:e?"crosshair":"default"}))},Gm.prototype.renderSparkline=function(t){var n=this;Ny("horizontal"===this.attributes.orient,_(t).maybeAppendByClassName("slider-sparkline-group","g"),function(t){var e=n.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new Tm({style:e})}).call(function(t){t.node().update(e)})})},Object.defineProperty(Gm.prototype,"selectionCfg",{get:function(){var t=ay(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),Gm.prototype.renderSelection=function(t){function e(t){var e="".concat(t,"-handle"),n=r.getHandleShapeCfg(t);return r.foregroundGroup.maybeAppendByClassName(e,function(){return new Im({style:n})}).style("type",t).update(n)}var r=this;this.foregroundGroup=_(t).maybeAppendByClassName("slider-foreground","g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").styles(this.selectionCfg);this.startHandle=e("start"),this.endHandle=e("end")},Gm.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},Gm.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=w(this.range,2),r=n[0],n=n[1],i=w(this.getValues().map(function(t){return Qg(t,e)}),2),a=i[0],i=i[1],t=w((t||[a,i]).map(function(t){return Qg(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=w([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},Gm.prototype.calcMask=function(t){var t=w(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},Gm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=w(this.clampValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},Gm.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=ay(this.attributes,"handle"),a=ay(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new N.Text({style:v(v(v({visibility:"hidden"},ny),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,g="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:g,text:n}},Gm.prototype.getHandleLabelShapeCfg=function(t){var e;return this.attributes.showLabel?(e=ay(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},Gm.prototype.getHandleIconShapeCfg=function(){var t=this.attributes,e=t.orient,t=t.handleIconShape,n=ay(this.attributes,"handleIcon"),r=this.getOrientVal(["ew-resize","ns-resize"]),i=this.getHandleSize();return v(v({},n),{shape:t,orient:e,cursor:r,size:i})},Gm.prototype.getHandleShapeCfg=function(t){var e=this.attributes,n=e.showHandle,e=e.showLabel,r=this.calcHandlePosition(t),i=r.x,r=r.y,a=this.calcHandleText(t);return v(v(v({zIndex:3,showLabel:e,visibility:n?"visible":"hidden"},sy(this.getHandleIconShapeCfg(),"icon")),sy(v(v({},this.getHandleLabelShapeCfg(t)),a),"label")),{x:i,y:r})},Gm.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},Gm.prototype.getOrientVal=function(t){var t=w(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},Gm.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=w(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},Gm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},Gm.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new N.CustomEvent(n,{detail:t}))})},Gm.prototype.bindEvents=function(){var n=this,t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n.onDragStart(e)(t)}),t.on("touchstart",function(t){n.onDragStart(e)(t)})}),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},Gm.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},Gm.tag="slider",Gm.defaultOptions={style:v(v(v({values:[0,1],trackLength:200,trackSize:20,slidable:!0,brushable:!0,scrollable:!0,orient:"horizontal",trackZIndex:-1,trackFill:"#416180",trackOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,showLabel:!0,handleSpacing:2,formatter:function(t){return t}},sy(Bm,"handle")),sy(jm,"handleIcon")),sy(Nm,"handleLabel"))};var zm,Wm=Gm;function Gm(t){var a=zm.call(this,mn({},Gm.defaultOptions,t))||this;return a.range=[0,1],a.animation={duration:100,fill:"both"},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(cy(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(cy(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new N.CustomEvent("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}i(Vm,Hm=c),Object.defineProperty(Vm.prototype,"padding",{get:function(){return Jg(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(Vm.prototype,"value",{get:function(){var t=this.attributes.value,e=w(this.range,2),n=e[0],e=e[1];return tn(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Vm.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(Vm.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=w(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=w(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(Vm.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Vm.prototype,"thumbRadius",{get:function(){var t,e;return this.attributes.isRound?(t=(e=this.availableSpace).width,e=e.height,this.attributes.thumbRadius||this.getOrientVal([e,t])/2):0},enumerable:!1,configurable:!0}),Vm.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=w(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},Vm.prototype.getValue=function(){return this.value},Vm.prototype.renderSlider=function(t){var e=this.attributes,n=e.orient,r=e.trackSize,i=e.padding,e=e.slidable,a=w(oy(this.attributes,["track","thumb"]),2),o=a[0],a=a[1],s=v(v({orient:n,padding:i,slidable:e,trackSize:r,brushable:!1,showHandle:!1,values:this.getValues(),trackLength:this.trackLength,trackRadius:this.trackRadius,selectionRadius:this.thumbRadius},sy(o,"track")),sy(a,"selection"));this.slider=_(t).maybeAppendByClassName("scrollbar",function(){return new Wm({style:s})}).update(s).node()},Vm.prototype.render=function(t,e){this.renderSlider(e)},Vm.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.style.value,r=w(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(tn(t,i,r)),e),this.onValueChange(n)},Vm.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},Vm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},Vm.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},Vm.tag="scrollbar",Vm.defaultOptions={style:{value:0,trackSize:10,isRound:!0,slidable:!0,scrollable:!0,orient:"vertical",padding:[2,2,2,2]}};var Hm,qm=Vm;function Vm(t){var a=Hm.call(this,mn({},Vm.defaultOptions,t))||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.style.value;t!==e&&(a.dispatchEvent(new N.CustomEvent("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new N.CustomEvent("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=w(a.getLocalPosition(),2))[0],e=e[1],n=(i=w(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(cy(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new N.CustomEvent("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new N.CustomEvent("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new N.CustomEvent("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new N.CustomEvent("trackMouseleave",{detail:t.detail}))},a}function Ym(t,e){return Yy(t,{opacity:0},e)}function $m(t,e){t?t.finished.then(e):e()}var Um={style:{data:[],animate:{duration:100,easing:"ease-in-out-sine",fill:"both"},dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",showArrow:!0,lineArrow:new N.Path({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},Xm=(mn({},Um,{style:{type:"arc"}}),mn({},Um,{style:{}}),Ry({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis")),Km=Ry({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function Zm(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function Qm(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?Zm(r):e?(i=yy(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=w(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):Zm(t)}function Jm(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=w([Qm(t,n),Qm(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=w([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=w([yy(e,o),yy(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function tv(t,e,n){var r=n.animate,i=(n.type,n.center,n.connect),a=n.areaFill;if(n.closed,!(e.length<2)&&a&&i){for(var o=Array.isArray(a)?a:[a,"transparent"],s=[],l=0;l<e.length-1;l++){var c=w([e[l].points,e[l+1].points],2),c=Jm(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}t.selectAll(Km.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=jy(t,[t,e,s]);this.attr(t)}).attr("className",Km.region.name)},function(t){return t.each(function(t,e){Yy(this,jy(t,[t,e,s]),r.update)})},function(t){return t.each(function(){return ye(this,void 0,void 0,function(){return me(this,function(t){switch(t.label){case 0:return[4,Ym(this,r.exit)];case 1:return t.sent(),this.remove(),[2]}})})})})}}i(rv,ev=c),rv.prototype.render=function(t,e){t.class;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.animate,t.type,t.center,t.areaFill,t.closed,J(t,["class","items","animate","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=w(e),r=n[0];return n.slice(1),v(v({},t),{points:O(O([],w(e),!1),[r],!1)})}):o),l=_(e).maybeAppendByClassName(Km.lineGroup,"g"),e=_(e).maybeAppendByClassName(Km.regionGroup,"g");l=l,r=s,i=(n=t).animate,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:Qm(t.points,n)}}),l.selectAll(Km.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").attr("className",Km.line.name).styles({stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]}).each(function(t,e){t=jy(v({path:t.path},r),[t,e,a]);this.attr(t)})},function(t){return t.each(function(t,e){Yy(this,jy(v({path:t.path},r),[t,e,a]),i.update)})},function(t){return t.each(function(){var e;return ye(this,void 0,void 0,function(){return me(this,function(t){switch(t.label){case 0:return[4,null==(e=Ym(this,i.exit))?void 0:e.finished];case 1:return t.sent(),this.remove(),[2]}})})})}),tv(e,o,t)};var ev,nv=rv;function rv(){return null!==ev&&ev.apply(this,arguments)||this}function iv(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=w(t,2);return[t[0],jy(t[1],e)]}))}function av(t,e){return e&&He(e)?t.filter(e):t}var ov=hn(function(t,e){var e=w(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return O([t],w(e.angleRange),!1).join()}),sv=hn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=w(e.startPos,2))[0],n=n[1],i=w(e.endPos,2),he([0,0],[(r=w([i[0]-r,i[1]-n],2))[0],r[1]])):(i=Ay(ov(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?O(O([],w(n.startPos),!1),w(n.endPos),!1):O(O(O([],w(n.angleRange),!1),w(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function lv(t,e,n){var t=sv(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var cv=hn(function(t,e){var n=w(e.startPos,2),r=n[0],n=n[1],e=w(e.endPos,2),e=w([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return O(O([t],w(e.startPos),!1),w(e.endPos),!1).join()}),uv=hn(function(t,e){var n=e.radius,r=w(e.center,2),i=r[0],r=r[1],t=Ay(ov(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return O(O(O([t],w(e.angleRange),!1),[e.radius],!1),w(e.center),!1).join()});function fv(t,e){return("linear"===e.type?cv:uv)(t,e)}function hv(t,e){return e-t==360}function dv(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=w([i,i],2),l=s[0],s=s[1],c=w([Ay(t),Ay(e)],2),u=c[0],c=c[1],f=w(a(u),2),h=f[0],f=f[1],d=w(a(c),2),p=d[0],d=d[1];return(hv(t,e)?(u=(c=w(a((c+u)/2),2))[0],c=c[1],"M".concat(h,",").concat(f," A ").concat(l,",").concat(s," 0 1,0 ").concat(u,", ").concat(c," A ").concat(l,",").concat(s," 0 1,0 ").concat(p,", ")):(u=180<o?1:0,c=e<t?0:1,"M".concat(h,",").concat(f,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,","))).concat(d)}function pv(t,e,n,s){var l=e.angleRange,c=e.center,u=e.radius;return t.selectAll(Xm.line.class).data([{path:dv.apply(void 0,O(O(O([],w(l),!1),w(c),!1),[u],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",Xm.line.name).styles(v({angleRange:l,center:c,radius:u},n)).style("path",function(t){return t.path})},function(t){return t.styles(n).transition(function(){var t,r,e,n,i,a=this,o=(n=(e=(e=t=this).attributes).angleRange,o=e.center,e=e.radius,n=O(O(O([],w(n),!1),w(o),!1),[e],!1),o=O(O(O([],w(l),!1),w(c),!1),[u],!1),(e=s.update)?(i=void 0===(i=e.duration)?0:i,r=Xy(n,o),o=Math.ceil(+i/16),i=new Array(o).fill(0).map(function(t,e,n){return{__keyframe_data__:r(e/(n.length-1))}}),t.animate(i,e)):(t.attr("__keyframe_data__",n),null));return o&&(o.onframe=i=function(){var t=bn(a.style,"__keyframe_data__");a.style.path=dv.apply(void 0,O([],w(t),!1))},o.onfinish=i),o}).styles({angleRange:l,center:c,radius:u})},function(t){return t.remove()}).styles(n).transitions()}function gv(t){var t=w(t,2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function yv(e,t,n,r){function i(t){return e.selectAll(Xm.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(Xm.line.name," ").concat(t.className)}).styles(n).transition(function(t){return Yy(this,gv(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return Yy(this,gv(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.startPos,c=t.endPos,u=t.truncRange,f=t.lineExtension,h=w([l,c],2),d=w(h[0],2),p=d[0],d=d[1],h=w(h[1],2),g=h[0],h=h[1],c=w(f?(l=w([l=l,c=c,f=void 0===(f=f)?[0,0]:f],3),f=(c=w(l[0],2))[0],c=c[1],y=(a=w(l[1],2))[0],a=a[1],m=(l=w(l[2],2))[0],l=l[1],f=(y=w([y-f,a-c],2))[0],a=y[1],c=Math.sqrt(Math.pow(f,2)+Math.pow(a,2)),m=(y=w([-m/c,l/c],2))[0],l=y[1],[m*f,m*a,l*f,l*a]):new Array(4).fill(0),4),y=c[0],m=c[1],f=c[2],l=c[3];return u?(c=(a=w(u,2))[0],u=a[1],s=(c=w([p+(g-p)*c,d+(h-d)*c],2))[0],c=c[1],o=(u=w([p+(g-p)*u,d+(h-d)*u],2))[0],u=u[1],s=i([{line:[[p+y,d+m],[s,c]],className:Xm.lineFirst.name},{line:[[o,u],[g+f,h+l]],className:Xm.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,s):i([{line:[[p+y,d+m],[g+f,h+l]],className:Xm.line.name}])}function mv(t,e,n,r){var i,a,o,s,l,c=e.type,r=("linear"===c?yv:pv)(t,e,n,r);return t=t,c=c,n=n,i=(e=e).showArrow,a=e.lineArrow,o=e.truncRange,s=void 0===(s=e.lineArrowOffset)?0:s,l=e.lineArrowSize,c="arc"!==c&&o?t.select(Xm.lineSecond.class):t.select(Xm.line.class),!i||!a||"arc"===e.type&&hv.apply(void 0,O([],w(e.angleRange),!1))?c.style("markerEnd",null):((o=Ey(a)).attr(n),Vy(o,l,!0),c.style("markerEnd",o).style("markerEndOffset",-s)),r}function vv(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function bv(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=w(fv(t,r),2),n=e[0],e=e[1],t=w(ue([0,0],lv(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function xv(t,e,n,r,i){var a=r.type,o=r.closed,s=r.areaFill,l=r.connect,c=vv(n),u=av(e,n.gridFilter),e="segment"===a?bv(u,n):function(t,a,e){var o,s,l=e.controlAngles;if(!(e=vv(a)))throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(l&&0!==l.length)return e=w(e,2),o=e[0],s=e[1],t.map(function(t){var t=w(fv(t.value,a),2),e=t[0],t=t[1],e=w([e-o,t-s],2),n=e[0],r=e[1],i=[];return l.forEach(function(t){var t=Ay(t),t=w([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];i.push([n*e-r*t+o,n*t+r*e+s])}),{points:i}});throw new Error("Invalid gridControlAngles")}(u,n,r);t.maybeAppendByClassName(Xm.grid,function(){return new nv({})}).update(v(v({type:a,animate:i,connect:l,closed:o,center:c},r),{items:e,areaFill:He(s)?u.map(function(t,e){return jy(s,[t,e,u])}):s}))}Object.defineProperty(Ov.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Ov.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Ov.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Ov.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Ov.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Ov.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Ov.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Ov.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Ov.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Ov.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Ov.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Ov.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Ov.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Ov.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var wv=Ov;function Ov(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function Mv(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=w(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=w(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function kv(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),w(n,4)),c=p[0],g=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-g,u+l+n,f+i+(void 0===c?g:c)),e.setEulerAngles(r),t.rotatedPoints(Ay(r),h,d)}function _v(t,a){var o;return O([],w(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=kv(new wv,n,i),Mv(r=kv(new wv,r,i),[n[0],n[1],n[2],n[3]])||Mv(r,[n[0],n[1],n[4],n[5]])||Mv(r,[n[4],n[5],n[6],n[7]])||Mv(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var Sv=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var Ev=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=Sv,f=2,h=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,O([1],w(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==sv(0,n)[1]&&0!==sv(0,n)[0]||(n=gy(t[0]).left,t=gy(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*g/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse());_v((l?O(O([l],w(d),!1),[s],!1):O([s],w(d),!1)).filter(function(t){return Sy(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=u(((c=h).forEach(r.show),c),{seq:f}),f++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return _v(t,s).length<1}function a(n){t.forEach(function(t,e){e=Ye(n)?n[e]:n;b(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,e=void 0===(l=e.recoverWhenFailed)||l,l=t.map(function(t){return+(Ty(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;e&&a(l)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=r.getTextShape(t[0]),d=e.style.fontFamily||"sans-serif",y=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:y,fontStyle:i,fontVariant:a}),f=Kg(c,e)||1,h=Kg(s,e)||1,d=Kg(l,e),p=(!b(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),g=t.slice(),y=w(u,4),m=(y[0],y[1],y[2],y[3],d);h+f<m;m-=f){var v=function(e){return g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=_v(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function Av(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=Ev.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function Lv(t){for(var e=t;e<0;)e+=360;return e%360}var Tv=hn(function(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1],n=w([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return O(O([],w(t),!1),w(e),!1).join()});function Pv(t,e){return lv(t,e.labelDirection,e)}function Cv(t,e,n){var r,i=n.labelAlign,e=Ty(e,"rotate");return e?+e%180:(e=0,r=Pv(t.value,n),t=sv(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?Tv([1,0],r):Tv([t[0]<0?-1:1,0],t),Cy(n=((n=Ly(e))+360)%180,-90,90)||(n+=180),n))}function jv(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=Pv(t,n),n=Lv(e),e=Lv(Ly(Tv([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":Cy(n,90,270)?Cy(e,90,270)?"start":"end":Cy(e,90,270)?"end":"start";if(0===e){if(Cy(n,0,90,!1,!0))return"start";if(Cy(n,0,90)||Cy(n,270,360))return"start"}if(90===e){if(Cy(n,0,90,!1,!0))return"start";if(Cy(n,90,180)||Cy(n,270,360))return"end"}if(270===e){if(Cy(n,0,90,!1,!0))return"end";if(Cy(n,90,180)||Cy(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(Cy(n,0,90)||Cy(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(Xm.labelItem.class);"text"===(null==n?void 0:n.nodeName)&&_(n).style("textAlign",t)}function Nv(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=jy(r.labelSpacing,[t,e,n]),s=w([Pv(t.value,r),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(s,o)],2),o=w(se([0,0],ue([0,0],s[0],l+(1===s[1]?jy(i?a:0,[t,e,n]):0)),fv(t.value,r)),2);return{x:o[0],y:o[1]}}function Bv(n){Av(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){jv(+e,t,n)},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&Dy(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function Fv(t,e,n,r,i,a){var o,s=bn(e,"_elements");0!==s.length&&(o=bn(e,"_transitions"),(e=s.map(function(t){return function(t,e,n,r,i,a){var o=this,s=_(this).append(t.element).attr("className",Xm.labelItem.name).node(),l=(i=w(ly(iv(i,[t,e,n])),2))[0],c=(i=i[1]).transform,i=J(i,["transform"]);return"text"===(null==s?void 0:s.nodeName)&&s.attr(v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textAlign:"center",textBaseline:"middle"},l)),this.attr(i),$m(s=Yy(this,Nv(t,e,n,r),a),function(){Py(o,c),jv(Cv(t,o,r),o,r)}),s}.call(t,t.__data__,0,n,r,i,a)})).forEach(function(t,e){return o[e]=t}),0===e.filter(function(t){return!!t}).length?Bv.call(t,r):Promise.all(e).then(function(){Bv.call(t,r)}))}function Rv(e,t,l,n,r){var i=av(t,l.labelFilter).map(function(t,e,n){return v({element:(r=t,i=e,a=n,s=(o=l).labelFormatter,He(s)?function(){return Ey(jy(s,[r,i,a,Pv(r.value,o)]))}:function(){return Ey(r.label||"")})},t);var r,i,a,o,s});return e.selectAll(Xm.label.class).data(i,function(t,e){return"".concat(t.value,"-").concat(t.label)}).join(function(t){return t.append("g").attr("className",Xm.label.name).call(function(t){Fv(e,t,i,l,n,!1)})},function(t){return t.each(function(){_(this).node().removeChildren()}).call(function(t){Fv(e,t,i,l,n,r.update)})},function(t){return t.transition(function(){var t=this,e=Ym(this,r.exit);return $m(e,function(){_(t).remove()}),e})}).transitions()}function Iv(t,e){return lv(t,e.tickDirection,e)}var Dv=hn(function(t,e){t=w(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return O(O([],w(t),!1),[e],!1).join()});function zv(t,e,n,r,i,a,o){var s=Iv(t.value,a),a=(l=t,c=e,u=n,s=s,a=(a=a).tickLength,s=w(Dv(s,jy(a,[l,c,u])),2),a=w(s[0],2),l=a[0],c=a[1],u=w(s[1],2),{x1:l,x2:u[0],y1:c,y2:u[1]}),s=a.x1,l=a.x2,c=a.y1,u=a.y2,a=w(ly(iv(o,[t,e,n])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(v({x1:s,x2:l,y1:c,y2:u},o)),i.attr(t),r.styles(o)}function Wv(t,e,n,r,i,a){o=_(this),s=t,l=e,c=n,f=(u=r).tickFormatter,h=Iv(s.value,u),u="line",f instanceof N.DisplayObject?u=function(){return f}:He(f)&&(u=function(){return jy(f,[s,l,c,h])});zv(t,e,n,o.append(u).attr("className",Xm.tickItem.name),this,r,i);var o,s,l,c,u,f,h,e=w(fv(t.value,r),2);return Yy(this,{x:e[0],y:e[1]},a)}var Gv={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"},Hv=Ry({text:"text"},"title");function qv(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function Vv(r,t){t=Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}i(Uv,Yv=c),Uv.prototype.getAvailableSpace=function(){var t=this.attributes,r=t.width,i=t.height,e=t.position,n=t.spacing,t=t.inset,a=this.querySelector(Hv.text.class);if(!a)return new zy(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=w(Jg(n),4),l=a[0],c=a[1],u=a[2],f=a[3],n=w([0,0,+r,+i],4),h=n[0],d=n[1],p=n[2],g=n[3],a=qv(e);if(a.includes("i"))return new zy(h,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=w(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=w([+r-o-f],1),p=n[0]),"b"===t&&(n=w([+i-s-l],1),g=n[0]),"l"===t&&(n=w(0===e?[o+c,+r-o-c]:[0,+r],2),h=n[0],p=n[1])});n=w(Jg(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=w([n+a,e+t],2),t=a[0],a=a[1];return new zy(h+n,d+e,p-t,g-a)},Uv.prototype.getBBox=function(){return this.title?this.title.getBBox():new zy(0,0,0,0)},Uv.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,t.class,J(t,["width","height","position","spacing","class"])),u=w(ly(c),1)[0],f=(f=(t=t).width,r=t.height,t=t.position,i=w([+f/2,+r/2],2),a=(i=w([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=qv(t)).includes("l")&&(a=(n=w([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=w([+f,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(f=w([0,"top"],2))[0],i=f[1]),t.includes("b")&&(o=(n=w([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),h=f.x,d=f.y,p=f.textAlign,g=f.textBaseline;Ny(!!c.text,e,function(t){l.title=_(t).maybeAppendByClassName(Hv.text,"text").styles(u).call(Vv,{x:h,y:d,textAlign:p,textBaseline:g}).node()})};var Yv,$v=Uv;function Uv(t){return Yv.call(this,vy({},{style:Gv},t=void 0===t?{}:t))||this}function Xv(t,e,n){var r,i,a,o,s,l,c,u,t=t.select(Xm.mainGroup.class);return t=t,e=e,i=void 0===(i=(n=n).titlePosition)?"lb":i,a=void 0===(a=n.titleSpacing)?0:a,o=qv(i),s=(l=t.node().getBBox()).x,l=l.y,c=(t=w(t.node().getBounds().halfExtents,2))[0],t=t[1],u=(e=w(e.node().getBounds().halfExtents,2))[0],e=e[1],s=w([s+c,l+t],2),s=(l=w([s[0],s[1]],2))[0],l=l[1],["start","end"].includes(i)&&"linear"===n.type?(r=n.startPos,n=n.endPos,n=(i=w("start"===i?[r,n]:[n,r],2))[0],r=(i=w(ue([0,0],he([0,0],[-(r=i[1])[0]+n[0],-r[1]+n[1]]),a),2))[0],i=i[1],{x:n[0]+r,y:n[1]+i}):(o.includes("l")&&(s-=c+u+a),o.includes("r")&&(s+=c+u+a),o.includes("t")&&(l-=t+e+a),o.includes("b")&&(l+=t+e+a),{x:s,y:l})}function Kv(t,s,l,c,e){var u,f,n,r;return l.title?(t=w((t=t,n=(r=l).title,r=t.maybeAppendByClassName(Xm.title,function(){return Ey(n)}),[t,r]),2),u=t[0],f=t[1],r=function(){var t=f,e=u,n=s,r=l,i=(a=w(ly(a=c),2))[0],a=a[1],o=void 0===(o=a.transform)?"":o,a=J(a,["transform"]);t.styles(i),e.styles(a),a=(i=Xv(n,e,r)).x,n=i.y,e.node().setPosition(a,n),Py(t,o)},e.update?((t=f.node().animate([],e.update))?(t.onframe=r,t.onfinish=r):r(),t):(r(),null)):null}i(Jv,Zv=c),Jv.prototype.render=function(e,n,t){var r=ey(e),i=r.type,a=r.data,o=(r.class,r.dataThreshold),o=void 0===o?100:o,s=(r.crossSize,r.animate),l=(r.title,r.showTitle),c=(r.titleSpacing,r.truncRange),u=(r.truncShape,r.showLine),f=(r.lineExtension,r.lineArrow,r.lineArrowOffset,r.lineArrowSize,r.showTick),h=(r.tickDirection,r.tickLength,r.tickFilter,r.tickFormatter,r.showLabel),d=(r.labelAlign,r.labelDirection,r.labelSpacing,r.labelFilter,r.labelFormatter,r.labelTransforms,r.showGrid),r=(r.gridFilter,r.gridLength,J(r,["type","data","class","dataThreshold","crossSize","animate","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),i=w(oy("linear"===i?(r.startPos,r.endPos,J(r,["startPos","endPos"])):(r.angleRange,r.radius,r.center,J(r,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),p=i[0],g=i[1],y=i[2],m=i[3],v=i[4],b=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(a,o).filter(function(t){t=t.value;return!(c&&t>c[0]&&t<c[1])}),x=(r=void 0===t?s:t)?"enter"in r||"update"in r||"exit"in r?r:{enter:r,update:r,exit:r}:{enter:!1,update:!1,exit:!1},i=(Ny(d,_(n).maybeAppendByClassName(Xm.gridGroup,"g"),function(t){return xv(t,b,e,v,x)}),_(n).maybeAppendByClassName(Xm.mainGroup,"g")),a=Ny(u,i.maybeAppendByClassName(Xm.lineGroup,"g"),function(t){return mv(t,e,g,x)})||[],o=Ny(f,i.maybeAppendByClassName(Xm.tickGroup,"g"),function(t){return t=t,r=y,i=x,a=av(b,(n=e).tickFilter),t.selectAll(Xm.tick.class).data(a,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",Xm.tick.name).transition(function(t,e){return Wv.call(this,t,e,a,n,r,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),Wv.call(this,t,e,a,n,r,i.update)})},function(t){return t.transition(function(){var t=this,e=Ym(this,i.exit);return $m(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],s=Ny(h,i.maybeAppendByClassName(Xm.labelGroup,"g"),function(t){return Rv(t,b,e,m,x)})||[],t=Ny(l,_(n).maybeAppendByClassName(Xm.titleGroup,"g"),function(t){return Kv(t,_(n),e,p,x)});return O(O(O(O([],w(a),!1),w(o),!1),w(s),!1),[t],!1).filter(function(t){return!!t})};var Zv,Qv=Jv;function Jv(t){return Zv.call(this,vy({},Um,t))||this}var tb,eb={effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(ka=0)-(ds=6),(gs=0)-ds],["L",ka+ds,gs],["L",ka-ds,gs+ds],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},nb=Ry({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),rb=(i(ib,tb=c),Object.defineProperty(ib.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return tn(void 0===t?0:t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(ib.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(ib.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(ib.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=w((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,O([],w(t),!1))})),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),ib.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(ib.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(ib.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Object.defineProperty(ib.prototype,"finished",{get:function(){var t,e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),ib.prototype.getBBox=function(){var t=tb.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new zy(e,t,i+n.width,r)},ib.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,t=t.effect,i=this.currPage,a=this.playState,o=(this.finished,this.playWindow),s=this.pageViews;return"idle"!==a||e<0||s.length<=0||e>=s.length||(s[i].setLocalPosition(0,0),this.prepareFollowingPage(e),a={duration:r,easing:t,fill:"both"},i=(s=w(this.getFollowingPageDiff(e),2))[0],r=s[1],this.playState="running",Promise.all([o.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-i,", ").concat(-r,")")}],a)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n.innerCurrPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:this.finished}},ib.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?{finished:this.finished}:(t=t?(n-1+e)%e:tn(n-1,0,e),this.goTo(t))},ib.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?{finished:this.finished}:(t=t?(n+1)%e:tn(n+1,0,e),this.goTo(t))},ib.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;this.clipPath=t.maybeAppendByClassName(nb.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())},ib.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},ib.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,w("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=w(i.offset,3),o=w(a[0],2),s=o[0],c=o[1],l=w(a[1],2),r=l[0],o=l[1],l=w(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},ib.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(nb.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},ib.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orient,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},ib.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=w(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},ib.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(nb.controller,"g").style("visibility",u?"visible":"hidden");u&&(i=(u=w(oy(this.attributes,["button","pageNum"]),2))[0],u=u[1],r=(i=w(ly(i),2))[0],i=i[1],e=r.size,n=J(r,["size"]),r=t.maybeAppendByClassName(nb.prevBtnGroup,"g").styles(i),this.prevBtnGroup=r.node(),a=r.maybeAppendByClassName(nb.prevBtn,"path"),i=t.maybeAppendByClassName(nb.nextBtnGroup,"g").styles(i),this.nextBtnGroup=i.node(),[a,i.maybeAppendByClassName(nb.nextBtn,"path")].forEach(function(t){t.styles(v(v({},n),{transformOrigin:"center"})),Vy(t.node(),e,!0)}),a=t.maybeAppendByClassName(nb.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(nb.pageInfo,"text").styles(v(v({},ny),u)),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),r.on("click",function(){o.prev()}),i.on("click",function(){o.next()}))},ib.prototype.render=function(t,e){e=_(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},ib.prototype.bindEvents=function(){function t(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}var r,i,a,o,e=this;r=function(){return e.render(e.attributes,e)},i=50;this.playWindow.addEventListener(N.ElementEvent.INSERTED,t),this.playWindow.addEventListener(N.ElementEvent.REMOVED,t)},ib);function ib(t){t=tb.call(this,vy({},{style:eb},t))||this;return t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t.contentGroup=t.appendChild(new N.Group({class:nb.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new N.Group({class:nb.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function ab(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}am.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),am.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),am.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var ob,sb=Ry({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),lb={span:[1,1],marker:function(){return new N.Circle({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},cb=(i(ub,ob=c),Object.defineProperty(ub.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(Je(t)||en(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(ub.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,n=void 0===n?0:n,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height;return{markerWidth:n,labelWidth:r,valueWidth:i,height:Math.max(n,t,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(ub.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=w(Jg(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(ub.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=w(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=w(this.span,2),a=(e=w([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(ub.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=w(Jg(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(ub.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=w(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),ub.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=ay(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(sb.markerGroup,"g"),Ny(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(sb.marker,r).styles(a),Vy(e.markerGroup.node(),i,!0)})},ub.prototype.renderLabel=function(t){var e=this.attributes.label,n=ay(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(sb.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(sb.label,function(){return Ey(e)}).styles(n)},ub.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=ay(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(sb.valueGroup,"g"),Ny(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(sb.value,function(){return Ey(n)}).styles(r)})},ub.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=ay(this.attributes,"background");this.background=t.maybeAppendByClassName(sb.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(sb.background,"rect").styles(v({width:n,height:e},r))},ub.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=w(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),Dy(this.labelGroup.select(sb.label.class),e),this.showValue&&(this.valueGroup.styles({x:t,y:r}),Dy(this.valueGroup.select(sb.value.class),n))},ub.prototype.render=function(t,e){e=_(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},ub);function ub(t){return ob.call(this,vy({},{style:lb},t))||this}function fb(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var hb,db=Ry({page:"item-page",navigator:"navigator",item:"item"},"items"),pb={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:yn,mouseenter:yn,mouseleave:yn},gb=(i(yb,hb=c),Object.defineProperty(yb.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(yb.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(yb.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,s=ay(this.attributes,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:v({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=w(t,2);return[t[0],jy(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),yb.prototype.getGridLayout=function(){var u=this,t=this.attributes,f=t.orient,h=t.width,d=t.rowPadding,p=t.colPadding,g=w(this.navigatorShape,1)[0],t=w(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),w(a,2)),o=a[0],a=a[1],s=(h-g-(m-1)*p)/m,t=t.getBBox().height,l=w([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=w([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=w([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},yb.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=w(this.navigatorShape,1)[0],r=w(this.grid,2),s=r[0],l=r[1],r=w([e-t,n],2),c=r[0],u=r[1],e=w([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&fb(g,function(t){return t<l})?(r=w([m+r,v,i],3),f=r[0],h=r[1],m=r[2]):(i=w([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&fb(y,function(t){return t<s})?(r=w([m,v,n],3),f=r[0],h=r[1],m=r[2]):(i=w([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(yb.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),yb.prototype.ifHorizontal=function(t,e){return ab(this.attributes.orient,t,e)},yb.prototype.flattenPage=function(e){e.querySelectorAll(db.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(db.page.class).forEach(function(t){e.removeChild(t).destroy()})},yb.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));_(t).selectAll(db.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new cb({style:t})}).attr("className",db.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("mouseenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("mouseleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},yb.prototype.relayoutNavigator=function(){var t=this.attributes,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=w(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update(v({},"grid"===e?{pageWidth:t-i,pageHeight:n-r}:{}))},yb.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=w(t,2);return{page:t[0],layouts:t[1]}}),u=O([],w(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new N.Group({className:db.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=Je(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?($e(r[t])||(r[t]=en(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},yb.prototype.renderNavigator=function(t){var e=this.attributes.orient,n=ay(this.attributes,"nav"),n=v(v({},n),{orient:e});return this.navigator=t.maybeAppendByClassName(db.navigator,function(){return new rb({})}).update(n).node(),this.navigator},yb.prototype.getBBox=function(){return this.navigator.getBBox()},yb.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(_(e)),this.renderItems(n.getContainer()),this.adjustLayout())},yb.prototype.dispatchCustomEvent=function(t,e){t=new N.CustomEvent(t,{detail:e});this.dispatchEvent(t)},yb);function yb(t){t=hb.call(this,vy({},{style:pb},t))||this;return t.navigatorShape=[0,0],t}var mb,vb=Ry({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),bb=v(v({},sy(ny,"label")),{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}),xb=(i(wb,mb=c),wb.prototype.render=function(t,e){var n=_(e).maybeAppendByClassName(vb.markerGroup,"g"),n=(this.renderMarker(n),_(e).maybeAppendByClassName(vb.labelGroup,"g"));this.renderLabel(n)},wb.prototype.attributeChangedCallback=function(){this.render(this.attributes,this)},wb.prototype.renderMarker=function(t){var n=this,e=this.attributes,r=e.orient,e=e.markerSymbol,i=void 0===e?ab(r,"horizontalHandle","verticalHandle"):e;Ny(!!i,t,function(t){var e=ay(n.attributes,"marker"),e=v({symbol:i},e);n.marker=t.maybeAppendByClassName(vb.marker,function(){return new am({})}).update(e)})},wb.prototype.renderLabel=function(t){var s=this,e=this.attributes,l=e.orient,n=e.spacing,c=void 0===n?0:n,n=e.showLabel,u=e.formatter;Ny(n,t,function(t){var e=ay(s.attributes,"label"),n=e.text,e=J(e,["text"]),r=(null==(r=t.select(vb.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=w(ab(l,[0,(void 0===r?0:r)+c,"center","top"],[(void 0===i?0:i)+c,0,"start","middle"]),4),i=r[0],a=r[1],o=r[2],r=r[3];t.maybeAppendByClassName(vb.label,"text").styles(v(v({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},wb);function wb(t){return mb.call(this,vy({},{style:bb},t))||this}var Ob,xs={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},Mb=mn({},xs,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),kb=mn({},xs,sy(bb,"handle"),{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,labelAlign:"value",labelDirection:"positive",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),_b=Ry({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),Sb=(i(Eb,Ob=c),Eb.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=w(ly(ay(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(_b.titleGroup,"g").styles(a),v(v({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(_b.title,function(){return new $v({style:s})}).update(s)},Eb.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=w(oy(this.attributes,["title"]),2),a=w(ly(a[1]),2),o=a[0],a=a[1],o=v(v({},o),{width:i,height:e});this.itemsGroup=t.maybeAppendByClassName(_b.itemsGroup,"g").styles(v({x:n,y:r},a)),this.items=this.itemsGroup.maybeAppendByClassName(_b.items,function(){return new gb({style:{data:[]}})}),this.items.node().update(o)},Eb.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.title.node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Eb.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new zy(0,0,n,t)},enumerable:!1,configurable:!0}),Eb.prototype.getBBox=function(){return t=this.title.node(),e=this.items.node(),n=(i=t.attributes).position,r=i.spacing,i=i.inset,a=t.getBBox(),o=e.getBBox(),n=qv(n),r=(t=w(Jg(t.attributes.text?r:0),4))[0],s=t[1],l=t[2],t=t[3],c=(i=w(Jg(i),4))[0],u=i[1],f=i[2],i=i[3],s=(t=w([t+s,r+l],2))[0],r=t[1],t=(l=w([i+u,c+f],2))[0],i=l[1],"l"===n[0]?new zy(a.x,a.y,o.width+a.width+s+t,Math.max(o.height+i,a.height)):"t"===n[0]?new zy(a.x,a.y,Math.max(o.width+t,a.width),o.height+a.height+r+i):(c=(u=w([e.attributes.width||o.width,e.attributes.height||o.height],2))[0],f=u[1],new zy(o.x,o.y,c+a.width+s+t,f+a.height+r+i));var t,e,n,r,i,a,o,s,l,c,u,f},Eb.prototype.render=function(t,e){var n=t.width,t=t.height,e=_(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},Eb);function Eb(t){return Ob.call(this,vy({},Mb,t))||this}var Ab,Lb={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},Tb=Ry({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Pb=(i(Cb,Ab=c),Cb.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.style).position,o=(i=w(Jg(i.padding),4))[0],e=i[1],n=i[2],i=i[3],a=(r=this.label.node().getLocalBounds()).min,r=r.max,i=[[a[0]-i,a[1]-o],[r[0]+e,r[1]+n]],a=this.getPath(t,i),o=ay(this.attributes,"background"),this.background=_(this.group).maybeAppendByClassName(Tb.background,"path").styles(v(v({},o),{path:a})),this.group.appendChild(this.label.node()))},Cb.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=w(ly(ay(this.attributes,"label")),2),r=t[0],t=t[1];this.label=_(this.group).maybeAppendByClassName(Tb.labelGroup,"g").styles(t),e&&this.label.maybeAppendByClassName(Tb.label,function(){return Ey(n(e))}).style("text",n(e).toString()).selectAll("text").styles(v(v({},ny),r))},Cb.prototype.adjustLayout=function(){var t=w(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},Cb.prototype.getPath=function(n,t){var r=this,t=w(t,2),e=w(t[0],2),i=e[0],e=e[1],t=w(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=w(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[O(["M"],w(t[0]),!1),O(["L"],w(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},Cb.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=w(t,2))[0],t=t[1],r=(e=w(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,O([],w(t),!1)),t=w(t,2),r=w(t[0],2),i=r[0],r=r[1],t=w(t[1],2),a=t[0],t=t[1],a=w(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=w(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=w([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},Cb.prototype.bindEvents=function(){this.label.on(N.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},Cb.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},Cb);function Cb(t){t=Ab.call(this,vy({},{style:v({visibility:"hidden"},Lb)},t))||this;return t.point=[0,0],t.group=t.appendChild(new N.Group({})),t.isMutationObserved=!0,t}function jb(t,e){var t=w(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var Nb=Ry({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Bb(t){var e=t.orient,n=t.size,t=t.len;return ab(e,[t,n],[n,t])}function Fb(t){var e=t.type,t=w(Bb(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function Rb(t){var i,a,o,e=t.orient,r=t.color,n=t.block,t=t.partition,s=(l=He(r)?new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))}):r).length,l=l.map(function(t){return N.parseColor(t).toString()});return s?1===s?l[0]:n?(i=t,n=e,a=Array.from(l),o=i.length,new Array(o).fill(0).reduce(function(t,e,n){var r=a[n%a.length];return t+" ".concat(i[n],":").concat(r).concat(n<o-1?" ".concat(i[n+1],":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):l.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(ab(e,"0","270"),")")):""}function Ib(t,e,n){var r,i,a,o=Rb(e),t=t.maybeAppendByClassName(Nb.selection,"path").styles(v({path:Fb(e),fill:o},n)),n=t.maybeAppendByClassName(Nb.clipPath,"path").styles({path:(n=(o=e).orient,(e=o.range)?(i=(o=w(Bb(o),2))[0],o=o[1],r=(e=w(e,2))[0],e=e[1],a=ab(n,r*i,0),r=ab(n,0,r*o),i=ab(n,e*i,i),[["M",a,r],["L",a,a=ab(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var Db,zb,Wb,Gb,Hb=Fy({render:function(t,e){var n,r=w(oy(t,["selection","track"]),2),i=r[0],r=r[1],a=_(e).maybeAppendByClassName(Nb.trackGroup,"g");n=t,r=r,a.maybeAppendByClassName(Nb.track,"path").styles(v({path:Fb(n)},r)),Ib(_(e).maybeAppendByClassName(Nb.selectionGroup,"g"),t,i)}},v({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})),qb=hn(function(t){return{min:Math.min.apply(Math,O([],w(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,O([],w(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),Vb=(i(h,Db=c),Object.defineProperty(h.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),h.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new zy(0,0,e,t)},h.prototype.render=function(t,e){var n=this,r=(this.renderTitle(_(e)),this.title.node().getAvailableSpace()),i=r.x,r=r.y,t=t.showLabel,e=_(e).maybeAppendByClassName(_b.contentGroup,"g").styles({x:i,y:r}),i=(Ny(!!t,e.maybeAppendByClassName(_b.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(_b.ribbonGroup,"g"));this.handlesGroup=e.maybeAppendByClassName(_b.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(h.prototype,"range",{get:function(){var t=this.attributes.data;return qb(t)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonRange",{get:function(){var t=w(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=w(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),h.prototype.ifHorizontal=function(t,e){return ab(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},h.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,r=void 0===r?"":r,i=e.width,e=e.height,a=ay(this.attributes,"title"),o=v(v({width:i,height:e},a),{text:n?r:""});this.title=t.maybeAppendByClassName(_b.title,function(){return new $v({style:o})}).update(o)},Object.defineProperty(h.prototype,"labelFixedSpacing",{get:function(){return this.attributes.labelShowTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][t]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(Xm.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new zy(0,0,t,e)),this.cacheLabelBBox):new zy(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelShape",{get:function(){var t,e=this.attributes,n=e.showLabel,e=e.labelSpacing,e=void 0===e?0:e;return n?{width:t=(n=this.labelBBox).width,height:n=n.height,size:this.ifHorizontal(n,t)+e+this.labelFixedSpacing,len:this.ifHorizontal(t,n)}:{width:0,height:0,size:0,len:0}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.title.node().getAvailableSpace(),n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.len,n=w(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,len:0},a=t.size,t=t.len,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=w(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=w(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new zy(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,t=t.height;return this.ifHorizontal({size:t,len:e},{size:e,len:t})},enumerable:!1,configurable:!0}),h.prototype.renderRibbon=function(t){var e=this.attributes,n=e.type,r=e.orient,i=e.color,a=e.block,e=e.data,o=ay(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,f=this.ribbonShape,h=f.len,f=f.size;this.ribbon=t.maybeAppendByClassName(_b.ribbon,function(){return new Hb({})}).update(v({x:u,y:s,len:h,size:f,type:n,orient:r,color:i,block:a,partition:e.map(function(t){return(t.value-l)/(c-l)}),range:this.ribbonRange},o))},h.prototype.getHandleClassName=function(t){return"".concat(_b.prefix("".concat(t,"-handle")))},h.prototype.renderHandles=function(){var e=this,t=this.attributes,n=t.showHandle,t=t.orient,r=ay(this.attributes,"handle"),r=(r.formatter,J(r,["formatter"])),i=w(this.selection,2),a=i[0],i=i[1],o=v({orient:t},r),s=this;this.handlesGroup.selectAll(_b.handle.class).data(n?[{value:a,type:"start"},{value:i,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new xb({})}).attr("className",function(t){return"".concat(_b.handle," ").concat(e.getHandleClassName(t.type))}).styles(o).style("labelText",function(t){return t.value}).each(function(t){var e=_(this);"start"===t.type?s.startHandle=e:s.endHandle=e})},function(t){return t.styles(o).style("labelText",function(t){return t.value})},function(t){return t.remove()})},h.prototype.adjustHandles=function(){var t=w(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(h.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new zy(0,0,0,0);var t=this.startHandle.node().getBBox(),e=t.width,t=t.height,n=this.endHandle.node().getBBox(),r=n.width,n=n.height,e=w([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new zy(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=w(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],len:n[1]}},enumerable:!1,configurable:!0}),h.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,r=r.y,a=this.ribbonShape.size,e=this.getOffset(e),i=w(this.ifHorizontal([i+e,r+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,r+e]),2),a=i[0],r=i[1],e=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null!=e&&e.attr("formatter",n),null!=e&&e.setLocalPosition(a,r)},h.prototype.renderIndicator=function(t){var e=ay(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(_b.indicator,function(){return new Pb({style:e})}).update(e)},Object.defineProperty(h.prototype,"labelData",{get:function(){var s=this;return this.attributes.data.reduce(function(t,e,n,r){var i,a,o=null!=(o=null==e?void 0:e.id)?o:n.toString();return t.push(v(v({},e),{id:o,index:n,type:"value",label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:s.ribbonScale.map(e.value)})),n<r.length-1&&(i=r[n+1],a=((i=(r=w([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(v(v({},e),{id:o,index:n,type:"range",range:[i,r],label:[i,r].join("~"),value:s.ribbonScale.map(a)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"labelStyle",{get:function(){var t=w(["center","middle"],2),e=t[0],t=t[1],n=this.labelPosition;return"top"===n?t="bottom":"bottom"===n?t="top":"left"===n?e="end":"right"===n&&(e="start"),{labelTextAlign:e,labelTextBaseline:t}},enumerable:!1,configurable:!0}),h.prototype.renderLabel=function(t){var e=ay(this.attributes,"label"),n=e.formatter,r=e.filtrate,i=(e.filter,e.align),a=e.labelDirection,o=(e.tickLength,e.showTick),o=void 0!==o&&o,e=w(oy(J(e,["formatter","filtrate","filter","align","labelDirection","tickLength","showTick"]),["tick"]),2),s=e[0],e=e[1],o=v(v(v({type:"linear",startPos:[0,0],endPos:[0,0],data:this.labelData,showLine:!1,showGrid:!1,showTick:o,tickDirection:a,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(s).map(function(t){var t=w(t,2),e=t[0],t=t[1];return["tick".concat(Iy(e)),t]}))),Object.fromEntries(Object.entries(e).map(function(t){var t=w(t,2),e=t[0],t=t[1];return["label".concat(Iy(e)),t]}))),a={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===i&&(!r||r(t,t.index,n.filter(function(t){return t.type===i})))},labelFormatter:n},l=v(v({},o),a);this.label=t.maybeAppendByClassName(_b.label,function(){return new Qv({style:l})}).node(),this.label.update(l,!1)},Object.defineProperty(h.prototype,"labelAxisCfg",{get:function(){var t=this.attributes,e=t.labelDirection,n=t.labelShowTick,t=t.labelSpacing,r=this.ribbonShape.size,i=this.labelPosition,a=this.labelFixedSpacing,o=w([0,0,0],3),s=o[0],l=o[1],o=o[2],c=r+t;return n?(o=c,l=a,"positive"===e?"right"===i?o=s=c:"bottom"===i&&(s=o):"negative"!==e||"top"!==i&&"left"!==i||(s=r)):"positive"===e?"right"===i?l=c:"bottom"===i&&(s=r+a,l=t):"negative"!==e||"left"!==i&&"top"!==i||(l=t),{offset:s,spacing:l,tickLength:o}},enumerable:!1,configurable:!0}),h.prototype.adjustLabel=function(){var t,e,n,r,i,a,o;this.attributes.showLabel&&(o=(a=this.ribbonBBox).x,t=a.y,i=a.width,a=a.height,e=(r=this.labelAxisCfg).offset,n=r.spacing,r=r.tickLength,a=(i=w(this.ifHorizontal([[o,t+e],[o+i,t+e]],[[o+e,t+a],[o+e,t]]),2))[0],o=i[1],this.label.update({startPos:a,endPos:o,tickLength:r,labelSpacing:n},!1))},h.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},h.prototype.showIndicator=function(t,e){var n,r,i,a;void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t?(i=(a=this.range).min,a=a.max,n=(r=this.ribbonBBox).x,r=r.y,t=tn(t,i,a),i=this.getOffset(t),a=this.ifHorizontal([i+n,r],[n,i+r]),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(t=this.indicator.node()).setLocalPosition.apply(t,O([],w(a),!1))):this.hideIndicator()},h.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},h.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},h.prototype.setSelection=function(t,e){this.updateSelection(t,e)},h.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=w(this.selection,2),c=l[0],l=l[1],t=w([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=w((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=w(n,2))[0],n=n[1],a=(c=w(c,2))[0],c=c[1],o=(l=w(l,2))[0],l=l[1],c=(a=w([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=w([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Qg(c,r),Qg(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(h.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return on(t)?Qg(.01*(e-n),0):t},enumerable:!1,configurable:!0}),h.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?jb(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},h.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=w(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,O([],w(cy(t)),!1));return tn(this.getOffset(i-a,!0),r,n)},h.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.ribbonShape.len,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},h.prototype.dispatchSelection=function(){var t=new N.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},h.prototype.dispatchIndicated=function(t,e){t=new N.CustomEvent("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([ky(100)],h.prototype,"dispatchSelection",null),t([ky(100)],h.prototype,"dispatchIndicated",null),h);function h(t){var a=Db.call(this,vy({},kb,t))||this;return a.eventToOffsetScale=new t0({}),a.innerRibbonScale=new t0({}),a.cacheLabelBBox=null,a.cacheHandleBBox=null,a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=jb(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),w(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function Yb(t){zb||(zb=document.createElement("table"),Gb=document.createElement("tr"),Wb=/^\s*<(\w+|!)[^>]*>/,Gb={tr:document.createElement("tbody"),tbody:zb,thead:zb,tfoot:zb,td:Gb,th:Gb,"*":document.createElement("div")});var e=Wb.test(t)&&RegExp.$1,e=(e&&e in Gb||(e="*"),Gb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var $b,as="tooltip",Ub="tooltip-title",Xb="tooltip-list",us="tooltip-list-item",Sa="tooltip-list-item-name",ss="tooltip-list-item-marker",Kb="tooltip-list-item-name-label",ls="tooltip-list-item-value",oc="tooltip-crosshair-x",r="tooltip-crosshair-y",la={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},e=((o={})[".".concat(as)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},o[".".concat(Ub)]={color:"rgba(0, 0, 0, 0.45)"},o[".".concat(Xb)]={margin:"0px","list-style-type":"none",padding:"0px"},o[".".concat(us)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},o[".".concat(ss)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},o[".".concat(Sa)]={display:"flex","align-items":"center","max-width":"216px"},o[".".concat(Kb)]=v({flex:1},la),o[".".concat(ls)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},la),o[".".concat(oc)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},o[".".concat(r)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},o),Zb=(i(Qb,$b=c),Object.defineProperty(Qb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Qb.prototype.getContainer=function(){return this.element},Object.defineProperty(Qb.prototype,"position",{set:function(t){var t=w(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Qb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Qb.prototype,"items",{get:function(){return this.attributes.items.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=J(t,["name","value","color","index"]);return v({name:n,value:r,color:i,index:null!=a?a:e},t)})},enumerable:!1,configurable:!0}),Object.defineProperty(Qb.prototype,"HTMLTooltipItemsElements",{get:function(){var r=this.attributes.template,i=[];return this.items.forEach(function(t){var e,n;i.push(Yb((e=r.item,n=t,e&&n?e.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):e)))}),i},enumerable:!1,configurable:!0}),Object.defineProperty(Qb.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return Je(t)?my(t):sn(t)?t:void 0},enumerable:!1,configurable:!0}),Qb.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},Qb.prototype.update=function(t){this.attr(mn({},this.attributes,t)),this.render(this.attributes,this)},Qb.prototype.clear=function(){this.element.innerHTML=""},Qb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},Qb.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},Qb.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},Qb.prototype.initShape=function(){var t=this.attributes.template;this.element=Yb(t.container),this.id&&this.element.setAttribute("id",this.id)},Qb.prototype.renderHTMLTooltipElement=function(){var e,r,t=this.attributes,n=t.title,t=t.enterable,i=this.element,a=this.customContent,a=(this.element.style.pointerEvents=t?"auto":"none",this.clear(),a?i.appendChild(a):(t=this.attributes.template,n?(i.innerHTML=t.title,i.getElementsByClassName(Ub)[0].innerHTML=n):null!=(t=null==(a=i.getElementsByClassName(Ub))?void 0:a[0])&&t.remove(),n=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=Xb,n.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=i,Object.entries(a).forEach(function(t){var t=w(t,2),e=t[0],n=t[1];O([r],w(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},Qb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,o=t.width,s=t.height,l=[-o/2,-s/2];return e.forEach(function(t){var e=w(l,2),n=e[0],e=e[1],t=w(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},Qb.prototype.setOffsetPosition=function(t){var t=w(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat((void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},Qb.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},Qb.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=w(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=w([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},Qb.tag="tooltip",Qb.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(as,'"></div>'),title:'<div class="'.concat(Ub,'"></div>'),item:'<li class="'.concat(us,'" data-index={index}>\n <span class="').concat(Sa,'">\n <span class="').concat(ss,'" style="background:{color}"></span>\n <span class="').concat(Kb,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(ls,'" title="{value}">{value}</span>\n </li>')},style:e}},t([ky(100)],Qb.prototype,"updatePosition",null),Qb);function Qb(t){t=$b.call(this,mn({},Qb.defaultOptions,t))||this;return t.visibility="visible",t.initShape(),t.render(t.attributes,t),t}var Jb,t2={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function e2(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function n2(t){return Jb.call(this,mn({},n2.defaultOptions,t))||this}i(n2,Jb=c),n2.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=_(e).maybeAppendByClassName("switch-content","g").node(),l=e.getLocalBounds(),n=bn(t2,n,t2.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&_(e).maybeAppendByClassName("switch-tag",function(){return new lm({})}).call(function(t){var e,t=t.node(),n=(t.update(mn({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),_(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:f,fillOpacity:r?.4:1},h)).node()),g=_(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},h)).node();_(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:f}).call(function(t){var e,t=t.node(),n=e2(p,a,o),r=e2(p,a,!o);t.attr("x")&&!vn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},n2.tag="switch",n2.defaultOptions={style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var r2,i2,a2,o2,n={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},os=vy({},n,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),aa=vy({},n,{type:"circle",defaultRadius:0}),cs=vy({},n,{type:"polygon",defaultRadius:0,startAngle:0}),ca=(i(s2,r2=c),Object.defineProperty(s2.prototype,"localPointer",{get:function(){var t=w(this.getPosition(),2),e=t[0],t=t[1],n=w(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"tagCfg",{get:function(){var t=ay(this.attributes,"tag");return t.position,J(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(s2.prototype,"crosshairCfg",{get:function(){var t=ay(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),s2.prototype.render=function(t,e){var n=this,e=_(e).maybeAppendByClassName(".crosshair-group","g").node();this.shapesGroup=e,this.tagShape=_(e).maybeAppend(".crosshair-tag",function(){return new lm({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=_(e).maybeAppendByClassName(".crosshair-path","path").node().attr(this.crosshairCfg),this.adjustLayout()},s2.prototype.update=function(t){this.attr(mn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},s2.prototype.setPointer=function(t){this.pointer=t},s2.tag="crosshair-base",s2.defaultOptions={style:n},s2);function s2(t){return r2.call(this,mn({},s2.defaultOptions,t))||this}function l2(t){return i2.call(this,vy({},l2.defaultOptions,t))||this}function c2(t){return a2.call(this,vy({},c2.defaultOptions,t))||this}function u2(t){return o2.call(this,vy({},u2.defaultOptions,t))||this}i(l2,i2=ca),Object.defineProperty(l2.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=w(this.getPosition(),2))[0],e=e[1],[(n=w(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"isVertical",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(l2.prototype,"tagShapeSpace",{get:function(){var t=py(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),l2.prototype.update=function(t){i2.prototype.update.call(this,t)},l2.prototype.setPointer=function(t){i2.prototype.setPointer.call(this,t),this.adjustPosition()},l2.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},l2.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},l2.prototype.adjustPosition=function(){var t=w(this.localPointer,2),e=t[0],t=t[1],n=w(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},l2.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=w(e.startPos,2),a=i[0],i=i[1],e=w(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=w(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},l2.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},l2.tag="line-crosshair",l2.defaultOptions={style:os},t([ky(20)],l2.prototype,"setPointer",null),i(c2,a2=ca),Object.defineProperty(c2.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),c2.prototype.update=function(t){a2.prototype.update.call(this,t)},c2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(a2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=w(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},c2.prototype.adjustLayout=function(){this.tagShape.hide()},c2.prototype.createCirclePath=function(t){var e=this.attributes,n=w(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return tm(r,n,t||e)},c2.tag="circle-crosshair",c2.defaultOptions={style:aa},t([ky(20)],c2.prototype,"setPointer",null),i(u2,o2=ca),Object.defineProperty(u2.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),u2.prototype.update=function(t){o2.prototype.update.call(this,t)},Object.defineProperty(u2.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),u2.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(o2.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=w(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=My(n,[t,e])/My(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},u2.prototype.adjustLayout=function(){this.tagShape.hide()},u2.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=w(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=w(t,2),t=w(ue([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},u2.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=w(t,2),c=t[0],u=t[1],f=this.points,t=w(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=w(f[p-1],2),y=g[0],g=g[1],m=w(f[p%f.length],2),v=m[0],m=m[1],y=(i=[h,d],y=[y+h,g+d],g=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=w(r=[c,u],2))[0],r=r[1],a=(i=w(i,2))[0],i=i[1],o=(y=w(y,2))[0],y=y[1],s=(g=w(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(wy(m,a,r,i,o,y)&&Oy(l,o,y),wy(m,a,r,i,s,g)&&Oy(l,s,g),wy(o,s,y,g,m,r)&&Oy(l,m,r),wy(o,s,y,g,a,i))&&Oy(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=w(y,2))[0],n=s[1])}return[e,n]},u2.tag="polygon-crosshair",u2.defaultOptions={style:cs},t([ky(20)],u2.prototype,"setPointer",null);i(p2,f2=N.DisplayObject),Object.defineProperty(p2.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Ye(t)?t.map(function(t){return Ye(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(p2.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=w(t,2),n=t[0],t=t[1];return"wavy"===t?v({path:r.getWavyPath(n)},i):"double"===t?v({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},v(v({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),p2.prototype.update=function(t){var e=this;this.attr(vy({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new N.Path({style:t}))})},p2.prototype.clear=function(){this.removeChildren()},p2.prototype.getLinePos=function(t){var e=w(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=w([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=w([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=w([0,a*r],2))[0],n):(s=(t=w([0,a*e+i/2],2))[0],t))[1];return[s,o]},p2.prototype.getLinePath=function(t){var e=this.attributes.width,t=w(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},p2.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=w(this.getLinePos(t),2),a=i[0],i=i[1],o=w([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=w([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=w([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=w([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},p2.prototype.getWavyPath=function(t){return[]},p2.tag="decoration",p2.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var f2,h2,d2=p2;function p2(t){t=f2.call(this,vy({},p2.defaultOptions,t))||this;return t.update({}),t}function g2(t){t=h2.call(this,vy({},g2.defaultOptions,t))||this;return t.init(),t}i(g2,h2=c),Object.defineProperty(g2.prototype,"textWidth",{get:function(){var e=this;return Ze(this.renderText.split("\n").map(function(t){return Xg(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"textHeight",{get:function(){return py(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"height",{get:function(){var t=this.attributes.height;return en(t)&&0!==t?t:py(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Zg(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Zg(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return Ug(t,en(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&en(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"font",{get:function(){return gn(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},ny),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return v({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return vy({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(g2.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),g2.prototype.init=function(){this.initShape(),this.update({})},g2.prototype.update=function(t){this.attr(vy({},this.attributes,t)),this.render()},g2.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new d2({style:t}))})},g2.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},g2.prototype.initShape=function(){this.backgroundShape=new N.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new N.Group({name:"decoration-group"}),this.textShape=new N.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},g2.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&en(n)&&"clip"===e&&(this.clipRect=new N.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},g2.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;en(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},g2.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},g2.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},g2.tag="paragraph",g2.defaultOptions={style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var y2,ua=v(v({},ny),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),m2={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},v2={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function b2(t){return y2.call(this,mn({},b2.defaultOptions,t))||this}i(b2,y2=c),b2.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,dy(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=cn({},this.checked?m2.selected:m2.default,r),r=cn({},v2,i),t=(this.checkboxBoxShape=dy(a,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(a.style.zIndex||0)-1},e)).node(),dy(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},r)),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;dy(a,".checkbox-label","text").styles(v({className:"checkbox-label",x:e,y:r},n))},b2.tag="checkbox",b2.defaultOptions={style:{x:0,y:0,label:v({text:""},ua),spacing:4,checked:!1}};var x2="gui-poptip",w2="gui-poptip-arrow",O2="gui-poptip-text",M2=((a={})[".".concat(x2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},a[".".concat(O2)]={"text-align":"center"},a[".".concat(x2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(x2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(x2,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(x2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(x2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(x2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(x2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(x2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(x2,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(x2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(x2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(x2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(w2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(x2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(w2)]={bottom:"-2px"},a[".".concat(x2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(w2)]={right:"-2px"},a[".".concat(x2,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(w2)]={left:"-2px"},a[".".concat(x2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(w2)]={top:"-2px"},a[".".concat(x2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(w2)]={left:"10px",bottom:"-2px"},a[".".concat(x2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(w2)]={right:"10px",bottom:"-2px"},a[".".concat(x2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(w2)]={right:"-2px",top:"8px"},a[".".concat(x2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(w2)]={right:"-2px",bottom:"8px"},a[".".concat(x2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(w2)]={left:"-2px",top:"8px"},a[".".concat(x2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(w2)]={left:"-2px",bottom:"8px"},a[".".concat(x2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(w2)]={top:"-2px",left:"8px"},a[".".concat(x2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(w2)]={top:"-2px",right:"8px"},a),k2=void 0;var _2;function S2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function E2(t){var n,r;return n=S2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(k2,t)}(t)}function A2(t){t=_2.call(this,mn({style:{id:"gui-poptip"}},A2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(A2,_2=c),Object.defineProperty(A2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),A2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},A2.prototype.update=function(t){this.attr(mn({},this.style,t)),this.render(this.attributes,this)},A2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=J(i,["html","target"]),n=cn({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=w(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},A2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=w(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},A2.prototype.clear=function(){this.container.innerHTML=""},A2.prototype.destroy=function(){var t,e=this;O([],w(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},A2.prototype.showTip=function(t,e,n){var r,i=bn(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(O2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},A2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},A2.prototype.getContainer=function(){return this.container},A2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(x2).concat(t?" ".concat(t):"")},A2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=E2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},A2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(w2,'"></span>'));t.innerHTML=n,Je(r)?t.innerHTML+=r:r&&sn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(O2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},A2.prototype.applyStyles=function(){var t,e=vy({},M2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},A2.prototype.setOffsetPosition=function(t,e,n){var n=w(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},A2.tag="poptip",A2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:M2,template:'<div class="'.concat(O2,'"></div>')}};i(T2,L2=N.Group),Object.defineProperty(T2.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=Jg(t)},enumerable:!1,configurable:!0}),Object.defineProperty(T2.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=Jg(t)},enumerable:!1,configurable:!0}),T2.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=w(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new zy(e-i,n-a,r+i+o,t+a+s)},T2.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,L2.prototype.appendChild.call(this,t,e),t},T2.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=w(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=w(this.$margin,4),s=o[0],o=o[3];return new zy(n+o,r+s,e-n-i,t-r-a)},T2.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:Hy,grid:qy})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},T2.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},T2.prototype.destroy=function(){this.removeAllEventListeners()},T2.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=e:"padding"===t&&(this.padding=e),this.layout()};var L2,ha=T2;function T2(t){var e=L2.call(this,t)||this,t=(e.layoutEvents=[N.ElementEvent.BOUNDS_CHANGED,N.ElementEvent.INSERTED,N.ElementEvent.REMOVED],e.$margin=Jg(0),e.$padding=Jg(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}function P2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return b1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=G1(l,t),t=G1(t,i),i=G1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),b1()(s)}const C2=pg(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=J(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=et(e,"background"),h=f["padding"],f=J(f,["padding"]),d=et(e,"connector"),{points:p=[]}=d,d=J(d,["points"]),i=[[+i,+a],[+n,+r]],a=nt(t).maybeAppend("text","text").call(A,e).node(),n=P2(nt(t).maybeAppend("background","rect").style("zIndex",-1).call(A,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(A,o?f:{}).node(),i,p,u),r=l&&new am({id:"startMarker",style:Object.assign({x:0,y:0},et(e,"startMarker"))}),a=c&&new am({id:"endMarker",style:Object.assign({x:0,y:0},et(e,"endMarker"))});nt(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(A,s?d:{})}),j2=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=J(ig(r,i,a,o),[]),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return nt(new C2).style("x",i).style("y",o).call(A,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(A,a).call(A,l).node()}};j2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const N2=pg(t=>{var e=J(t.attributes,["class","x","y"]);const n=et(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(nt(t).maybeAppend("marker",()=>new am({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());nt(t).maybeAppend("text","text").style("x",i).style("y",a).call(A,e)}),B2=t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return nt(new N2).call(A,a).style("x",r).style("y",o).call(A,e).call(A,s).node()}},F2=(B2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},pg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;nt(t).maybeAppend("connect-path",()=>new N.Path({})).style("d",n).call(A,i),nt(t).maybeAppend("area-path",()=>new N.Path({})).style("d",e).call(A,r)}));const R2=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:h=!1}=t,d=J(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=ig(n,r,i,a),r=n["defaultColor"],i=J(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=og(c,e),n=l&&n?eg(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=et(s,"connect"),i=!!o.length,n=t=>nt(new N.Path({})).style("d",t).call(A,s).node();return vu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=x1().curve(w1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,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 k1(a())},delete t.lineX0,t.lineEndAngle=function(){return k1(o())},delete t.lineX1,t.lineInnerRadius=function(){return k1(s())},delete t.lineY0,t.lineOuterRadius=function(){return k1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(M1(t)):e()._curve},t.angle((t,e)=>q1(W1(r[e],n))).outerRadius((t,e)=>G1(r[e],n)).innerRadius((t,e)=>G1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):nt(new F2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return(mu(c)?x1().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(f)):x1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f))).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):nt(new F2).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},I2=(R2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=vu(n)?B1:y1;return R2(Object.assign({curve:i},a))(t,e,n,r)}),D2=(I2.props=Object.assign({},R2.props),t=>{const{alpha:a=.5}=t,o=J(t,["alpha"]);return(t,e,n,r)=>{var i=vu(n)?j1:P1;return R2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),z2=(D2.props=Object.assign({},R2.props),i=>(t,e,n,r)=>R2(Object.assign({curve:R1},i))(t,e,n,r)),W2=(z2.props=Object.assign({},R2.props),i=>(t,e,n,r)=>R2(Object.assign({curve:I1},i))(t,e,n,r)),G2=(W2.props=Object.assign({},R2.props),i=>(t,e,n,r)=>R2(Object.assign({curve:D1},i))(t,e,n,r)),H2=(G2.props=Object.assign({},R2.props),t=>{const l=t["arrowSize"],c=J(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=ig(r,a,o,s),a=r["defaultColor"],o=J(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=a1();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=J1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),nt(new N.Path).call(A,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(A,c).node()}}),q2=(H2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=a1();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),nt(new N.Path).call(A,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(A,s).node()}});q2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const V2=t=>{const{cornerRatio:u=1/3}=t,f=J(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=ig(r,o,s,l),o=r["defaultColor"],s=J(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=a1(),vu(o)?(i=G1(t,c=o.getCenter()),i=(G1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),tg(a,t,e,c,i)):mu(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return nt(new N.Path).call(A,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(A,f).node()}},Y2=(V2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=a1();return t.moveTo(e[0],e[1]),vu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):tg(t,e,i,$1(e,i),G1(e,i)/2),nt(new N.Path).call(A,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(A,s).node()}}),$2=(Y2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),i=r["defaultColor"],a=J(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return nt(new N.Image).call(A,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(A,u).node()}});$2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const U2=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=ig(r,e,i,a),e=r["defaultColor"],i=J(r,["defaultColor"]),a=function(i,t){const a=a1();if(vu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>G1(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?tg(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return nt(new N.Path).call(A,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(A,l).node()}};U2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const X2=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=ig(r,e,i,a),e=r["defaultColor"],i=J(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=a1();return vu(e)?(n=G1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),tg(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),tg(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return nt(new N.Path).call(A,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(A,l).node()}};X2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const K2=t=>{const y=J(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=ig(r,e,f,h),{defaultColor:e,fill:f=e,stroke:h=e}=r,e=J(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=a1(),vu(t)?([i,a]=t=t.getCenter(),o=H1(W1(r[0],t)),s=H1(W1(r[1],t)),g=G1(t,r[2]),l=G1(t,r[3]),c=G1(t,r[8]),u=G1(t,r[10]),t=G1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return nt(new N.Path).call(A,e).style("d",g.toString()).style("stroke",h).style("fill",d||f).style("transform",p).call(A,y).node()}};K2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Z2=t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=J(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,vu(t=n)?(t=t.getCenter(),d1()({startAngle:0,endAngle:2*Math.PI,outerRadius:G1(a[0],t),innerRadius:G1(a[1],t)})):b1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,vu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return nt(new N.Path({})).call(A,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(A,s).node()}};function Q2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}Z2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const J2=pg(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=J(e,["points","class","endMarker","direction"]),i=et(e,"endMarker"),n=(n=n,b1().x(t=>t[0]).y(t=>t[1])(n));nt(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new am({className:"marker",style:Object.assign(Object.assign({},i),{symbol:Q2})}):null).call(A,e)});const tx=t=>{const{offset:s=0,connectLength1:l}=t,c=J(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=ig(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=J(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(mu(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return nt(new J2).call(A,o).style("points",n).style("stroke",r||i).style("transform",e).call(A,c).node()}};function ex(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=gf(a.x,c),i=gf(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function nx(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=rg(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=ix(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?rx(s,h,n):$1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function rx(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function ix(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function ax(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=rg(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:ix(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=rx(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function ox(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function sx(t,e,n,r){var i=n["bounds"];return 1===i.length?ox(0,0,n):(bu(r)?nx:Mu(r)?ax:ex)(t,e,n,r)}function lx(t,e,n){var{innerRadius:n,outerRadius:t}=rg(n,t,[e.y,e.y1]);return n+(t-n)}function cx(t,e,n){var{startAngle:n,endAngle:t}=rg(n,t,[e.y,e.y1]);return(n+t)/2}function ux(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,f=r.getCenter(),h=cx(e,n,r),d=0<Math.sin(h)?1:-1,i=ix(h,i,a),a={textAlign:0<d||bu(r)?"start":"end",textBaseline:"middle",rotate:i},i=lx(e,n,r),[[e,n],[r,f],[h,i]]=function(t,e,n,r,i){var[n,a]=rx(t,e,n),[t,r]=rx(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(f,h,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=h+l,c={connector:s,connectorPoints:[[r-o,f-i],[h-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:h+l,y:i},a),c)}tx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var fx=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=au(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=H1(W1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}},bottom:sx,bottomLeft:sx,bottomRight:sx,inside:sx,left:sx,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?ox(0,0,n):(bu(r)?nx:Mu(r)?ux:ex)(t,e,n,r)},right:sx,spider:function(t,e,n,r){var i,a,o,s,l,c;return Mu(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=J(ux(0,e,n,r),[]),s=r.getCenter(),l=lx(e,n,r),e=cx(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return Mu(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=J(ux(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(Mu(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=q1([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=rx(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:sx,topLeft:sx,topRight:sx});function hx(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:Mu(o)?"inside":mu(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=fx[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const dx=o=>(t,e,n,r)=>{var i=e["text"],a=J(e,["text","x","y"]),t=hx(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=J(t,["rotate","transform"]);return nt(new C2).call(A,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(A,a).node()},px=(dx.props={},t=>{const s=t["colorAttribute"],l=J(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=J(ig(r,i,a,o),["stroke"]),{d:i,color:a}=e;return nt(new N.Path).call(A,r).style("d",i).style(s,a).call(A,l).node()}}),gx=(px.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>px(Object.assign({colorAttribute:"fill"},t))),yx=(gx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>px(Object.assign({fill:"none",colorAttribute:"stroke"},t))),mx=(yx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=J(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),vx=(mx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),bx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:vx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:vx.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:vx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:vx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:vx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:vx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:vx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:vx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:vx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:vx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:vx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:vx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:vx.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:vx.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:vx.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:vx.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:vx.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleSpacing:0,gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:vx.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:vx.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:vx.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:vx.BLACK,navButtonFillOpacity:.65,navPageNumFill:vx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:vx.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:vx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:vx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:vx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",labelShowTick:!0,labelSpacing:8},label:{fill:vx.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:vx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:vx.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:vx.STROKE,backgroundFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:vx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:vx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,trackStroke:"none",thumbFill:"#000",thumbFillOpacity:.15,thumbStroke:"none",thumbHighlightedFillOpacity:.2},title:{titleFill:vx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:vx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},p=(bx.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),xx=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:p.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:p.BLACK,lineWidth:1}},text:{text:{fill:p.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:p.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:p.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:p.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:p.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:p.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:p.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:p.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:p.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:p.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:p.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:p.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:p.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:p.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:p.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:p.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:p.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:p.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:p.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:p.BLACK,navButtonFillOpacity:.45,navPageNumFill:p.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:p.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:p.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:p.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:p.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:p.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:p.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:p.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:p.STROKE,backgroundFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:p.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:p.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:p.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:p.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},wx=(xx.props={},xx.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),Ox=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:wx.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:wx.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:wx.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:wx.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:wx.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:wx.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:wx.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:wx.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:wx.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:wx.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:wx.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:wx.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:wx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,line:!0,lineStroke:"#888",lineStrokeOpacity:1,lineLineWidth:1,lineArrow:null,tickStroke:wx.STROKE,tickStrokeOpacity:1,tickLineWidth:1,tickLength:5,labelFill:wx.BLACK,labelFillOpacity:1,labelFontSize:10,labelAutoRotate:!1,labelFontWeight:"normal",labelSpacing:4,labelAlign:"horizontal",gridStroke:"#ddd",gridStrokeOpacity:1,gridLineWidth:1,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:4,titleTextBaseline:"bottom",labelSpacing:8,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:4,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisLinear:{titlePosition:"top",titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridType:"surround",girdClosed:!0},axisRadar:{titlePosition:"start",showTick:!1,showLabel:!1,gridType:"surround",girdClosed:!0,gridStrokeOpacity:.3},legend:{padding:8,showTitle:!1,titleFill:wx.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemLabelFill:wx.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemValueFill:wx.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:wx.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:wx.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,backgroundFill:"transparent"},continuousLegend:{showTitle:!1,labelFill:wx.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:wx.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:wx.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:wx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},label:{fill:wx.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:null,offset:12,connectorStroke:wx.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:wx.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:wx.STROKE,backgroundFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:wx.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:wx.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:wx.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:wx.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function Mx(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}Ox.props={};var kx,_x=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sx(t){var e;if(e=_x.exec(t))return new Ex({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]});throw new Error("invalid format: "+t)}function Ex(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ax(t,e){var n,e=Mx(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}Sx.prototype=Ex.prototype,Ex.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Lx={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>Ax(100*t,e),r:Ax,s:function(t,e){var n,r,i=Mx(t,e);return i?(n=i[0],(i=(i=i[1])-(kx=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Mx(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Tx(t){return t}var Px,Cx=Array.prototype.map,jx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nx(t){var e,s,l,O=void 0===t.grouping||void 0===t.thousands?Tx:(s=Cx.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",k=void 0===t.numerals?Tx:(e=Cx.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=Sx(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):Lx[m]||(void 0===g&&(g=12),y=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=Lx[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?jx[8+kx/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=O(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=O(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return k(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=Sx(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=Mx(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=jx[8+e/3];return function(t){return n(r*t)+i}}}}function Bx(t,e,n){return t.querySelector(e)?nt(t).select(e):nt(t).append(n)}function Fx(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function Rx(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","center","center"],bottom:["row","center","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}da=Nx({thousands:",",grouping:[3],currency:["$",""]}),Px=da.format,da.formatPrefix;class Ix extends ha{update(t){this.attr(t);var e,t=J(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function Dx(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function zx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function Wx(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Rc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new t0({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return Ou(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new t0({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new t0({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return vu(s)||mu(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:mu(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),bu(s)&&"center"===o?i.map(t=>{var e=t["value"],t=J(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function Gx(t,e,n){var r;return!(vu(r=e)&&mu(r)||wu(e))&&(void 0===t?!!n.getTicks:t)}function Hx(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+uf(e)]),Object.assign({},n,r)}(n,i);return"bottom"===i?Object.assign(Object.assign({},n),{titlePosition:t.getTicks?"right-bottom":"bottom",titleTransformOrigin:"center",titleTransform:t.getTicks?"translate(-100%, 0)":void 0}):"center"===i?Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive",labelTransform:"center"===r?"translate(50%, 0)":"",tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(t=a)||t===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var qx,pa=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?Px(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const Vx=pa(t=>{const{direction:f="left",important:h={},labelFormatter:d=t=>""+t,orientation:p,position:g,tickCount:y,tickFilter:m,tickMethod:v,title:b}=t,x=J(t,["direction","important","labelFormatter","order","orientation","position","size","tickCount","tickFilter","tickMethod","title","transform"]);return([t],e,n,r)=>{var e=e["bbox"],i=t.getOptions()["domain"],i=Wx(t,i,y,d,m,v,g,n),r=Hx(t,0,r,f,g,p),{labelAutoRotate:a=!0,labelAutoHide:o=!1,label:s=!0,tick:l=!0,line:c=!1,grid:u}=Object.assign({},r,x),u=Gx(u,n,t),t=function(t,e){var[e,n]=zx(e);return t.includes("bottom")||t.includes("top")?n:e}(g,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o],showLine:!0};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o],showLine:!0};if("number"==typeof e){var[t,a]=r.getCenter(),[s,l]=ku(r);const[u,f]=_u(r);var r=o/2,o=s*r,s=l*r,[l,r]=[t+n,a+i],[e,c]=[Math.cos(e),Math.sin(e)];return{startPos:[l+s*e,r+s*c],endPos:[l+o*e,r+o*c],gridClosed:f-u==360,gridCenter:[t+n,i+a],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(f-u)/(n.length-1)*e)}}}return{}}(g,p,e,n),{showLine:n=c}=e,c=J(e,["showLine"]),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:i,title:Fx(b),showLabel:s,labelTransforms:(e=a,r=[],o&&r.push({type:"hide"}),e&&r.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),r),showGrid:u,showTick:l,gridLength:t}),x),{showLine:!0}),n?null:{lineOpacity:0}),c),h);return new Qv({className:"axis",style:i})}}),Yx=pa(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,title:f,grid:h=!1,important:d={}}=t,p=J(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","title","grid","important"]);return([t],e,n,r)=>{var e=e["bbox"],i=t.getOptions()["domain"],t=Wx(t,i,c,s,l,u,o,n),[i,a]=ku(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=_u(i),[l,c]=zx(i),e={center:e,radius:a,angleRange:[o,s],titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(zx(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new Qv({style:tt({},i,e,Object.assign(Object.assign({type:"arc",data:t,title:Fx(f),showGrid:h},p),d))})}}),$x=(Vx.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},Yx.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>Vx(t)),Ux=($x.props=Object.assign(Object.assign({},Vx.props),{defaultPosition:"bottom"}),t=>Vx(t));Ux.props=Object.assign(Object.assign({},Vx.props),{defaultPosition:"left"});const Xx=a=>{const{important:o={}}=a,s=J(a,["important"]);return(t,e,n,r)=>{return Vx(Object.assign(Object.assign(Object.assign({},s),(i=a.orientation,(i%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:i>-Math.PI/2&&i<Math.PI/2?{titleTransform:"translate(50%, 0)"}:i>Math.PI/2&&i<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=_u(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{showGrid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,r,n,e)),o)}))(t,e,n,r);var i}};function Kx(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||ff("Unknown Component: "+t)};return[t=>{var e=t["type"],t=J(t,["type"]);return r(e)(Object.assign({},t))},r]}function Zx(t,e,n,r,i={}){const[a]=Kx("shape",e);return()=>a({type:"point."+t})([[0,0],[0,0]],Object.assign({size:6},i),n,r)}function Qx(t,e,n,r,i){var{labelFormatter:a=t=>""+t}=e,e={itemMarker:function(t,e,n,r,i){t=Dx(t,"shape");const a=e["itemMarker"];if(!t||a)return"function"==typeof a?a:(t,e)=>Zx(a||"point",n,r,i,{color:t.color});{const o=t.getOptions()["range"];return(t,e)=>Zx(o[e],n,r,i,{color:t.color})}}(t,e,n,r,i),itemMarkerOpacity:function(t){if(t=Dx(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(t)};const o="string"==typeof a?Px(a):a,s=Dx(t,"color");return Object.assign(Object.assign({},e),{data:s.getOptions().domain.map(t=>({id:t,label:o(t),color:s.map(t)}))})}Xx.props=Object.assign(Object.assign({},Vx.props),{defaultPosition:"center"});const Jx=f=>{const{position:h,dx:d=0,dy:p=0,title:g,gridCol:y,gridRow:m}=f,v=J(f,["order","size","position","orientation","itemMarker","labelFormatter","dx","dy","title","gridCol","gridRow","layout"]);return(t,e,n,r)=>{var{library:i,bbox:a}=e,{x:a,y:o,width:s,height:l}=a,e=Rx(h,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[c,u]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(h,m,y),u=Object.assign({orient:["right","left","center"].includes(h)?"vertical":"horizontal",width:s,height:l,gridCol:null!==y&&void 0!==y?y:u,gridRow:null!==m&&void 0!==m?m:c,rowPadding:0,colPadding:8,titleText:Fx(g)},Qx(t,f,i,n,r)),{legend:c={}}=r,t=new Ix({style:Object.assign({x:a+d,y:o+p,width:s,height:l},e)});return t.appendChild(new Sb({className:"legend-category",style:Object.assign({},c,u,v)})),t}};Jx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const tw=l=>{const{title:c,dx:u=0,dy:f=0,position:h,labelFormatter:d}=l,p=J(l,["title","dx","dy","position","layout","labelFormatter"]);return(t,e,n,r)=>{var i=e["bbox"],{x:i,y:a,width:o,height:s}=i,e=Rx(h,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),o=new Ix({style:Object.assign({x:i+u,y:a+f,width:o,height:s},e)}),{continuousLegend:s={}}=r;return o.appendChild(new Vb({style:Object.assign({},s,Object.assign(Object.assign({x:i,y:a,titleText:Fx(c),titleFontSize:12,showHandle:!1,showIndicator:!1,labelAlign:"value",labelFormatter:"string"==typeof d?t=>Px(d)(t.label):d},function(t){var{position:t="top",size:e,length:n=tw.props.defaultLength}=t,[n,e,t]={left:["vertical",e,n],right:["vertical",e,n],top:["horizontal",n,e],bottom:["horizontal",n,e]}[t];return{orient:n,width:e,height:t}}(l)),function(t,e){const r=Dx(t,"color");var{domain:n,range:i}=r.getOptions();const{length:a=tw.props.defaultLength}=e,[o,s]=[n[0],n.slice(-1)[0]];if(r instanceof a0){e=r.thresholds;if(r instanceof l0||r instanceof u0)return{data:[o,...e,s].map((t,e)=>({value:t/s,label:t})),color:i};const c=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return{data:c,color:i,labelFilter:(t,e)=>0<e&&e<c.length-1}}const l=Dx(t,"opacity");return{data:r.getTicks().map(t=>({value:t})),color:new Array(a).fill(0).map((t,e)=>{var e=(s-o)/(a-1)*e+o,n=r.map(e);const i=l?l.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}), ([\d]{1,3}), ([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})}}(t,l)),p)})),o}},ew=(tw.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200},e=>(...t)=>tw(Object.assign({},{block:!0},e))(...t)),nw=(ew.props=Object.assign(Object.assign({},tw.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>tw(Object.assign({},{type:"size",block:!0,labelShowTick:!1},t))),rw=(nw.props=Object.assign(Object.assign({},tw.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>tw(Object.assign({},{type:"size",labelShowTick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function iw(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}rw.props=Object.assign(Object.assign({},tw.props),{defaultPosition:"top",defaultOrientation:"horizontal"});qx={render(t,e){const{y:n,width:r,title:i,subtitle:a,spacing:o=2,align:s="left"}=t,l=J(t,["x","y","width","title","subtitle","spacing","align"]);t=et(l,"title");const c=et(l,"subtitle"),u=Bx(e,".title","text").attr("className","title").call(A,Object.assign(Object.assign(Object.assign({},iw(0,n,r,s)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();Bx(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},iw(0,u.max[1]+o,r,s)),{fontSize:12,textBaseline:"top",text:a}),c))})}};const aw=class extends N.CustomElement{constructor(t){super(t),this.descriptor=qx}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(tt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},ow=s=>(t,e,n,r)=>{var{x:e,y:i,width:a,height:o}=e.bbox;return new aw({style:tt({},{style:r.title},Object.assign({x:e,y:i,width:a,height:o},s))})};function sw(t){return t.getBandWidth}function lw(t,e,n){if(!sw(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=jc(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function cw(t,e){var n,r;return sw(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):Yc(e)}ow.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const uw=t=>{const{orient:u,labelFormatter:f}=t,h=J(t,["orient","labelFormatter","size"]);return([e],t,n,r)=>{var i,t=t["bbox"],{x:t,y:a,width:o,height:s}=t,{slider:r={}}=r;const l=(null==(i=e.getFormatter)?void 0:i.call(e))||(t=>t),c="string"==typeof f?Px(f):f;return new Wm({className:"slider",style:Object.assign({},r,Object.assign({x:t,y:a,trackLength:"horizontal"===u?o:s,orient:u,formatter:t=>{return(c||l)(lw(e,t,!0))}},h))})}},fw=(uw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>uw(Object.assign(Object.assign({},t),{orient:"horizontal"}))),hw=(fw.props=Object.assign(Object.assign({},uw.props),{defaultPosition:"bottom"}),t=>uw(Object.assign(Object.assign({},t),{orient:"vertical"}))),dw=(hw.props=Object.assign(Object.assign({},uw.props),{defaultPosition:"left"}),t=>{const s=t["orient"],l=J(t,["orient","labelFormatter"]);return(t,e,n,r)=>{var e=e["bbox"],{x:e,y:i,width:a,height:o}=e,{scrollbar:r={}}=r;return new qm({className:"scrollbar",style:Object.assign({},r,Object.assign(Object.assign({x:e,y:i,trackLength:"horizontal"===s?a:o},l),{orient:s,value:0,contentLength:1500,viewportLength:"horizontal"===s?a:o}))})}}),pw=(dw.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>dw(Object.assign(Object.assign({},t),{orient:"horizontal"}))),gw=(pw.props=Object.assign(Object.assign({},dw.props),{defaultPosition:"bottom"}),t=>dw(Object.assign(Object.assign({},t),{orient:"vertical"})));gw.props=Object.assign(Object.assign({},dw.props),{defaultPosition:"left"});class yw{constructor(t){this.$value=t}static of(t){return new yw(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function mw(t,e,n){return yw.of({}).call(vw,t).call(vw,e).call(vw,n).value()}function vw(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function bw(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const xw=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],ww=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,mw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Ow=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,mw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Mw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,mw(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},kw=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,mw(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},_w=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],mw(i,n,l))},Sw=(_w.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],mw(i,n,l))});function Ew(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function Aw(t,e){var[n,r,i,t]=Ew(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
2
2
|
M ${t} ${e}
|
|
3
3
|
L ${t+n} ${e}
|
|
4
4
|
L ${t+n} ${e+r}
|
|
5
5
|
L ${t} ${e+r}
|
|
6
6
|
Z
|
|
7
|
-
`}([h,d,f,s]))}c-=u,l+=1}return o}function Rx(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Bx(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],y=F.convertToPath(e),g=F.convertToPath(n);return d===p&&"path"!==d||(void 0===y||void 0===g)?(a=n,p=r,[d,h,o,l]=Fx(i=e),[u,f,s,c]=Fx(a),u-=d,d=f-h,f=s/o,h=c/l,s=[Object.assign({transform:"translate(0, 0) scale(1, 1)"},Ex(i,Ax)),Object.assign({transform:`translate(${u}, ${d}) scale(${f}, ${h})`},Ex(a,Ax))],(o=i.animate(s,p)).finished.then(()=>Rx(a,i)),o):(c=y,d="path"===(u=(l=t)["nodeName"])?l:(Rx(u=new F.Path({style:Object.assign(Object.assign({},Ex(l,Ax)),{d:c})}),l),u),f=[Object.assign({path:y},Ex(e,Ax)),Object.assign({path:g},Ex(n,Ax))],h=d.animate(f,r),d.style.transform="scale(1, 1)",d.style.transform="none",h)}jx.props={};const Dx=y=>(t,e,n,r,i)=>{[a="pack"]=[y.split];var a="function"==typeof a?a:Ix,i=_x(i,n,y),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Bx(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Bx(t,new F.Path({style:Object.assign({path:d[e]},Ex(l,Ax))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Bx(t,t,new F.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},zx=(Dx.props={},b=>{return F.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:F.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!bu(r))return Px(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:f}=e,{points:e,y:t,y1:h}=(K(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=o1().cornerRadius(s).padAngle(l*Math.PI/180),p=Y1(r,e,[t,h]),{startAngle:y,endAngle:g}=p,m=new F.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=F.convertToPath(m);return m.style.transform="none",t};s=[{waveInArcAngle:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:y+1e-4,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{waveInArcAngle:g,fillOpacity:c,strokeOpacity:u,opacity:f}],l=a.animate(s,_x(i,n,b));return l.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:g}))},l}}),Wx=(zx.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,_x(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Hx=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,_x(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Vx=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],_x(i,n,o))},Gx=(Vx.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Px(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),qx=(Gx.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Tx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function Yx(t){return Q(t).selectAll("."+et).nodes()}function Ux(t){return Q(t).select("."+nt).node()}function Xx(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function $x(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function Zx(){return t=>t.__data__.color}function Kx(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Jx(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function Qx(o,s=(t,e)=>t){const l="__states__",c="__ordinal__",i=t=>{var{[l]:e=[],[c]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),J(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);t.setAttribute(r,i),r in n||(n[r]=a)}t[c]=n}},a=t=>{t[l]||(t[l]=[])};return{setState:(t,...e)=>{a(t),t[l]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[l].indexOf(r);-1!==r&&t[l].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[l].indexOf(e))}}function t5(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function e5(l,t){var{valueof:c=(t,e)=>t}=t,u=K(t,["valueof"]);const f="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=z0();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),z1(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=K(i,["fill"]),r=new F.Path({className:f+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||f;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function n5(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=K(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=Yc(o,i);n=t5(o,r);const[c,u]=e5(t,Object.assign({elements:o,valueof:n},J(e,"link"))),{setState:f,removeState:h}=Qx(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?f(n,"highlighted"):f(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)h(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function r5(n){return t=>{var{container:t,view:e}=t;return n5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e)}))}}function i5(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return n5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e),groupKey:Kx(e)}))}}function a5(n){return t=>{var{container:t,view:e}=t;return n5(t,Object.assign(Object.assign(Object.assign({},n),$x(n)),{elements:Yx,datum:Jx(e),groupKey:Zx()}))}}function o5(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=K(e,["elements","datum","groupKey","link","single"]);const f=n(t),h=new Set(f),d=Yc(f,l);n=t5(f,r);const[p,y]=e5(t,Object.assign({elements:f,valueof:n},J(e,"link"))),{setState:g,removeState:i,hasState:m}=Qx(e,n),v=()=>{for(const t of f)i(t,"selected","unselected");c&&y()},a=t=>{t=t.target;if(!h.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of f)n.has(i)?g(i,"selected"):g(i,"unselected");c&&(y(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!f.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)g(o,"unselected");c&&y(t)}else{e=r.some(t=>m(t,"selected"));for(const s of f)a.has(s)?g(s,"selected"):m(s,"selected")||g(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function s5(n){return t=>{var{container:t,view:e}=t;return o5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e)}))}}function l5(n){return t=>{var{container:t,view:e}=t;return o5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e),groupKey:Kx(e)}))}}function c5(n){return t=>{var{container:t,view:e}=t;return o5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e),groupKey:Zx()}))}}function u5(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=K(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Zc(t.map(t=>d[t])),u=I({},e),f=u.marks.find(t=>"line"===t.type);t=su(Uc(t,t=>su(t,t=>+h[t])/cu(t,t=>+h[t]),t=>l[t]).values());I(f,{scale:{y:{domain:[1/t,t]}}});const p=Ux(r),y=r.getElementsByClassName(et);const g=Yc(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),m=new F.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),v=new F.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},J(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Rc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var M;const k=Js(t=>{t=Xx(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of y){var{seriesIndex:a,key:o}=u.__data__,s=a[Fc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),g.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return M=[0,0],ne(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,M);x(M,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[Fc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",k),p.addEventListener("pointermove",k),p.addEventListener("pointerleave",k),()=>{m.remove(),p.removeEventListener("pointerenter",k),p.removeEventListener("pointermove",k),p.removeEventListener("pointerleave",k)}}}function f5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Ux(n),a=I({},e);for(const s of a.marks)s.animate=!1;const o=Js(t=>{var e,n,t=Xx(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function h5(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new Pb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r),{items:e,title:a}=e;i.show(),i.update({x:n,y:r,items:e,title:a}),t.tooltipElement=i}function d5(t){t=t.tooltipElement;t&&t.hide()}function p5(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>ff(t)))}function y5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function g5(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(ff),t=t.flatMap((r,t)=>{var t=n[t],e=K(r,["title"]);const i=y5(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions();return Object.assign({color:i,name:function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e;return t&&t.invert?t.invert(e):n&&n.invert?n.invert(r):null}(o,r)||n,value:void 0===e?e:""+e},p5(a({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function m5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function v5(t,e){return void 0===t?e:t}function b5(l,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:c,coordinate:u,showCrosshairs:f,item:h}=t,t=K(t,["elements","wait","leading","trailing","scale","coordinate","showCrosshairs","item"]);const d=e(l),[,p]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(l),y=new Map(d.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Zc(e)]})),g=J(t,"crosshairs"),a=Js(t=>{const r=Xx(l,t);var t=l.getBounds(),e=t.min[0],t=t.min[1];if(r){var n=d.map(t=>{var e=y.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Os(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=u.invert(t);return Rc(e,t)})(r,e)),{x:e,y:n}=t;return[t,u.map([e,n])]}),i=n.map(t=>t[0]),n=n.map(t=>t[1]),i=g5(d,h,c,i);if(h5(l,i,r[0]+e,r[1]+t),f){i=l,e=n,n=(t=Object.assign(Object.assign({},g),{height:p}))["height"],t=K(t,["height"]);const a=e=du(e.map(t=>t[0])),o=e,s=n;(n=i.ruleY||(e=new F.Line({style:Object.assign({x1:a,x2:o,y1:0,y2:s,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),i.appendChild(e),e)).style.x1=a,n.style.x2=o,n.style.y1=0,n.style.y2=s,i.ruleY=n}}},n,{leading:r,trailing:i}),o=()=>{var t;d5(l),f&&(t=l).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return l.addEventListener("pointerenter",a),l.addEventListener("pointermove",a),l.addEventListener("pointerleave",o),()=>{l.removeEventListener("pointerover",a),l.removeEventListener("pointerout",a),l.removeEventListener("pointerleave",o)}}function x5(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=Yc(t,o),u=Js(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=K(n,["title"]);const a=y5(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=i[t].getOptions();return Object.assign({color:a,name:n,value:void 0===e?e:""+e},p5(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):g5(n,s,i),{offsetX:t,offsetY:e}=t,h5(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&d5(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f)}}function w5(t){const{shared:o,showCrosshairs:s,series:l,item:c=()=>({})}=t,u=K(t,["shared","showCrosshairs","series","name","item"]);return t=>{var{container:t,view:e}=t,{scale:n,markState:r,coordinate:i}=e,a=m5(r,"seriesTooltip"),r=m5(r,"showCrosshairs"),t=Ux(t);return v5(l,a)?b5(t,Object.assign(Object.assign({},u),{elements:Yx,scale:n,coordinate:i,showCrosshairs:v5(s,r),item:c})):x5(t,Object.assign(Object.assign({},u),{elements:Yx,scale:n,coordinate:i,groupKey:o?Kx(e):void 0,item:c}))}}function M5(n){return(t,...e)=>I({},n(t,...e),t)}function k5(n){return(t,...e)=>I({},t,n(t,...e))}function O5(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=K(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}qx.props={};const _5=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=K(t,["data"]);return Object.assign(Object.assign({},t),{data:O5(e,o),x:n,y:r,width:i,height:a})})},S5=(_5.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var y=n[t],g=y["data"],y=K(y,["data"]),g=O5(g,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:g},y)),p+=h[t]+i}return d}),E5=(S5.props={},()=>t=>{var e=t["children"],t=K(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=K(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=K(t,["data","scale","axis","legend"]);return Object.assign({data:O5(e,a),scale:I({},o,n),axis:!(!r||!s)&&I({},s,r),legend:!(!i||!l)&&I({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),A5=(E5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:M,x:k,y:O,key:_,frame:S,title:E,labelTransform:A}=t,t=K(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform"]);return[{type:"standardView",x:k,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:M,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),P5=(A5.props={},M5(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Yc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),N5=M5(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:I({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:I({title:i},o)}}}),T5=M5(()=>({animate:{enterType:"fadeIn"}})),L5=k5(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),C5=k5(()=>({type:"cell"})),j5=k5(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),F5=k5((t,c=function(t){t=t.points;return B1(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?I5(a,e):(t=e.length?void 0:null,I({title:r===i-1&&void 0,grid:t},a))}},M=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?I5(r,e):(n=e.length?void 0:null,I({title:0===t&&void 0,grid:n},r))}},k={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1}=t,S=e["value"],{x:E,y:A}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=W1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[E]:t,[A]:e}=t,t=void 0===E||t===n,e=void 0===A||e===r;return t&&e}).map(t=>S.filter(t)),v=f?su(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:E,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:A,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],y=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=K(t,["scale","key","facet","axis","legend"]),a=null==(a=null==e?void 0:e.y)?void 0:a.guide,o=null==(o=null==e?void 0:e.x)?void 0:o.guide,s={x:{tickCount:E?5:void 0},y:{tickCount:A?5:void 0}},r=r?y:0===y.length?[]:S,l={color:{domain:P}},o={x:R5(o,w)(p,r),y:R5(a,M)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+g+O,y:f+m+_,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:I(s,e,l),axis:I({},i,o),legend:!1},t),k)})})}}});function I5(t,e){return e.length?I({title:!1,tickLine:null,label:null,subTickLine:null},t):I({title:!1,tickLine:null,label:null,subTickLine:null,grid:null},t)}function R5(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const B5=()=>t=>{return[Ox.of(t).call(C5).call(N5).call(T5).call(P5).call(L5).call(j5).call(F5).value()]},D5=(B5.props={},M5(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),z5=k5(t=>{const{data:w,children:c,x:M=0,y:k=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=W1(t);const s=t.map(({points:t})=>B1(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,y]=l[c],g=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=K(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return I5(r,e)})(g,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return I5(n,e)})(g,w)};return Object.assign({data:w,key:i+"-"+c,x:u+m+M,y:f+v+k,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:I({x:{facet:!1},y:{facet:!1}},e),axis:I({x:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5},y:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5}},o,l),legend:!1,encode:I({},a,{x:p,y:y})},t)})})}}}),W5=k5(t=>{var e=t["encode"],t=K(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=K(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const H5=()=>t=>{return[Ox.of(t).call(C5).call(N5).call(z5).call(W5).call(T5).call(L5).call(D5).value()]},V5=M5(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),G5=M5(t=>({coordinates:[{type:"polar"}]})),q5=t=>{var e=t["encode"],t=K(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function Y5(t){return t=>null}function U5(t){var t=t["points"],[t,e,n,r]=t,i=F1(t,r),t=j1(t,r),r=j1(e,n),r=(e=r,r=I1(r=t),e=I1(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=R1(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const X5=()=>t=>{return[Ox.of(t).call(C5).call(q5).call(N5).call(G5).call(j5).call(F5,U5,Y5,Y5,{frame:!1}).call(T5).call(L5).call(V5).value()]};const $5=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=I({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function Z5(t,e){if(null!==t)return{type:"column",value:t,field:e}}function K5(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function J5(t,e){var n=[];for(const r of t)n[r]=e;return n}function Q5(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function tw(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=Q5(t,i);if(null!==n)return[n,r]}return[null,null]}function ew(t){return!(t instanceof Date)&&"object"==typeof t}$5.props={};const nw=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y1:Z5(J5(t,0))}})]};function rw(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=Q5(r,t))?void 0:t[0]]}).filter(([,t])=>ff(t));return Array.from(Yc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function iw(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:jc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>fw(t=>r(e[t]))):"series"===t?sw:"value"===t?lw:"sum"===t?cw:"maxIndex"===t?uw:()=>null}function aw(t,e){for(const n of t)n.sort(e)}function ow(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function sw(t,e,n){return fw(t=>n[t])}function lw(t,e,n){return fw(t=>e[t])}function cw(t,n,e){t=W1(t),t=Array.from(Yc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return fw(t=>r.get(e[t]))}function uw(t,n,e){t=W1(t),t=Array.from(Yc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,lu(e,t=>n[t])]));return fw(t=>r.get(e[t]))}function fw(n){return(t,e)=>jc(n(t),n(e))}nw.props={};const hw=(t={})=>{const{groupBy:P="x",orderBy:N=null,reverse:T=!1,y:L="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=Q5(r,"y"),[s,l]=Q5(r,"y1"),[r]=j?tw(r,"series","color"):Q5(r,"color"),c=rw(P,t,e),n=iw(N)(n,a,r),u=(n&&aw(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){T&&_.reverse();var y=s?+s[_[0]]:0,g=[],m=[];for(const S of _){var v=h[S]=+a[S]-y;v<0?m.push(S):0<=v&&g.push(S)}var b=0<g.length?g:m,x=0<m.length?m:g;let t=g.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=y;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=y;for(const A of g){var M=h[A];0<M?r=u[A]=(f[A]=r)+M:u[A]=f[A]=r}}const k=new Set(d),O=new Set(p);r="y"===L?u:f,n="y"===C?u:f;return[t,I({},e,{encode:{y:Z5(r,o),y1:Z5(n,l)},style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>O.has(e)},i)})]}};function dw(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}hw.props={};const pw=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(dw)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",hw({groupBy:r})(t,e,n))},yw=(pw.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=Q5(n,i),[t,I({},e,{encode:{title:Z5(r,n)}})])}}),gw=(yw.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,I({},e,{encode:{x:Z5(J5(t,0))},scale:{x:{guide:null}}})]}),mw=(gw.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y:Z5(J5(t,0))},scale:{y:{guide:null}}})]}),vw=(mw.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,I({},e,{encode:{size:K5(J5(t,3))}})]}),bw=(vw.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=K(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,I({},e,{encode:{key:Z5(r)}})]}),xw=(bw.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=Q5(n,"color"),[t,I({},e,{encode:{series:Z5(r,i)}})])}),ww=(xw.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(ew)?[t,e]:[t,I({},e,{encode:{y:Z5(n)}})]}),Mw=(ww.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(ew)?[t,e]:[t,I({},e,{encode:{x:Z5(n)}})]}),kw=(Mw.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=Q5(n,"y"),[t,I({},e,{encode:{y1:Z5([...r])}})])}),Ow=(kw.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=Q5(n,"x"),[t,I({},e,{encode:{x1:Z5([...r])}})])}),_w=(Ow.props={},t=>{const a=t["channel"];return(t,e)=>{const r=e["encode"];var n=r["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(a)?a:[a];let i=0;n=n.flatMap(e=>Object.entries(r).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{var[e,n]=Q5(r,t),t=[[t,Z5(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),Z5(e,n)]),i++),t}));return[t,I({},e,{encode:Object.fromEntries(n)})]}}),Sw=(_w.props={},()=>(t,e)=>[t,I({scale:{x:{padding:0},y:{padding:0}}},e)]),Ew=(Sw.props={},()=>(t,e)=>{var{style:n={}}=e,r=K(e,["data","style"]),{x:i,y:a}=n,n=K(n,["x","y"]);return null==i||null==a?[t,e]:[[0],I({},r,{data:[0],cartesian:!0,encode:{x:Z5([i||0]),y:Z5([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),Aw=(Ew.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,I({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),Pw=(Aw.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(ew)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,I({},e,{encode:{x:Z5(n),y:Z5(r)}})])}),Nw=(Pw.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,I({},e,{encode:{series:K5(J5(t,void 0))}})]:[t,e]}),Tw=(Nw.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return K(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=Q5(r,"y"),[r]=tw(r,"series","color"),o=ow(r,i),i=rw(c,t,e),n=iw(f)(n,a,r),s=(n&&aw(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,I({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:Z5(s)}})]}}),Lw=(Tw.props={},t=>{const{groupBy:p=["x"],reducer:y=(t,e)=>e[t[0]],orderBy:g=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,Q5(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Yc(n,t=>f[t]).values());a.push(...o)}i=a}if(g){const[h]=Q5(e,g);h&&i.sort((t,e)=>y(t,h)-y(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[J5(n,r)]:tw(e,"enterDuration",J5(n,r));var[l]=tw(e,"enterDelay",J5(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=su(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,I({},t,{encode:{enterDuration:K5(s),enterDelay:K5(c)}})]}});Lw.props={};const Cw=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=K(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Q5(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=rw(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>cu(t,t=>e[+t]),max:(t,e)=>su(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>du(t,t=>e[+t]),median:(t,e)=>pu(t,t=>e[+t]),sum:(t,e)=>mu(t,t=>e[+t]),deviation:(t,e)=>zc(t,t=>e[+t])}[r]||su;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,I({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,Z5(e,Q5(n,t)[1])]))})]}};function jw(t,e,n){return null===t?[-.5,.5]:(t=ow(t,e),[-(e=new Dp({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function Fw(t,e,n){return e*(1-t)+n*t}Cw.props={};const Iw=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=Q5(n,"x"),[n]=Q5(n,"y");const o=jw(a,r,l),s=jw(n,i,c);a=t.map(()=>Fw(u(),...s)),r=t.map(()=>Fw(u(),...o));return[t,I({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:Z5(a),dx:Z5(r)}})]}},Rw=(Iw.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=Q5(n,"x");const i=jw(n,r,a);n=t.map(()=>Fw(o(),...i));return[t,I({scale:{x:{padding:.5}}},e,{encode:{dx:Z5(n)}})]}}),Bw=(Rw.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=K(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Q5(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=rw(y,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Wc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,I({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,Z5(e,Q5(n,t)[1])]))})]}}),Dw=(Bw.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=Q5(n,"y");var[,i]=Q5(n,"y1"),n=(f?tw(n,"series","color"):Q5(n,"color"),rw(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,I({},e,{encode:{y1:Z5(a,i)}})]}});function zw(t,e){return[t[0]]}function Ww(t,e){return[t[t.length-1]]}function Hw(t,e){return[t[lu(t,t=>e[t])]]}function Vw(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}(t,t=>e[t])]]}Dw.props={};const Gw=(t={})=>{const{groupBy:s="series"}=t,l=K(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=rw(s,t,e),[r,i]=Object.entries(l)[0];const[a]=Q5(n,r),o="function"==typeof(n=i)?n:{first:zw,last:Ww,max:Hw,min:Vw}[n]||zw;return[t.flatMap(t=>o(t,a)),e]}},qw=(Gw.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return Gw(Object.assign({x:e},t))}),Yw=(qw.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return Gw(Object.assign({y:e},t))});function Uw(e){return t=>null===t?e:e+" of "+t}function Xw(){return[(t,e)=>du(t,t=>+e[t]),Uw("mean")]}function $w(){return[(t,e)=>pu(t,t=>+e[t]),Uw("median")]}function Zw(){return[(t,e)=>su(t,t=>+e[t]),Uw("max")]}function Kw(){return[(t,e)=>cu(t,t=>+e[t]),Uw("min")]}function Jw(){return[(t,e)=>t.length,Uw("count")]}function Qw(){return[(t,e)=>mu(t,t=>+e[t]),Uw("sum")]}function t3(){return[(t,e)=>e[t[0]],Uw("first")]}function e3(){return[(t,e)=>e[t[t.length-1]],Uw("last")]}Yw.props={};const n3=(t={})=>{const i=t["groupBy"],a=K(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=i(t,e);var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:Xw,max:Zw,count:Jw,first:t3,last:e3,sum:Qw,min:Kw,median:$w}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=Q5(s,t);return[t,Z5(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),n=Object.keys(s).map(t=>{const[e,n]=Q5(s,t);return[t,Z5(l.map(t=>e[t[0]]),n)]}),r=l.map(t=>o[t[0]]);return[W1(l),I({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},r3=(n3.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=K(t,["channels"]);return n3(Object.assign(Object.assign({},e),{groupBy:(t,e)=>rw(n,t,e)}))}),i3=(r3.props={},(t={})=>r3(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),a3=(i3.props={},(t={})=>r3(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),o3=(a3.props={},(t={})=>r3(Object.assign(Object.assign({},t),{channels:["color"]})));o3.props={};const s3=(t={})=>{const{reverse:s=!1,slice:l,channel:c}=t,u=K(t,["reverse","slice","channel"]);return(t,e)=>{var n=e["encode"];const[r]=Q5(n,c);var i,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=Q5(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>su(t,t=>+a[t]);if("min"===i)return t=>cu(t,t=>+a[t]);if("sum"===i)return t=>mu(t,t=>+a[t]);if("median"===i)return t=>pu(t,t=>+a[t]);if("mean"===i)return t=>du(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(c,u,n),n=(a=t,o=t=>r[t],(2!==(i=n).length?Zc(Uc(a,i,o),([t,e],[n,r])=>jc(e,r)||jc(t,n)):Zc(Yc(a,o),([t,e],[n,r])=>i(e,r)||jc(t,n))).map(([t])=>t)),a=(s&&n.reverse(),"number"==typeof l?[0,l]:l),o=l?n.slice(...a):n;return[t,I(e,{scale:{[c]:{domain:o}}})]}},l3=(s3.props={},(t={})=>s3(Object.assign(Object.assign({},t),{channel:"x"}))),c3=(l3.props={},(t={})=>s3(Object.assign(Object.assign({},t),{channel:"color"}))),u3=(c3.props={},(t={})=>s3(Object.assign(Object.assign({},t),{channel:"y"})));u3.props={};const f3=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=Q5(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):Q5(r,s)[0],r=Xc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>mu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,I({},e,{scale:{x:{flex:r}}})]}};function h3(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=B1(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}f3.props={};const d3=()=>(t,e)=>[t,I({},e,{modifier:h3,axis:!1})],p3=(d3.props={},"thresholds");function y3(t){var[e,n]=Wc(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Dc(t))/(3.49*zc(t)))))}const g3=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=K(t,["groupChannels","binChannels"]),u={};return n3(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(p3)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=Q5(n,t);return t}),a=J(c,p3),o=t.filter(e=>i.every(t=>ff(t[e]))),r=[...s.map(t=>{var[t]=Q5(n,t);return t}).filter(ff).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||y3(n),e=ou().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Yc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},m3=(g3.props={},(t={})=>{var e=t["thresholds"];return g3(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});m3.props={};var fa="object"==typeof Ve&&Ve&&Ve.Object===Object&&Ve,ha="object"==typeof self&&self&&self.Object===Object&&self,pa=fa||ha||Function("return this")(),da=pa.Symbol,ya=Object.prototype,v3=ya.hasOwnProperty,b3=ya.toString,x3=da?da.toStringTag:void 0;var w3=Object.prototype.toString;var M3="[object Null]",k3="[object Undefined]",O3=da?da.toStringTag:void 0;function _3(t){if(null==t)return void 0===t?k3:M3;if(O3&&O3 in Object(t)){var e=t,n=v3.call(e,x3),r=e[x3];try{var i=!(e[x3]=void 0)}catch(t){}var a=b3.call(e);return i&&(n?e[x3]=r:delete e[x3]),a}return w3.call(t)}function S3(t){return null!=t&&"object"==typeof t}var E3=Array.isArray;function A3(t){return t}var P3="[object AsyncFunction]",N3="[object Function]",T3="[object GeneratorFunction]",L3="[object Proxy]";function C3(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var j3=/^(?:0|[1-9]\d*)$/;var F3=9007199254740991;function I3(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=F3}function R3(t){return null!=t&&I3(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=_3(t))==N3||e==T3||e==P3||e==L3}(t)}var B3=Object.prototype;function D3(t){return S3(t)&&"[object Arguments]"==_3(t)}var u=Object.prototype,z3=u.hasOwnProperty,W3=u.propertyIsEnumerable,H3=D3(function(){return arguments}())?D3:function(t){return S3(t)&&z3.call(t,"callee")&&!W3.call(t,"callee")};var ga="object"==typeof g&&g&&!g.nodeType&&g,zo=ga&&"object"==typeof module&&module&&!module.nodeType&&module,Ro=zo&&zo.exports===ga?pa.Buffer:void 0,V3=(Ro?Ro.isBuffer:void 0)||function(){return!1},G3={};G3["[object Float32Array]"]=G3["[object Float64Array]"]=G3["[object Int8Array]"]=G3["[object Int16Array]"]=G3["[object Int32Array]"]=G3["[object Uint8Array]"]=G3["[object Uint8ClampedArray]"]=G3["[object Uint16Array]"]=G3["[object Uint32Array]"]=!0,G3["[object Arguments]"]=G3["[object Array]"]=G3["[object ArrayBuffer]"]=G3["[object Boolean]"]=G3["[object DataView]"]=G3["[object Date]"]=G3["[object Error]"]=G3["[object Function]"]=G3["[object Map]"]=G3["[object Number]"]=G3["[object Object]"]=G3["[object RegExp]"]=G3["[object Set]"]=G3["[object String]"]=G3["[object WeakMap]"]=!1;var q3,qo="object"==typeof g&&g&&!g.nodeType&&g,Y3=qo&&"object"==typeof module&&module&&!module.nodeType&&module,U3=Y3&&Y3.exports===qo&&fa.process,ba=function(){try{var t=Y3&&Y3.require&&Y3.require("util").types;return t?t:U3&&U3.binding&&U3.binding("util")}catch(t){}}(),Uo=ba&&ba.isTypedArray,X3=Uo?(q3=Uo,function(t){return q3(t)}):function(t){return S3(t)&&I3(t.length)&&!!G3[_3(t)]},$3=Object.prototype.hasOwnProperty;function Z3(t,e){var n,r,i,a,o=E3(t),s=!o&&H3(t),l=!o&&!s&&V3(t),c=!o&&!s&&!l&&X3(t),u=o||s||l||c,f=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(n in t)!e&&!$3.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=h)?9007199254740991:i)&&("number"==a||"symbol"!=a&&j3.test(r))&&-1<r&&r%1==0&&r<i))||f.push(n);return f}K3=Object.keys,J3=Object;var K3,J3,Q3=function(t){return K3(J3(t))},t4=Object.prototype.hasOwnProperty;function e4(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||B3))return Q3(t);var e,n,r,i=[];for(r in Object(t))t4.call(t,r)&&"constructor"!=r&&i.push(r);return i}function n4(t){return(R3(t)?Z3:e4)(t)}var r4,i4=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[r4?o:++r];if(!1===e(i[s],s,i))break}return t};o4=function(t,e){return t&&i4(t,e,n4)};function a4(t,e){if(null!=t){if(!R3(t))return o4(t,e);for(var n=t.length,r=s4?n:-1,i=Object(t);(s4?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var o4,s4;function l4(t,e){(E3(t)?C3:a4)(t,"function"==typeof(t=e)?t:A3)}function c4(t,e,n){return e<=t&&t<=n}function u4(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function f4(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return 1;0<u4(c[1]-n)!=0<u4(u[1]-n)&&u4(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function h4(t){for(var e,n,r=[],i=t.length,a=0;a<i-1;a++){var o=t[a],s=t[a+1];r.push({from:{x:o[0],y:o[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function d4(t,c){var u=!1;return l4(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,a=n.y-e.y,o=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(o*o+t*t)*(s*s+r*r)<(n=o*r-t*s)*n&&c4(r=(i*r-a*s)/n,0,1)&&c4((i*t-a*o)/n,0,1)?{x:e.x+r*o,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,a,o,s,l}),u}function p4(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function y4(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function g4(t){return t.style.priority||0}const m4=()=>(n,t)=>{var r=[];n.sort((t,e)=>jc(g4(t),g4(e)));for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var a=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,a,t=p4(e),o=p4(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,l4(n,function(t){if(f4(e,t[0],t[1]))return!(r=!0)}),r?1:(l4(e,function(t){if(f4(n,t[0],t[1]))return!(r=!0)}),r||(i=h4(e),o=h4(n),a=!1,l4(o,function(t){if(d4(i,t))return!(a=!0)}),a))}}(y4(i),y4(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function v4(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const b4=t=>{const{maxIter:M=10,maxError:k=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[y,g]=v4(),[m,v]=v4();var a,o,s,l,[c,t]=v4(),[u,n]=v4();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,y]=r;var[r,f]=f;g(b,y),v(b,y),t(b,f-y),n(b,[x,r])}for(let t=0;t<M;t++){i.sort((t,e)=>jc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const y=m(h);var d=c(h),p=m(e),d=p-(y+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,y-d),v(e,p+d))}}if(r<k)break}for(const w of i)w.style.y+=m(w)-y(w)}return i}},x4=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(Ou(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=df(i,r);const o=n+e,s=n+r-e;t.forEach(t=>{var{x:e,x0:n,y0:r}=t.style,e=e<=a[0]?o-e:s-e,{x:e,y:i}=(t.style.x+=e,t.style),n=j1([n,r],a),r=j1([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},w4=t=>(t,e)=>{if(Ou(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,F1(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=R1([e-a[0],n-a[1]]),n=r?i*(Math.sin(e)<0?-1:1):0,r=a[0]+Math.sin(e)*o,i=a[1]-Math.cos(e)*o;t.style.x=r+n,t.style.y=i,t.style.connectorPoints=[[-n,0]]})}return t};var N=1e-6,M4=1e-12,A=Math.PI,k4=A/2,O4=A/4,_4=2*A,S4=180/A,E4=A/180,A4=Math.abs,P4=Math.atan,N4=Math.atan2,P=Math.cos,T4=Math.ceil,L4=Math.exp,C4=Math.log,j4=Math.pow,T=Math.sin,F4=Math.sign||function(t){return 0<t?1:t<0?-1:0},I4=Math.sqrt,R4=Math.tan;function B4(t){return 1<t?0:t<-1?A:Math.acos(t)}function D4(t){return 1<t?k4:t<-1?-k4:Math.asin(t)}function z4(){}function W4(t,e){t&&V4.hasOwnProperty(t.type)&&V4[t.type](t,e)}var H4={Feature:function(t,e){W4(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)W4(n[r].geometry,e)}},V4={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){G4(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)G4(n[r],e,0)},Polygon:function(t,e){q4(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)q4(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)W4(n[r],e)}};function G4(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function q4(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)G4(t[n],e,1);e.polygonEnd()}function Y4(t,e){t&&H4.hasOwnProperty(t.type)?H4[t.type](t,e):W4(t,e)}function U4(t){return[N4(t[1],t[0]),D4(t[2])]}function X4(t){var e=t[0],t=t[1],n=P(t);return[n*P(e),n*T(e),T(t)]}function $4(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Z4(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 K4(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function J4(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Q4(t){var e=I4(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function tM(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function eM(t,e){return[A4(t)>A?t+Math.round(-t/_4)*_4:t,e]}function nM(t,e,n){return(t%=_4)?e||n?tM(iM(t),aM(e,n)):iM(t):e||n?aM(e,n):eM}function rM(n){return function(t,e){return[A<(t+=n)?t-_4:t<-A?t+_4:t,e]}}function iM(t){var e=rM(t);return e.invert=rM(-t),e}function aM(t,e){var i=P(t),a=T(t),o=P(e),s=T(e);function n(t,e){var n=P(e),r=P(t)*n,t=T(t)*n,n=T(e),e=n*i+r*a;return[N4(t*o-e*s,r*i-n*a),D4(e*o+t*s)]}return n.invert=function(t,e){var n=P(e),r=P(t)*n,t=T(t)*n,n=T(e),e=n*o-t*s;return[N4(t*o+n*s,r*i+e*a),D4(e*i-r*a)]},n}function oM(t,e){(e=X4(e))[0]-=t,Q4(e);t=B4(-e[1]);return((-e[2]<0?-t:t)+_4-N)%_4}function sM(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:z4,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function lM(t,e){return A4(t[0]-e[0])<N&&A4(t[1]-e[1])<N}function cM(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 uM(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(lM(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*N}s.push(n=new cM(r,t,null,!0)),l.push(n.o=new cM(r,null,n,!1)),s.push(n=new cM(i,t,null,!1)),l.push(n.o=new cM(i,null,n,!0))}}),s.length){for(l.sort(e),fM(s),fM(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function fM(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function hM(t){return A4(t[0])<=A?t[0]:F4(t[0])*((A4(t[0])+A)%_4-A)}function dM(g,m,v,b){return function(s){var l,c,u,n=m(s),f=sM(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=y,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=yu(c);var t=function(t,e){var n=hM(e),r=e[1],e=T(r),i=[T(n),-P(n),0],a=0,o=0,s=new Hc;1===e?r=k4+N:-1===e&&(r=-k4-N);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=hM(h),p=h[1]/2+O4,y=T(p),g=P(p),m=0;m<f;++m,d=b,y=w,g=x,h=v){var v=u[m],b=hM(v),x=v[1]/2+O4,w=T(x),x=P(x),M=b-d,k=0<=M?1:-1,O=k*M,_=A<O,S=y*w;s.add(N4(S*k*T(O),g*x+S*P(O))),a+=_?M+k*_4:M,_^n<=d^n<=b&&(Q4(S=Z4(X4(h),X4(v))),Q4(O=Z4(i,S)),(k=(_^0<=M?-1:1)*D4(O[2]))<r||r===k&&(S[0]||S[1]))&&(o+=_^0<=M?1:-1)}return(a<-N||a<N&&s<-M4)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),uM(c,yM,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){g(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function y(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(pM))}return e}}function pM(t){return 1<t.length}function yM(t,e){return((t=t.x)[0]<0?t[1]-k4-N:k4-t[1])-((e=e.x)[0]<0?e[1]-k4-N:k4-e[1])}eM.invert=eM;var gM=dM(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?A:-A,l=A4(t-f);A4(l-A)<N?(c.point(f,h=0<(h+e)/2?k4:-k4),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&A<=l&&(A4(f-d)<N&&(f-=d*N),A4(t-s)<N&&(t-=s*N),l=h,i=e,o=T((n=f)-(r=t)),h=A4(o)>N?P4((T(l)*(a=P(i))*T(r)-T(i)*(r=P(l))*T(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*k4,r.point(-A,i),r.point(0,i),r.point(A,i),r.point(A,0),r.point(A,-i),r.point(0,-i),r.point(-A,-i),r.point(-A,0),r.point(-A,i)):A4(t[0]-e[0])>N?(t=t[0]<e[0]?A:-A,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-A,-k4]);function mM(d){var y=P(d),p=6*E4,f=0<y,h=A4(y)>N;function g(t,e){return P(t)*P(e)>y}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=Z4(X4(t),X4(e)),h=$4(f,f),d=f[0],p=h-d*d;return p?(r=Z4(u,f),K4(u=J4(u,y*h/p),J4(f,-y*d/p)),(p=(f=$4(u,h=r))*f-(d=$4(h,h))*($4(u,u)-1))<0?void 0:(K4(p=J4(h,(-f-(r=I4(p)))/d),u),p=U4(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=A4((s=a-i)-A)<N)&&e<o&&(c=o,o=e,e=c),(l||s<N?l?0<o+e^p[1]<(A4(p[0]-i)<N?o:e):o<=p[1]&&p[1]<=e:A<s^(i<=p[0]&&p[0]<=a))?(K4(c=J4(h,(-f+r)/d),u),[p,U4(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:A-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return dM(g,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=g(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?A:-A),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!lM(o,n)&&!lM(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&lM(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=P(r),c=T(r),u=o*a;null==n?(n=r+o*_4,s=r-u/2):(n=oM(l,n),s=oM(l,s),(0<o?n<s:s<n)&&(n+=o*_4));for(var f,h=n;0<o?s<h:h<s;h-=u)f=U4([l,-c*P(h),-c*T(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-A,d-A])}var vM=1e9,bM=-vM;function xM(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function M(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return A4(t[0]-m)<N?0<e?0:3:A4(t[0]-b)<N?0<e?2:1:A4(t[1]-v)<N?0<e?1:0:0<e?3:2}function k(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,y=r,t=sM(),e={point:n,lineStart:function(){e.point=g,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(g(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&y.lineEnd()},polygonStart:function(){y=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=yu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),M(null,null,1,r),r.lineEnd()),n&&uM(i,k,t,M,r),r.polygonEnd());y=r,i=f=a=null}};function n(t,e){w(t,e)&&y.point(t,e)}function g(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(y.lineStart(),y.point(t,e))):i&&h?y.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(bM,Math.min(vM,c)),u=Math.max(bM,Math.min(vM,u))],r=[t=Math.max(bM,Math.min(vM,t)),e=Math.max(bM,Math.min(vM,e))],m,v,b,x)?i&&(y.lineStart(),y.point(t,e),p=!1):(h||(y.lineStart(),y.point(n[0],n[1])),y.point(r[0],r[1]),i||y.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function wM(t,e,n){var r=gu(t,e-N,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function MM(t,e,n){var r=gu(t,e-N,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function kM(){return y=p=10,g=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(g=+t[0],m=+t[1],e):[g,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],y=+t[1],e):[p,y]},e.precision=function(t){return arguments.length?(v=+t,u=wM(s,o,90),f=MM(r,n,v),h=wM(c,l,90),d=MM(a,i,v),e):v},e.extentMajor([[-180,-90+N],[180,90-N]]).extentMinor([[-180,-80-N],[180,80+N]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return gu(T4(a/g)*g,i,g).map(h).concat(gu(T4(c/m)*m,l,m).map(d)).concat(gu(T4(r/p)*p,n,p).filter(function(t){return A4(t%g)>N}).map(u)).concat(gu(T4(s/y)*y,o,y).filter(function(t){return A4(t%m)>N}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,m,v}var OM,_M,SM,EM,AM=t=>t,PM=new Hc,NM=new Hc,TM={point:z4,lineStart:z4,lineEnd:z4,polygonStart:function(){TM.lineStart=LM,TM.lineEnd=FM},polygonEnd:function(){TM.lineStart=TM.lineEnd=TM.point=z4,PM.add(A4(NM)),NM=new Hc},result:function(){var t=PM/2;return PM=new Hc,t}};function LM(){TM.point=CM}function CM(t,e){TM.point=jM,OM=SM=t,_M=EM=e}function jM(t,e){NM.add(EM*t-SM*e),SM=t,EM=e}function FM(){jM(OM,_M)}var IM=TM,RM=1/0,BM=RM,DM=-RM,zM=DM;var WM,HM,VM,GM,qM={point:function(t,e){t<RM&&(RM=t);DM<t&&(DM=t);e<BM&&(BM=e);zM<e&&(zM=e)},lineStart:z4,lineEnd:z4,polygonStart:z4,polygonEnd:z4,result:function(){var t=[[RM,BM],[DM,zM]];return DM=zM=-(BM=RM=1/0),t}},YM=0,UM=0,XM=0,$M=0,ZM=0,KM=0,JM=0,QM=0,tk=0,ek={point:nk,lineStart:rk,lineEnd:ok,polygonStart:function(){ek.lineStart=sk,ek.lineEnd=lk},polygonEnd:function(){ek.point=nk,ek.lineStart=rk,ek.lineEnd=ok},result:function(){var t=tk?[JM/tk,QM/tk]:KM?[$M/KM,ZM/KM]:XM?[YM/XM,UM/XM]:[NaN,NaN];return YM=UM=XM=$M=ZM=KM=JM=QM=tk=0,t}};function nk(t,e){YM+=t,UM+=e,++XM}function rk(){ek.point=ik}function ik(t,e){ek.point=ak,nk(VM=t,GM=e)}function ak(t,e){var n=t-VM,r=e-GM,n=I4(n*n+r*r);$M+=n*(VM+t)/2,ZM+=n*(GM+e)/2,KM+=n,nk(VM=t,GM=e)}function ok(){ek.point=nk}function sk(){ek.point=ck}function lk(){uk(WM,HM)}function ck(t,e){ek.point=uk,nk(WM=VM=t,HM=GM=e)}function uk(t,e){var n=t-VM,r=e-GM,n=I4(n*n+r*r);$M+=n*(VM+t)/2,ZM+=n*(GM+e)/2,KM+=n,JM+=(n=GM*t-VM*e)*(VM+t),QM+=n*(GM+e),tk+=3*n,nk(VM=t,GM=e)}var fk=ek;function hk(t){this._context=t}hk.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(){0===this._line&&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,_4)}},result:z4};var dk,pk,yk,gk,mk,vk=new Hc,bk={point:z4,lineStart:function(){bk.point=xk},lineEnd:function(){dk&&wk(pk,yk),bk.point=z4},polygonStart:function(){dk=!0},polygonEnd:function(){dk=null},result:function(){var t=+vk;return vk=new Hc,t}};function xk(t,e){bk.point=wk,pk=gk=t,yk=mk=e}function wk(t,e){gk-=t,mk-=e,vk.add(I4(gk*gk+mk*mk)),gk=t,mk=e}var Mk=bk;function kk(){this._string=[]}function Ok(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _k(e,n){var r,i,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),Y4(t,r(i))),i.result()}return o.area=function(t){return Y4(t,r(IM)),IM.result()},o.measure=function(t){return Y4(t,r(Mk)),Mk.result()},o.bounds=function(t){return Y4(t,r(qM)),qM.result()},o.centroid=function(t){return Y4(t,r(fk)),fk.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,AM):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new kk):new hk(n=t),"function"!=typeof a&&i.pointRadius(a),o):n},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),o):a},o.projection(e).context(n)}function Sk(r){return function(t){var e,n=new Ek;for(e in r)n[e]=r[e];return n.stream=t,n}}function Ek(){}function Ak(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Y4(n,t.stream(qM)),e(qM.result()),null!=r&&t.clipExtent(r),t}function Pk(i,a,t){return Ak(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function Nk(t,e,n){return Pk(t,[[0,0],e],n)}function Tk(r,i,t){return Ak(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function Lk(i,a,t){return Ak(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}kk.prototype={_radius:4.5,_circle:Ok(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ok(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){var t;return this._string.length?(t=this._string.join(""),this._string=[],t):null}},Ek.prototype={constructor:Ek,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()}};var Ck=16,jk=P(30*E4);function Fk(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,y={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),y.lineStart=v},polygonEnd:function(){r.polygonEnd(),y.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,y.point=g,r.lineStart()}function g(t,e){var n=X4([t,e]),e=E(t,e);P(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],Ck,r),r.point(u,f)}function m(){y.point=t,r.lineEnd()}function v(){e(),y.point=b,y.lineEnd=x}function b(t,e){g(n=t,e),i=u,a=f,o=h,s=d,l=p,y.point=g}function x(){P(u,f,c,h,d,p,i,a,n,o,s,l,Ck,r),y.lineEnd=m,m()}return y}):(n=t,Sk({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function P(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,y,g,m,v,b,x,w,M,k,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(g=a+f,x=D4(g/=m=I4((p=r+c)*p+(y=i+u)*y+g*g)),v=A4(A4(g)-1)<N||A4(n-l)<N?(n+l)/2:N4(y,p),b=(x=E(v,x))[0],x=x[1],A<(k=_*(w=b-t)-O*(M=x-e))*k/S||.3<A4((O*w+_*M)/S-.5)||r*c+i*u+a*f<jk)&&(P(t,e,n,r,i,a,b,x,v,p/=m,y/=m,g,h,d),d.point(b,x),P(b,x,v,p,y,g,o,s,l,c,u,f,h,d))}}var Ik=Sk({point:function(t,e){this.stream.point(t*E4,e*E4)}});function Rk(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,y,g,m;return e?(f=P(e),e=T(e),h=f*t,d=e*t,p=f/t,y=e/t,g=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-y*e+g),a*(m-y*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function Bk(t){return Dk(function(){return t})()}function Dk(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,y=0,g=0,m=0,v=0,b=0,x=1,w=1,M=null,k=gM,O=null,_=AM,S=.5;function E(t){return l(t[0]*E4,t[1]*E4)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*S4,t[1]*S4]}function P(){var t=Rk(f,0,0,x,w,b).apply(null,e(p,y)),t=Rk(f,h-t[0],d-t[1],x,w,b);return r=nM(g,m,v),s=tM(e,t),l=tM(r,s),o=Fk(s,S),N()}function N(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=Ik((n=r,Sk({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(k(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(k=t,M=void 0,N()):k},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,N()):_},E.clipAngle=function(t){return arguments.length?(k=+t?mM(M=t*E4):(M=null,gM),N()):M*S4},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,AM):xM(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),N()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,P()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],P()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*E4,y=t[1]%360*E4,P()):[p*S4,y*S4]},E.rotate=function(t){return arguments.length?(g=t[0]%360*E4,m=t[1]%360*E4,v=2<t.length?t[2]%360*E4:0,P()):[g*S4,m*S4,v*S4]},E.angle=function(t){return arguments.length?(b=t%360*E4,P()):b*S4},E.reflectX=function(t){return arguments.length?(x=t?-1:1,P()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,P()):w<0},E.precision=function(t){return arguments.length?(o=Fk(s,S=t*t),N()):I4(S)},E.fitExtent=function(t,e){return Pk(E,t,e)},E.fitSize=function(t,e){return Nk(E,t,e)},E.fitWidth=function(t,e){return Tk(E,t,e)},E.fitHeight=function(t,e){return Lk(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,P()}}function zk(t){var e=0,n=A/3,r=Dk(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*E4,n=t[1]*E4):[e*S4,n*S4]},t}function Wk(t,e){var n,r,i,a=T(t),o=(a+T(e))/2;return A4(o)<N?(n=P(t),s.invert=function(t,e){return[t/n,D4(e*n)]},s):(i=I4(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=N4(t,A4(e))*F4(e);return e*o<0&&(n-=A*F4(t)*F4(e)),[n/o,D4((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,T(e)/n]}function l(t,e){e=I4(r-2*o*T(e))/o;return[e*T(t*=o),i-e*P(t)]}}function Hk(){return zk(Wk).scale(155.424).center([0,33.6442])}function Vk(){return Hk().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Gk(i){return function(t,e){var n=P(t),r=P(e),n=i(n*r);return n===1/0?[2,0]:[n*r*T(t),n*T(e)]}}function qk(a){return function(t,e){var n=I4(t*t+e*e),r=a(n),i=T(r),r=P(r);return[N4(t*i,n*r),D4(n&&e*i/n)]}}var Yk=Gk(function(t){return I4(2/(1+t))});Yk.invert=qk(function(t){return 2*D4(t/2)});var Uk=Gk(function(t){return(t=B4(t))&&t/T(t)});function Xk(t,e){return[t,C4(R4((k4+e)/2))]}function $k(r){var i,a,o,s=Bk(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=A*l(),n=s((e=nM((e=s.rotate())[0]*E4,e[1]*E4,2<e.length?e[2]*E4:0),function(t){return(t=e.invert(t[0]*E4,t[1]*E4))[0]*=S4,t[1]*=S4,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===Xk?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function Zk(t){return R4((k4+t)/2)}function Kk(t,e){var n=P(t),i=t===e?T(t):C4(n/P(e))/C4(Zk(e)/Zk(t)),a=n*j4(Zk(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=F4(i)*I4(t*t+e*e),r=N4(t,A4(e))*F4(e);return e*i<0&&(r-=A*F4(t)*F4(e)),[r/i,2*P4(j4(a/n,1/i))-k4]},r):Xk;function r(t,e){0<a?e<-k4+N&&(e=-k4+N):k4-N<e&&(e=k4-N);e=a/j4(Zk(e),i);return[e*T(i*t),a-e*P(i*t)]}}function Jk(t,e){return[t,e]}function Qk(t,e){var n=P(t),r=t===e?T(t):(n-P(e))/(e-t),i=n/r+t;return A4(r)<N?Jk:(a.invert=function(t,e){var e=i-e,n=N4(t,A4(e))*F4(e);return e*r<0&&(n-=A*F4(t)*F4(e)),[n/r,i-F4(r)*I4(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*T(t),i-e*P(t)]}}Uk.invert=qk(function(t){return t}),Xk.invert=function(t,e){return[t,2*P4(L4(e))-k4]},Jk.invert=Jk;var t6=1.340264,e6=-.081106,n6=893e-6,r6=.003796,i6=I4(3)/2;function a6(t,e){var e=D4(i6*T(e)),n=e*e,r=n*n*n;return[t*P(e)/(i6*(t6+3*e6*n+r*(7*n6+9*r6*n))),e*(t6+e6*n+r*(n6+r6*n))]}function o6(t,e){var n=P(e),r=P(t)*n;return[n*T(t)/r,T(e)/r]}function s6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function l6(t,e){return[P(e)*T(t),T(e)]}function c6(t,e){var n=P(e),r=1+P(t)*n;return[n*T(t)/r,T(e)/r]}function u6(t,e){return[C4(R4((k4+e)/2)),-t]}a6.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(t6+e6*i+a*(n6+r6*i))-e)/(t6+3*e6*i+a*(7*n6+9*r6*i)))*r)*i*i,!(A4(n)<M4));++o);return[i6*t*(t6+3*e6*i+a*(7*n6+9*r6*i))/P(r),D4(T(r)/i6)]},o6.invert=qk(P4),s6.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),A4(a)>N&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},l6.invert=qk(D4),c6.invert=qk(function(t){return 2*P4(t)}),u6.invert=function(t,e){return[-e,2*P4(L4(t))-k4]};var f6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=Vk(),l=Hk().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Hk().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+N,r+.12*e+N],[n-.214*e-N,r+.234*e-N]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+N,r+.166*e+N],[n-.115*e-N,r+.234*e-N]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return Pk(f,t,e)},f.fitSize=function(t,e){return Nk(f,t,e)},f.fitWidth=function(t,e){return Tk(f,t,e)},f.fitHeight=function(t,e){return Lk(f,t,e)},f.scale(1070)},geoAlbers:Vk,geoAzimuthalEqualArea:function(){return Bk(Yk).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Yk,geoAzimuthalEquidistant:function(){return Bk(Uk).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Uk,geoConicConformal:function(){return zk(Kk).scale(109.5).parallels([30,30])},geoConicConformalRaw:Kk,geoConicEqualArea:Hk,geoConicEqualAreaRaw:Wk,geoConicEquidistant:function(){return zk(Qk).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:Qk,geoEqualEarth:function(){return Bk(a6).scale(177.158)},geoEqualEarthRaw:a6,geoEquirectangular:function(){return Bk(Jk).scale(152.63)},geoEquirectangularRaw:Jk,geoGnomonic:function(){return Bk(o6).scale(144.049).clipAngle(60)},geoGnomonicRaw:o6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,y=1,g=1,m=Sk({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=AM;function b(){return y=l*f,g=l*h,o=s=null,x}function x(t){var e,n=t[0]*y,t=t[1]*g;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/y,t/g]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,AM):xM(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=T(d=t%360*E4),r=P(d),b()):d*S4},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return Pk(x,t,e)},x.fitSize=function(t,e){return Nk(x,t,e)},x.fitWidth=function(t,e){return Tk(x,t,e)},x.fitHeight=function(t,e){return Lk(x,t,e)},x},geoProjection:Bk,geoProjectionMutator:Dk,geoMercator:function(){return $k(Xk).scale(961/_4)},geoMercatorRaw:Xk,geoNaturalEarth1:function(){return Bk(s6).scale(175.295)},geoNaturalEarth1Raw:s6,geoOrthographic:function(){return Bk(l6).scale(249.5).clipAngle(90+N)},geoOrthographicRaw:l6,geoStereographic:function(){return Bk(c6).scale(250).clipAngle(142)},geoStereographicRaw:c6,geoTransverseMercator:function(){var t=$k(u6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:u6});function h6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function d6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(y6),e.find(t=>t.sphere)?{type:"Sphere"}:h6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=_k(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function p6(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[kM()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function y6(t){return"geoPath"===t.type}var g6,Xo=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=K(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Ls(t);if(e=f6[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(p6);let y;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(d6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);y=_k(i);const u=new Zp({domain:[t,t+n]}),f=new Zp({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return y6(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>y(t)})})):t;var e})})]},Qo=(Xo.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=K(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});Qo.props={};const m6={"composition.geoView":Xo,"composition.geoPath":Qo};function v6(){return Object.assign({"data.fetch":Ih,"data.inline":Gh,"data.sortBy":Vh,"data.filter":Bh,"data.pick":Wh,"data.rename":Hh,"data.subset":zh,"data.fold":Rh,"data.custom":qh,"data.map":Yh,"data.cluster":wh,"data.tree":Mh,"data.sankey":sf,"data.arc":Zh,"data.wordCloud":gd,"data.join":vd,"transform.maybeZeroY1":nw,"transform.maybeZeroX":gw,"transform.maybeStackY":pw,"transform.maybeTitle":yw,"transform.maybeSeries":xw,"transform.maybeZeroPadding":Sw,"transform.stackY":hw,"transform.binX":m3,"transform.bin":g3,"transform.dodgeX":Tw,"transform.jitter":Iw,"transform.jitterX":Rw,"transform.symmetryY":Bw,"transform.diffY":Dw,"transform.stackEnter":Lw,"transform.normalizeY":Cw,"transform.select":Gw,"transform.selectX":qw,"transform.selectY":Yw,"transform.groupX":i3,"transform.groupY":a3,"transform.groupColor":o3,"transform.group":r3,"transform.maybeSize":vw,"transform.maybeZeroY":mw,"transform.maybeKey":bw,"transform.sortX":l3,"transform.sortY":u3,"transform.sortColor":c3,"transform.flexX":f3,"transform.maybeTupleY":ww,"transform.maybeTupleX":Mw,"transform.maybeIdentityY":kw,"transform.maybeIdentityX":Ow,"transform.maybeTuple":Pw,"transform.maybeVisualPosition":Ew,"transform.maybeFunctionAttribute":Aw,"transform.maybeGradient":Nw,"transform.maybeTooltip":_w,"transform.pack":d3,"coordinate.cartesian":el,"coordinate.polar":nl,"coordinate.helix":rl,"coordinate.transpose":il,"coordinate.theta":ll,"coordinate.reflect":al,"coordinate.reflectX":ol,"coordinate.reflectY":sl,"coordinate.parallel":ul,"coordinate.fisheye":fl,"coordinate.fisheyeX":hl,"coordinate.fisheyeY":dl,"coordinate.radial":cl,"encode.constant":pl,"encode.field":gl,"encode.transform":yl,"encode.column":ml,"mark.interval":Lc,"mark.rect":Cc,"mark.line":Eu,"mark.point":Au,"mark.text":Pu,"mark.cell":Nu,"mark.area":Tu,"mark.link":Lu,"mark.image":Cu,"mark.polygon":ju,"mark.box":Fu,"mark.vector":Iu,"mark.lineX":Bu,"mark.lineY":Ru,"mark.connector":Du,"mark.range":Hu,"mark.rangeX":Vu,"mark.rangeY":Gu,"mark.sankey":pf,"mark.path":yf,"mark.treemap":xf,"mark.pack":wf,"mark.boxplot":Nf,"mark.shape":Tf,"mark.forceGraph":bh,"mark.tree":kh,"mark.wordCloud":bd,"palette.category10":xd,"palette.category20":wd,"palette.sequentialBlue":Md,"palette.sequentialDarkBlue":kd,"palette.sequentialGreen":Od,"palette.sequentialDarkGreen":_d,"palette.sequentialGrey":Sd,"palette.sequentialOrange":Ed,"palette.sequentialPink":Ad,"palette.sequentialRed":Pd,"palette.sequentialYellow":Nd,"palette.sequentialPurple":Td,"palette.sequentialYellowOrange":Ld,"palette.sequentialYellowGreen":Cd,"palette.sequentialPinkPurple":jd,"palette.sequentialGreenBlue":Fd,"palette.divergingGreenYellow":Id,"palette.divergingRedBlue":Rd,"palette.divergingGreenRed":Bd,"palette.divergingRedPurple":Dd,"scale.linear":k0,"scale.ordinal":O0,"scale.band":M0,"scale.identity":_0,"scale.point":S0,"scale.time":E0,"scale.log":A0,"scale.pow":P0,"scale.sqrt":C0,"scale.threshold":N0,"scale.quantile":T0,"scale.quantize":L0,"scale.sequential":j0,"shape.interval.rect":Z1,"shape.interval.hollow":K1,"shape.interval.funnel":J1,"shape.interval.pyramid":ty,"shape.rect.rect":Z1,"shape.rect.hollow":K1,"shape.cell.cell":Z1,"shape.cell.hollow":K1,"shape.line.line":iy,"shape.line.hv":oy,"shape.line.vh":sy,"shape.line.hvh":ly,"shape.line.smooth":ay,"shape.point.bowtie":fy,"shape.point.cross":hy,"shape.point.diamond":dy,"shape.point.hexagon":py,"shape.point.hollowBowtie":yy,"shape.point.hollowDiamond":gy,"shape.point.hollowHexagon":my,"shape.point.hollow":vy,"shape.point.hollowSquare":by,"shape.point.hollowTriangle":xy,"shape.point.hollowTriangleDown":wy,"shape.point.hyphen":My,"shape.point.line":ky,"shape.point.plus":Oy,"shape.point.point":_y,"shape.point.square":Sy,"shape.point.tick":Ey,"shape.point.triangle":Ay,"shape.point.triangleDown":Py,"shape.text.text":f2,"shape.area.area":g2,"shape.area.smooth":m2,"shape.area.step":v2,"shape.link.smooth":x2,"shape.link.vhv":w2,"shape.link.arc":M2,"shape.link.link":b2,"shape.image.image":k2,"shape.polygon.polygon":O2,"shape.polygon.ribbon":_2,"shape.box.box":S2,"shape.vector.vector":Ny,"shape.label.label":D2,"shape.text.badge":d2,"shape.lineX.line":E2,"shape.lineY.line":E2,"shape.shape.shape":V2,"shape.connector.connector":N2,"shape.range.range":Z1,"shape.rangeX.range":Z1,"shape.rangeY.range":Z1,"shape.path.path":W2,"shape.path.hollow":H2,"theme.light":U2,"theme.dark":K2,"component.axisX":mx,"component.axisY":vx,"component.legendCategory":bx,"component.legendContinuous":xx,"component.title":kx,"animation.scaleInX":Px,"animation.scaleOutX":Nx,"animation.scaleInY":Tx,"animation.scaleOutY":Lx,"animation.waveIn":zx,"animation.fadeIn":Cx,"animation.fadeOut":jx,"animation.zoomIn":Wx,"animation.zoomOut":Hx,"animation.pathIn":Vx,"animation.morphing":Dx,"animation.growInX":Gx,"animation.growInY":qx,"interaction.elementHighlight":r5,"interaction.elementHighlightByX":i5,"interaction.elementHighlightByColor":a5,"interaction.elementSelect":s5,"interaction.elementSelectByX":l5,"interaction.elementSelectByColor":c5,"interaction.fisheye":f5,"interaction.chartIndex":u5,"interaction.tooltip":w5,"composition.spaceLayer":_5,"composition.spaceFlex":S5,"composition.mark":A5,"composition.view":E5,"composition.facetRect":B5,"composition.repeatMatrix":H5,"composition.facetCircle":X5,"composition.timingKeyframe":$5,"labelTransform.hideOverlap":m4,"labelTransform.dodgeY":b4,"labelTransform.spider":x4,"labelTransform.surround":w4},m6)}function b6(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function x6(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||cf("Unknown Component: "+t)};return[t=>{var e=t["type"],t=K(t,["type"]);return r(e)(Object.assign({},t))},r]}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(Bo=g6=g6||{}).BEFORE_RENDER="beforerender",Bo.AFTER_RENDER="afterrender",Bo.BEFORE_PAINT="beforepaint",Bo.AFTER_PAINT="afterpaint",Bo.BEFORE_CHANGE_DATA="beforechangedata",Bo.AFTER_CHANGE_DATA="afterchangedata",Bo.BEFORE_CLEAR="beforeclear",Bo.AFTER_CLEAR="afterclear",Bo.BEFORE_DESTROY="beforedestroy",Bo.AFTER_DESTROY="afterdestroy",Bo.BEFORE_CHANGE_SIZE="beforechangesize",Bo.AFTER_CHANGE_SIZE="afterchangesize";o=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),r=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),a=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),e=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Go=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),_a=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Wo=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ab=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Ho=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),hc=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function w6(t,e,n){(t.prototype=e.prototype=n).constructor=t}function M6(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function k6(){}var O6=1/.7,n="\\s*([+-]?\\d+)\\s*",Do="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_6=/^#([0-9a-f]{3,8})$/,S6=new RegExp(`^rgb\\(${n},${n},${n}\\)$`),E6=new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`),A6=new RegExp(`^rgba\\(${n},${n},${n},${Do}\\)$`),P6=new RegExp(`^rgba\\(${ta},${ta},${ta},${Do}\\)$`),N6=new RegExp(`^hsl\\(${Do},${ta},${ta}\\)$`),T6=new RegExp(`^hsla\\(${Do},${ta},${ta},${Do}\\)$`),L6={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function C6(){return this.rgb().formatHex()}function j6(){return this.rgb().formatRgb()}function F6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=_6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?I6(e):3===n?new z6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?R6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?R6(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=S6.exec(t))?new z6(e[1],e[2],e[3],1):(e=E6.exec(t))?new z6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=A6.exec(t))?R6(e[1],e[2],e[3],e[4]):(e=P6.exec(t))?R6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=N6.exec(t))?Y6(e[1],e[2]/100,e[3]/100,1):(e=T6.exec(t))?Y6(e[1],e[2]/100,e[3]/100,e[4]):L6.hasOwnProperty(t)?I6(L6[t]):"transparent"===t?new z6(NaN,NaN,NaN,0):null}function I6(t){return new z6(t>>16&255,t>>8&255,255&t,1)}function R6(t,e,n,r){return new z6(t=r<=0?e=n=NaN:t,e,n,r)}function B6(t){return(t=t instanceof k6?t:F6(t))?new z6((t=t.rgb()).r,t.g,t.b,t.opacity):new z6}function D6(t,e,n,r){return 1===arguments.length?B6(t):new z6(t,e,n,null==r?1:r)}function z6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function W6(){return"#"+q6(this.r)+q6(this.g)+q6(this.b)}function H6(){var t=V6(this.opacity);return(1===t?"rgb(":"rgba(")+G6(this.r)+`, ${G6(this.g)}, `+G6(this.b)+(1===t?")":`, ${t})`)}function V6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function G6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function q6(t){return((t=G6(t))<16?"0":"")+t.toString(16)}function Y6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new X6(t,e,n,r)}function U6(t){var e,n,r,i,a,o,s,l;return t instanceof X6?new X6(t.h,t.s,t.l,t.opacity):(t=t instanceof k6?t:F6(t))?t instanceof X6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new X6(o,s,l,t.opacity)):new X6}function X6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $6(t){return(t=(t||0)%360)<0?t+360:t}function Z6(t){return Math.max(0,Math.min(1,t||0))}function K6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}w6(k6,F6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:C6,formatHex:C6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return U6(this).formatHsl()},formatRgb:j6,toString:j6}),w6(z6,D6,M6(k6,{brighter(t){return t=null==t?O6:Math.pow(O6,t),new z6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new z6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new z6(G6(this.r),G6(this.g),G6(this.b),V6(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:W6,formatHex:W6,formatHex8:function(){return"#"+q6(this.r)+q6(this.g)+q6(this.b)+q6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:H6,toString:H6})),w6(X6,function(t,e,n,r){return 1===arguments.length?U6(t):new X6(t,e,n,null==r?1:r)},M6(k6,{brighter(t){return t=null==t?O6:Math.pow(O6,t),new X6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new X6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new z6(K6(240<=t?t-240:120+t,n,e),K6(t,n,e),K6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new X6($6(this.h),Z6(this.s),Z6(this.l),V6(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(){var t=V6(this.opacity);return(1===t?"hsl(":"hsla(")+$6(this.h)+`, ${100*Z6(this.s)}%, ${100*Z6(this.l)}%`+(1===t?")":`, ${t})`)}}));const J6=Math.PI/180,Q6=180/Math.PI;var t8=1.78277,e8=-.29227,n8=-.90649,r8=1.97294,i8=r8*n8,a8=r8*t8,o8=t8*e8- -.14861*n8;function s8(t,e,n,r){return 1===arguments.length?(i=t)instanceof l8?new l8(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof z6?i:B6(i)).r/255,o=i.g/255,l=i.b/255,l=(r8*(o-(a=(o8*l+i8*a-a8*o)/(o8+i8-a8)))-e8*(o=l-a))/n8,new l8((l=(s=Math.sqrt(l*l+o*o)/(r8*a*(1-a)))?Math.atan2(l,o)*Q6-120:NaN)<0?l+360:l,s,a,i.opacity)):new l8(t,e,n,null==r?1:r);var i,a,o,s,l}function l8(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}w6(l8,s8,M6(k6,{brighter(t){return t=null==t?O6:Math.pow(O6,t),new l8(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new l8(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*J6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new z6(255*(e+n*(-.14861*r+t8*t)),255*(e+n*(e8*r+n8*t)),255*(e+r8*r*n),this.opacity)}}));var c8=t=>()=>t;function u8(e,n){return function(t){return e+t*n}}function f8(a){return 1==(a=+a)?h8:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):c8(isNaN(t)?e:t);var n,r,i}}function h8(t,e){var n=e-t;return n?u8(t,n):c8(isNaN(t)?e:t)}!function t(e){var o=f8(e);function n(e,t){var n=o((e=D6(e)).r,(t=D6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=h8(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);d8=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var d8,p8=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=D6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=d8(r),i=d8(i),a=d8(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function y8(s){return function t(o){function e(e,t){var n=s((e=s8(e)).h,(t=s8(t)).h),r=h8(e.s,t.s),i=h8(e.l,t.l),a=h8(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}y8(function(t,e){var n=e-t;return n?u8(t,180<n||n<-180?n-360*Math.round(n/360):n):c8(isNaN(t)?e:t)});var Vo=y8(h8),aa=t=>p8(t[t.length-1]),sa=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),oa=aa(sa),ca=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),c=aa(ca),la=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),ua=aa(la),Ve=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),ha=aa(Ve),ya=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),da=aa(ya),u=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),zo=aa(u),ga=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),pa=aa(ga),Ro=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),qo=aa(Ro),fa=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),ba=aa(fa),Uo=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),Xo=aa(Uo),Qo=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),Bo=aa(Qo),n=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),ta=aa(n),Do=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),g8=aa(Do),m8=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),v8=aa(m8),b8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),x8=aa(b8),w8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),M8=aa(w8),k8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),O8=aa(k8),_8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),S8=aa(_8),E8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),A8=aa(E8),P8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),N8=aa(P8),T8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),L8=aa(T8),C8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),j8=aa(C8),F8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),I8=aa(F8),R8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),B8=aa(R8),D8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),z8=aa(D8),W8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),H8=aa(W8),V8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),aa=aa(V8);var G8=Vo(s8(300,.5,0),s8(-240,.5,1)),q8=Vo(s8(-100,.75,.35),s8(80,1.5,.8)),Vo=Vo(s8(260,.75,.35),s8(80,1.5,.8)),Y8=s8();var U8=D6(),X8=Math.PI/3,$8=2*Math.PI/3;function Z8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var K8=Z8(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),J8=Z8(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Q8=Z8(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),tO=Z8(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),eO=Object.freeze({__proto__:null,schemeCategory10:o,schemeAccent:r,schemeDark2:a,schemePaired:e,schemePastel1:Go,schemePastel2:_a,schemeSet1:Wo,schemeSet2:Ab,schemeSet3:Ho,schemeTableau10:hc,interpolateBrBG:oa,schemeBrBG:sa,interpolatePRGn:c,schemePRGn:ca,interpolatePiYG:ua,schemePiYG:la,interpolatePuOr:ha,schemePuOr:Ve,interpolateRdBu:da,schemeRdBu:ya,interpolateRdGy:zo,schemeRdGy:u,interpolateRdYlBu:pa,schemeRdYlBu:ga,interpolateRdYlGn:qo,schemeRdYlGn:Ro,interpolateSpectral:ba,schemeSpectral:fa,interpolateBuGn:Xo,schemeBuGn:Uo,interpolateBuPu:Bo,schemeBuPu:Qo,interpolateGnBu:ta,schemeGnBu:n,interpolateOrRd:g8,schemeOrRd:Do,interpolatePuBuGn:v8,schemePuBuGn:m8,interpolatePuBu:x8,schemePuBu:b8,interpolatePuRd:M8,schemePuRd:w8,interpolateRdPu:O8,schemeRdPu:k8,interpolateYlGnBu:S8,schemeYlGnBu:_8,interpolateYlGn:A8,schemeYlGn:E8,interpolateYlOrBr:N8,schemeYlOrBr:P8,interpolateYlOrRd:L8,schemeYlOrRd:T8,interpolateBlues:j8,schemeBlues:C8,interpolateGreens:I8,schemeGreens:F8,interpolateGreys:B8,schemeGreys:R8,interpolatePurples:z8,schemePurples:D8,interpolateReds:H8,schemeReds:W8,interpolateOranges:aa,schemeOranges:V8,interpolateCividis:function(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-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:G8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Y8.h=360*t-100,Y8.s=1.5-1.5*e,Y8.l=.8-.9*e,Y8+""},interpolateWarm:q8,interpolateCool:Vo,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,U8.r=255*(e=Math.sin(t))*e,U8.g=255*(e=Math.sin(t+X8))*e,U8.b=255*(e=Math.sin(t+$8))*e,U8+""},interpolateTurbo:function(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-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:K8,interpolateMagma:J8,interpolateInferno:Q8,interpolatePlasma:tO});function nO(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function rO(t,e,n,r,i){var a=t[0],t=t[1],o=j();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function iO(t,e,n,r,i){var a=new Zp({range:[e,e+r]}),o=new Zp({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function aO(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function oO(t,e,n,r,i){return t[0]}function sO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Zp({range:[s,t]}),c=new Zp({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=nO(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function lO(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function cO(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return yO.apply(void 0,gO([[-1,-1]],e,!1))}function uO(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return yO.apply(void 0,gO([[-1,1]],e,!1))}function fO(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return yO.apply(void 0,gO([[1,-1]],e,!1))}function hO(t,e,n,r,i){var a,t=t[0],o=j();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function dO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Zp({range:[s,s+.99*l]}),f=new Zp({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=nO(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function pO(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Zp({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Kp({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var yO=function(t,e,n,r,i){var a=t[0],t=t[1],o=j();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},gO=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function mO(t){return 1/Math.tan(t)}function vO(t,e,n,r,i){var a=mO(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function bO(t,e,n,r,i){var a=mO(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function xO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function wO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function MO(t,e,n){return n?new Zp({range:[0,1],domain:[0,e]}).map(t):t}function kO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=MO(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[xO(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[wO(e,s,o,0,1),t]}}}function OO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=MO(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],xO(t[1],s,o,0,1)]},untransform:function(t){return[t[0],wO(t[1],s,o,0,1)]}}}function _O(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=MO(a,r,t=void 0!==t&&t),u=MO(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[xO(e,c,s,0,1),xO(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[wO(e,c,s,0,1),wO(t,u,l,0,1)]}}}function SO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Zp({range:[0,r]}),u=new Zp({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=xO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=wO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var EO=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},AO=(PO.prototype.update=function(t){this.options=I({},this.options,t),this.recoordinate()},PO.prototype.clone=function(){return new PO(this.options)},PO.prototype.getOptions=function(){return this.options},PO.prototype.clear=function(){this.update({transformations:[]})},PO.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},PO.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},PO.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:EO(EO([],n,!0),[EO([],t,!0)],!1)}),this},PO.prototype.map=function(t){return this.output(t)},PO.prototype.invert=function(t){return this.input(t)},PO.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},PO.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?EO([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(EO([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Xs,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Xs}.apply(void 0,a)},PO.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=j();return e&&t.reverse(),t.forEach(function(t){return z(p,p,t)}),e&&(e=t=p,(d=new O(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return Tt(t,t,p),[t[0],t[1]]}},PO);function PO(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:iO,translate:rO,custom:aO,matrix:oO,polar:sO,transpose:lO,scale:yO,"shear.x":vO,"shear.y":bO,reflect:cO,"reflect.x":uO,"reflect.y":fO,rotate:hO,helix:dO,parallel:pO,fisheye:_O,"fisheye.x":kO,"fisheye.y":OO,"fisheye.circular":SO},this.update(t)}function NO(t){return void 0!==t.find(t=>"polar"===t.type)}function TO(t){return void 0!==t.find(t=>"helix"===t.type)}function LO(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function CO(t){return void 0!==t.find(t=>"theta"===t.type)}function jO(t){return void 0!==t.find(t=>"radial"===t.type)}function FO(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:"string"==typeof i?"linear":2<(r||i||[]).length?zO(t):void 0===r?VO(e)?zO(t):GO(e)?"time":WO(t,i):VO([r])?zO(t):GO(e)?"time":WO(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)ff(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return HO(e);case"quantile":return function(t){return HO(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)ff(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Ep,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:CO(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Ls(e),i=eO["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=DO(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return DO(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function IO(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(RO)?Wc(e):t.every(BO)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function RO(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function BO(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function DO(t,e,n,r,i){var[i]=x6("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r,offset:a}=e;return function(t,n,r=t=>t){if(!t)return null;const e=Ls(t),i=eO["scheme"+e],a=eO["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a)||i({type:r||t})}function zO(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function WO(t,e){return"color"!==t||e?"linear":"sequential"}function HO(t){return Array.from(new Set(t.flat()))}function VO(t){return qO(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function GO(t){return qO(t,t=>t instanceof Date)}function qO(t,e){for(const n of t)if(n.some(e))return!0;return!1}function YO(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=K(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function UO(t,i,a){return ne(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=x6("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=K(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ne(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),lf)}([K(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?W1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function XO(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function $O(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=z1(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return ff(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function ZO(t,e,n){var r=e["encode"];return r?(r=z1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function KO(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=x6("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=z1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function JO(l,t,e){var n,r=t["encode"],i=K(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=K(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function QO(t,e,n){const{axis:r={},legend:i={}}=e,a=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var o="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return I(e,{scale:Object.assign(Object.assign({},Object.fromEntries(o.map(t=>[t,{guide:a(r,t)}]))),{color:{guide:a(i,"color")},size:{guide:a(i,"size")}})}),[t,e]}function t_(t,e,n){var r=e["animate"];return r||void 0===r||I(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function e_(s,l,c){return ne(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ne(this,void 0,void 0,function*(){var t=c["library"],[t]=x6("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[YO,UO,XO,$O,ZO,KO,JO,t_,QO,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=Xc(Object.entries(n).filter(([,t])=>ff(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=K(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function n_(t,e,n){var r,{component:e=[],coordinates:i=[],title:a,theme:o}=e,[,s]=x6("component",n),n=t.filter(({guide:t})=>null!==t),l=[...e];a&&(t=s("title")["props"],{defaultPosition:e,defaultOrder:t,defaultSize:r}=t,o=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(I({size:r},o,r="string"==typeof a?{text:a}:a)),l.push(Object.assign({type:"title",position:e,order:t,size:o},r)));for(const b of n){var c=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return LO(e)&&NO(e)||TO(e)||CO(e)?null:t.startsWith("x")?LO(e)?"axisY":"axisX":t.startsWith("y")?LO(e)?"axisX":"axisY":t.startsWith("position")&&!NO(e)?"axisY":null}(b,i);if(null!==c){var u=s(c)["props"],{defaultPosition:f,defaultSize:h,defaultOrder:d}=u,{guide:u,name:p,field:y}=b;for(const x of Array.isArray(u)?u:[u]){var g=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],LO(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&NO(i)&&!LO(i)||"axisY"===e&&NO(i)&&LO(i)||"axisY"===e&&CO(i)||"axisY"===e&&TO(i)||"axisY"===e&&jO(i))return"bottom"===r.position?"arcInner":"arc";if(NO(i)&&("axisX"===e||"axisY"===e))return"arcY";if(jO(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&NO(i)&&"center"===r.position)return"arcCenter"}return n}(p,c,f,x,i),{size:m=h,order:v=d}=x;l.push(Object.assign(Object.assign({title:y},x),{position:g,order:v,size:m,type:c,scale:b}))}}}return l}function r_(t,e,n,r){var[i]=x6("scale",r),[r]=x6("component",r),{scale:a,bbox:o}=t,t=K(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function i_(t,e){var t=function(t,e){var n=Yc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:y=d,marginTop:g=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-g-y,marginLeft:p,marginBottom:y,marginTop:g,marginRight:d,x:s,y:l})}function a_(t,e,n){var I=Yc(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:R,marginLeft:i,marginTop:a,marginBottom:B,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:W}=n,t=t+i,i=r+a,r=n+D,a=R+B,H={top:[t,0,s,i,0,!0,jc],right:[W-r,i,r,o,1,!1,jc],bottom:[t,z-a,s,a,0,!1,jc],left:[0,i,t,o,1,!0,jc],centerHorizontal:[t,i,s,o,-1,null,null],centerVertical:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[F,t]of I.entries()){var l=H[F];if("centerHorizontal"===F)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerVertical"===F)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===F){p=d=h=f=u=c=void 0;var c=t,u=l,[f,h,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:f,y:h,width:d,height:p}}else if("arcY"===F){k=M=w=x=b=m=g=v=u=y=void 0;var y=t,u=e,[g,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=o_(u),M=x-w*(v=v/2),k=(w-u)*v;for(let t=0;t<y.length;t++)y[t].bbox={x:b+g,y:M+m,width:0,height:k}}else if("arcInner"===F){N=P=A=E=v=S=_=w=x=O=void 0;var O=t,x=e,[_,S,,w]=w=l,[v,E]=x.getCenter(),[x]=o_(x),A=x*(w=w/2),P=v-A,N=E-A;for(let t=0;t<O.length;t++)O[t].bbox={x:_+P,y:S+N,width:2*A,height:2*A}}else if("arcCenter"===F){Y=q=j=C=G=V=L=E=T=void 0;var T=t,E=e,[L,V,G,C]=L=l,[E]=o_(E),j=C/2*E/Math.sqrt(2),q=L+G/2,Y=V+C/2;for(let t=0;t<T.length;t++)T[t].bbox={x:q-j,y:Y-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,y,g]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[y]:g},e+=b*(s?-1:1)}}(t,l)}}function o_(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function s_(P,N,T,L){return ne(this,void 0,void 0,function*(){const[n]=x6("composition",T);var[t]=x6("interaction",T);const e=new Set(Object.keys(T).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(ff)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[P],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?f_(h,f,T):yield c_(f,T),p=(s.set(h,f),o.push(h),d.flatMap(a));if(c.push(...p),p.every(i)){var y=yield Promise.all(p.map(t=>u_(t,T)));IO(h=(h=y).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),IO(h,"y");for(let t=0;t<p.length;t++){var g=p[t],m=y[t];l.set(g,m)}}}else{d="mark"===r(f)?f:yield m_(f,T),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}var v=P["on"];b6(v,g6.BEFORE_PAINT);const b=new Map,x=[];N.selectAll(w_(C)).data(o,t=>t.key).join(t=>t.append("g").attr("className",C).attr("id",t=>t.key).call(l_).each(function(t){h_(t,Q(this),x,T),b.set(t,this)}),t=>t.call(l_).each(function(t){h_(t,Q(this),x,T)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>ne(this,void 0,void 0,function*(){var[t,e]=yield c_(r,a);h_(t,i,[],a);for(const n of e)s_(n,i,a,o);return{options:r,view:t}})}(Q(e),T,L)}));for(const S of w){const P=S["options"];for(const E of function(t){var{interactions:t=[]}=t;return t}(P))t(E)(S,w)}const{width:M,height:k}=P;var O=[];for(const A of u){var _=new Promise(e=>ne(this,void 0,void 0,function*(){for(const t of A)yield s_(Object.assign({width:M,height:k},t),N,T,L);e()}));O.push(_)}L.animations=x,b6(v,g6.AFTER_PAINT);v=x.filter(ff).map(y_).map(t=>t.finished);return Promise.all([...v,...O])})}function l_(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function c_(t,e){return ne(this,void 0,void 0,function*(){return f_(yield u_(t,e),t,e)})}function u_(v,b){return ne(this,void 0,void 0,function*(){var[t]=x6("theme",b);const[i,a]=x6("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(g_(e)),s=new Map,l=[];for(const p of n){var c=yield m_(p,b);l.push(c)}for(const y of yield Promise.all(l.map(r=>ne(this,void 0,void 0,function*(){const{type:t=cf("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=y["type"],f=a(f)["props"],f=yield e_(y,f,b);f&&([f,u]=f,s.set(f,u))}for(const g of Yc(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=g.reduce((t,{scale:e})=>I(t,e),{}),d=g[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(ff)));const v=I({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=g[0]["name"];const m=FO(d,g.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);g.forEach(t=>t.scale=m)}return s})}function f_(t,e,n){var[r]=x6("mark",n);const[i]=x6("scale",n);var a,o,[s]=x6("theme",n),{key:l,frame:c=!1,theme:u,style:f={}}=e,s=s(g_(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=n_(Array.from(u),e,n),h=i_(u,e),d=function(t,e,n){var[n]=x6("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new AO(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(h,e,n),e=c?I({mainlineWidth:1,mainStroke:"#000"},f):f,p=(a_(u,d,h),{}),y=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:M}=a;var{index:g,channels:m}=o,v=z1(Object.fromEntries(m.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[lf,lf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,v);const k=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(m,v),[O,_,S]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>ff(t)&&ff(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(g,v,k,d));m=x||O.length;const E=w?w(_,m,h):[];g=O.map((t,e)=>{var n={points:_[e],transform:E[e],index:t,markKey:M};for(const[r,i]of Object.entries(k))n[r]=i[t],S&&(n["series"+Ls(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),m=(o.data=g,o.index=O,null==b?void 0:b(g,v,h));y.push(...m||[])}return[{layout:h,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},y]}function h_(U,X,$,Z){ne(this,void 0,void 0,function*(){const{components:I,theme:n,layout:t,markState:e,coordinate:r,key:i,style:R}=U,{width:B,height:D}=t,z=K(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,l,c=a.map((t,e)=>e);const u=a.map(t=>hf(Object.assign({},n,R),t)),W=["a","margin","padding","inset"].map(t=>J(z,t)),f=t=>t.style("x",t=>g[t].x).style("y",t=>g[t].y).style("width",t=>g[t].width).style("height",t=>g[t].height).each(function(t){var e,n,r=Q(this),t=u[t];for([e,n]of Object.entries(t))r.style(e,n)});let h=0,d=0,p=B,y=D;const g=c.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return h+=t,d+=e,p-=t+r,y-=e+n,{x:h,y:d,width:p,height:y}}),m=(X.selectAll(w_(at)).data(c.filter(t=>ff(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(f),t=>t.call(f),t=>t.remove()),X.selectAll(w_(rt)).data(I,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>r_(t,r,n,Z)),t=>t.each(function(t){var t=r_(t,r,n,Z)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const k of i){var{updateType:p=a,updateDuration:y=o,updateDelay:g=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:M=f}=k;void 0!==p&&!p||(e=Math.max(e,y+g),n=Math.min(n,g)),void 0!==M&&!M||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),v=X.selectAll(w_(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(v_).call(x_,Array.from(e.keys())),t=>t.call(x_,Array.from(e.keys())).call(t=>{if(!m)return v_(t);{const[l,c]=m;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}})).transitions();$.push(...v.flat());for([o,s]of e.entries()){var H=s["data"];const{key:i,class:_}=o,S=function(l,t,e,n){const[c]=x6("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:y,style:g={}}=l;return(t,e)=>{var{shape:n=f}=g,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=K(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:y,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=z1(g,t=>d_(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:b_(l,n)}))(r,t,p,d,h)}}(o,s,U,Z),E=(b=o,l=s,p_("enter",b,l,U,Z)),A=(b=o,l=s,p_("update",b,l,U,Z)),P=(b=o,l=s,p_("exit",b,l,U,Z));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,_,"element");const v=X.select("#"+i).selectAll(w_(et)).selectFacetAll(b).data(H,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return E(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=S(t,e),s=A(t,[this],[o]);return null===s&&uf(this,o),s})}),t=>t.transition(function(t){return P(t,[this])}).remove(),t=>t.append(S).attr("className",et).transition(function(t){var e=this["__fromElements__"],t=A(t,e,[this]);return new C1(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new C1([],this.__toData__,this.parentNode).append(S).attr("className",et).nodes();return A(t,[this],e)}).remove()).transitions();$.push(...v.flat())}{var x=U,w=X,M=Z,k,O;const[N]=x6("labelTransform",M),{markState:V,labelTransform:T}=x,G=w.select(w_(tt)).node(),L=new Map,C=new Map,q=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=x6("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=z1(K(t,["formatter"]),t=>d_(t,r,e,l)),{shape:a=c,text:o}=t,t=K(t,["shape","text"]),i="string"==typeof i?ox(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,x,M),a=w.select("#"+r).selectAll(w_(et)).nodes();return n.flatMap((e,n)=>{const r=K(e,["transform"]);return a.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:a,key:o,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:o+"-"+r,bounds:l,index:s,points:a})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(c):c}(r,n,t);return t.forEach(t=>{L.set(t,i),C.set(t,e)}),t})})}),j=Q(G).selectAll(w_(it)).data(q,t=>t.key).join(t=>t.append(t=>L.get(t)(t)).attr("className",it),t=>t.each(function(t){uf(this,L.get(t)(t))}),t=>t.remove()).nodes(),Y=Yc(j,t=>C.get(t.__data__)),F=x["coordinate"];for([k,O]of Y){var{transform:k=[]}=k;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),lf)})(k.map(N))(O,F)}T&&T(j,F)}})}function d_(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function p_(o,t,e,n,r){var[,i]=x6("shape",r);const[s]=x6("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Ls(o)}Animation`;const{[e]:c}=i(b_(t,r)).props,{[o]:u={}}=a,f=J(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function y_(t){return t.finished.then(()=>{t.cancel()}),t}function g_(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function m_(r,i){return ne(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=K(r,["data"]);return null==e?r:([,{data:e}]=yield UO(0,{data:e},t),Object.assign({data:e},n))})}function v_(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function b_(t,e){t=t.type;return t+"."+e}function x_(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(w_(k)).data(e,t=>t.key).join(t=>t.append("g").attr("className",k).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(w_(tt)).node()||t.append("g").attr("className",tt)}function w_(...t){return t.map(t=>"."+t).join("")}function M_(t){for(var t=I({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function k_(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=M_(t),{canvas:l=(u=r,f=i,h=new v.Renderer,h.registerPlugin(new os),new F.Canvas({width:u,height:f,container:document.createElement("div"),renderer:h})),library:c=v6()}=e;var u,f,h;e.canvas=l,e.library=c,a&&!e.bindAutoFit&&([u,f={}]=[t,e],u.autoFit&&window.addEventListener("resize",__(u,f)),e.bindAutoFit=!0),l.resize(r,i),b6(o,g6.BEFORE_RENDER);const d=Q(l.document.documentElement);return l.ready.then(()=>s_(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>b6(o,g6.AFTER_RENDER)),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h}function O_(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",__(i,t)),(e=r)&&(n?delete e[n]:e={})}const __=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=mf(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&k_(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,l};function S_(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class p{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return S_(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return S_(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function E_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function A_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function P_(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function N_(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?hs(e)?n.concat(e):n.push(e):r[t]=hs(e)?e:[e],this.attr(i,r))}}function y(r){return t=>{for(const n of r){var e=n["type"];"value"===e?E_(t,n):"array"===e?A_(t,n):"object"===e?P_(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&N_(t,n)}return t}}function T_(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}o=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"}];let L_=class extends p{constructor(){super({},"interval")}},C_=(L_=t([y(o)],L_),class extends p{constructor(){super({},"rect")}}),j_=(C_=t([y(o)],C_),class extends p{constructor(){super({},"point")}}),F_=(j_=t([y(o)],j_),class extends p{constructor(){super({},"area")}}),I_=(F_=t([y(o)],F_),class extends p{constructor(){super({},"line")}}),R_=(I_=t([y(o)],I_),class extends p{constructor(){super({},"cell")}}),B_=(R_=t([y(o)],R_),class extends p{constructor(){super({},"vector")}}),D_=(B_=t([y(o)],B_),class extends p{constructor(){super({},"link")}}),z_=(D_=t([y(o)],D_),class extends p{constructor(){super({},"polygon")}});z_=t([y(o)],z_);r=t([y(o)],class extends p{constructor(){super({},"image")}});let W_=class extends p{constructor(){super({},"text")}},H_=(W_=t([y(o)],W_),class extends p{constructor(){super({},"box")}}),V_=(H_=t([y(o)],H_),class extends p{constructor(){super({},"lineX")}}),G_=(V_=t([y(o)],V_),class extends p{constructor(){super({},"lineY")}}),q_=(G_=t([y(o)],G_),class extends p{constructor(){super({},"range")}}),Y_=(q_=t([y(o)],q_),class extends p{constructor(){super({},"rangeX")}}),U_=(Y_=t([y(o)],Y_),class extends p{constructor(){super({},"rangeY")}}),X_=(U_=t([y(o)],U_),class extends p{constructor(){super({},"connector")}}),$_=(X_=t([y(o)],X_),class extends p{constructor(){super({},"shape")}}),Z_=($_=t([y(o)],$_),class extends p{constructor(){super({},"sankey")}}),K_=(Z_=t([y([...o,{name:"layout",type:"value"}])],Z_),class extends p{constructor(){super({},"treemap")}}),J_=(K_=t([y([...o,{name:"layout",type:"value"}])],K_),class extends p{constructor(){super({},"boxplot")}}),Q_=(J_=t([y(o)],J_),class extends p{constructor(){super({},"pack")}}),tS=(Q_=t([y([...o,{name:"layout",type:"value"}])],Q_),class extends p{constructor(){super({},"forceGraph")}}),eS=(tS=t([y([...o,{name:"layout",type:"value"}])],tS),class extends p{constructor(){super({},"tree")}}),nS=(eS=t([y([...o,{name:"layout",type:"value"}])],eS),class extends p{constructor(){super({},"wordCloud")}});nS=t([y([...o,{name:"layout",type:"object"}])],nS);a={interval:L_,rect:C_,point:j_,area:F_,line:I_,cell:R_,vector:B_,link:D_,polygon:z_,image:r,text:W_,box:H_,lineX:V_,lineY:G_,range:q_,rangeX:Y_,rangeY:U_,connector:X_,sankey:Z_,treemap:K_,boxplot:J_,shape:$_,pack:Q_,forceGraph:tS,tree:eS,wordCloud:nS};let rS=class extends p{constructor(){super({},"view")}},iS=(rS=t([y([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...T_(a)])],rS),class extends p{constructor(){super({},"spaceLayer")}}),aS=(iS=t([y([{type:"value",name:"data"},...T_(a)])],iS),class extends p{constructor(){super({},"spaceFlex")}}),oS=(aS=t([y([{type:"value",name:"data"},...T_(a)])],aS),class extends p{constructor(){super({},"facetRect")}}),sS=(oS=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...T_(a)])],oS),class extends p{constructor(){super({},"facetCircle")}}),lS=(sS=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...T_(a)])],sS),class extends p{constructor(){super({},"repeatMatrix")}}),cS=(lS=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...T_(a)])],lS),class extends p{constructor(){super({},"timingKeyframe")}}),uS=(cS=t([y([...T_(a)])],cS),class extends p{constructor(){super({},"geoView")}}),fS=(uS=t([y([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...T_(a)])],uS),class extends p{constructor(){super({},"geoPath")}});fS=t([y([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...T_(a)])],fS);var hS={view:rS,spaceLayer:iS,spaceFlex:aS,facetRect:oS,facetCircle:sS,repeatMatrix:lS,timingKeyframe:cS,geoView:uS,geoPath:fS};for(const yS of Object.values(hS))y(T_(hS))(yS);const dS=v6();function pS(t){return Object.assign(Object.assign({},t.value),{type:t.type})}e=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...T_(a),...Object.entries(hS).map(([t,e])=>({type:"container",name:t,ctor:e}))];g.Chart=class extends p{constructor(t={}){var e=t["container"];super(K(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:dS}}render(){this._context.canvas||({width:r=640,height:a=480,renderer:o,plugins:t,autoFit:e}=this.options(),{width:e,height:n}=mf(this._container,e,r,a),this.width(e),this.height(n),this._context.canvas=([e,n,r,i=new v.Renderer,a=[]]=[document.createElement("div"),r,a,o,t],a.push(new os),a.forEach(t=>i.registerPlugin(t)),new F.Canvas({container:e,width:n,height:r,renderer:i})));var t,e,n,r,i,a,o=k_(this.options(),this._context);return o.parentNode!==this._container&&this._container.append(o),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,pS(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=pS(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];b6(n,g6.BEFORE_DESTROY),O_(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),b6(n,g6.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];b6(e,g6.BEFORE_CLEAR),O_(t,this._context),b6(e,g6.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=mf(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;b6(i,g6.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),b6(i,g6.AFTER_CHANGE_SIZE)}},g.Chart=t([y(e)],g.Chart),g.AREA_CLASS_NAME=at,g.COMPONENT_CLASS_NAME=rt,g.ELEMENT_CLASS_NAME=et,g.LABEL_CLASS_NAME=it,g.LABEL_LAYER_CLASS_NAME=tt,g.MAIN_LAYER_CLASS_NAME=k,g.PLOT_CLASS_NAME=nt,g.VIEW_CLASS_NAME=C,g.createLibrary=v6,g.destroy=O_,g.register=function(t,e){Object.assign(dS,{[t]:e})},g.render=k_,g.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=M_(t),{library:o=v6(),group:s=new F.Group}=e;if(function(t){if(!fs(t)){if(ss(t))return!t.length;var e,n=js(t);if("Map"===n||"Set"===n)return!t.size;if(Is(t))return!Object.keys(t).length;for(e in t)if(Vs.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=Q(s);return e.group=s,e.library=o,b6(a,g6.BEFORE_RENDER),s_(Object.assign(Object.assign({},t),{width:r,height:i}),l,o,e).then(n).then(()=>b6(a,g6.AFTER_RENDER)),s},Object.defineProperty(g,"__esModule",{value:!0})});
|
|
7
|
+
`}([h,d,f,s]))}c-=u,l+=1}return o}function Lw(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Tw(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function Pw(t){var e,t=N.convertToPath(t);if(t&&(Tw(e=t,"m")&&Tw(e,"M")))return t}function Cw(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=Pw(e),y=Pw(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,h]=Ew(i=e),[c,u,f,a]=(Lw(p,i),Ew(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},bw(i,xw)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},bw(p,xw))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(Lw(u=new N.Path({style:Object.assign(Object.assign({},bw(l,xw)),{d:c})}),l),u),f=[Object.assign({path:g},bw(e,xw)),Object.assign({path:y},bw(n,xw))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}Sw.props={};const jw=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:Aw,i=mw(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Cw(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Cw(t,new N.Path({style:Object.assign({path:d[e]},bw(l,xw))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Cw(t,t,new N.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},Nw=(jw.props={},b=>{return N.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:N.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!vu(r))return ww(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:e=0,inset:s=0,fillOpacity:l,strokeOpacity:c,opacity:u}=e,{points:t,y:f,y1:h}=t;const d=d1().cornerRadius(e).padAngle(s*Math.PI/180),p=rg(r,t,[f,h]),{startAngle:g,endAngle:y}=p,m=new N.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=N.convertToPath(m);return m.style.transform="none",t};e=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:c,opacity:u,offset:.01},{waveInArcAngle:y,fillOpacity:l,strokeOpacity:c,opacity:u}],s=a.animate(e,mw(i,n,b));return s.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},s.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},s}}),Bw=(Nw.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,mw(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Fw=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,mw(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Rw=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],mw(i,n,o))},Iw=(Rw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new N.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=ww(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),Dw=(Iw.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new N.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Mw(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function zw(t){return nt(t).selectAll("."+it).nodes().filter(t=>!t.__removed__)}function Ww(t,e){return Gw(t,e).flatMap(({container:t})=>zw(t))}function Gw(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key)}function Hw(t){return nt(t).select("."+at).node()}function qw(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function Vw(t,e){var{offsetX:e,offsetY:n}=e,[t,r,i,a]=function(t){var t=t.getRenderBounds(),{min:[t,e],max:[n,r]}=t;return[t,e,n,r]}(t);return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function Yw(t){return t=>t.__data__.color}function $w(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Uw(t){t=Array.isArray(t)?t:[t];const r=new Map(t.flatMap(e=>{return Array.from(e.markState.keys()).map(t=>[e.key+","+t.key,t.data])}));return t=>{var{index:t,markKey:e,viewKey:n}=t.__data__;return r.get(n+","+e)[t]}}function Xw(o,s=(t,e)=>t,l=(t,e,n)=>t.setAttribute(e,n)){const c="__states__",u="__ordinal__",i=t=>{var{[c]:e=[],[u]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),o[e]),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);l(t,r,i),r in n||(n[r]=a)}t[u]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function Kw(t,e){var n=(Array.isArray(t)?t:[t]).flatMap(e=>e.marks.map(t=>[e.key+","+t.key,t.state])),r={};for(const i of e){const[l,c]=Array.isArray(i)?i:[i,{}];r[l]=n.reduce((t,e)=>{const[a,n={}]=e;e=void 0===(e=n[l])||"object"==typeof e&&0===Object.keys(e).length?c:n[l];for(const[r,o]of Object.entries(e)){const s=t[r];t[r]=(t,e,n,r)=>{var i=r.__data__.viewKey+","+r.__data__.markKey;return a!==i?null===s||void 0===s?void 0:s(t,e,n,r):"function"!=typeof o?o:o(t,e,n,r)}}return t},{})}return r}function Zw(t,r){const i=new Map(t.map((t,e)=>[t,e])),a=r?t.map(r):t;return(t,e)=>{var n;return"function"!=typeof t?t:(n=i.get(e),t(r?r(e):e,n,a,e))}}function Qw(t){var{link:e=!1,valueof:l=(t,e)=>t}=t,c=J(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];const u=t=>t.__data__.points;return[t=>{if(!(t.length<=1)){var e=Yc(t,(t,e)=>{t=t.__data__.x,e=e.__data__.x;return t-e});for(let t=1;t<e.length;t++){var n=a1();const s=e[t-1];var r=e[t],[r,i,a,o]=((t,e)=>{var[,t,n]=t,[e,,,r]=e;return[t,e,r,n]})(u(s),u(r)),r=(n.moveTo(...r),n.lineTo(...i),n.lineTo(...a),n.lineTo(...o),n.closePath(),U1(c,t=>l(t,s))),{fill:i=s.getAttribute("fill")}=r,a=J(r,["fill"]),o=new N.Path({className:"element-link",style:Object.assign({d:n.toString(),fill:i,zIndex:-2},a)});null!=(r=s.link)&&r.remove(),s.parentNode.appendChild(o),s.link=o}}},t=>{var e;null!=(e=t.link)&&e.remove(),t.link=null}]}function Jw(n,t,e){var r,i,a,o=t=>{var e=n.style["transform"];return e?e+" "+t:t};return vu(e)?(a=n.__data__["points"],[a,i]=mu(e)?ng(a):a,r=W1(a,a=e.getCenter()),i=W1(i,a),a=H1(r)+V1(r,i)/2,o(`translate(${t*Math.cos(a)}, ${t*Math.sin(a)})`)):mu(e)?o(`translate(${t}, 0)`):o(`translate(0, ${-t})`)}function t5(t){var{background:e,scale:o,coordinate:s,valueof:l}=t,c=J(t,["background","scale","coordinate","valueof"]);const u="element-background";if(!e)return[()=>{},()=>{}];const r=(t,e,n)=>{var r=t.invert(e),e=e+t.getBandWidth(r)/2,t=t.getStep(r)/2,r=t*n;return[e-t+r,e+t-r]},f=(t,e)=>{var n=o["x"];return sw(n)?(t=t["__data__"],t=t["x"],[n,t]=r(n,t,e),[n,t]):[0,1]},h=(t,e)=>{var n=o["y"];return sw(n)?(t=t["__data__"],t=t["y"],[n,t]=r(n,t,e),[n,t]):[0,1]},d=(t,e)=>{var n=e["padding"],[r,i]=f(t,n),[n,a]=h(t,n),t=t["__data__"],{y:t,y1:o}=t;return sg([[r,n],[i,n],[i,a],[r,a]].map(t=>s.map(t)),{y:t,y1:o},s,e)},p=(t,e)=>{var n,r,{transform:i="scale(1.2, 1.2)",transformOrigin:a="center center",stroke:o=""}=e,e=J(e,["transform","transformOrigin","stroke"]),i=Object.assign({transform:i,transformOrigin:a,stroke:o},e),s=t.cloneNode(!0);for([n,r]of Object.entries(i))s.style[n]=r;return s};return[e=>{e.background&&e.background.remove();var t=U1(c,t=>l(t,e)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:a=.001}=t,t=J(t,["fill","fillOpacity","zIndex","padding"]),t=Object.assign(Object.assign({},t),{fill:n,fillOpacity:r,zIndex:i,padding:a}),n=((()=>{var{x:t,y:e}=o;return[t,e].some(sw)})()?d:p)(e,t);n.className=u,e.parentNode.appendChild(n),e.background=n},t=>{var e;null!=(e=t.background)&&e.remove(),t.background=null},t=>t.className===u]}function e5(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function n5(e,{elements:t,datum:n,groupKey:i=t=>t,link:r=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,state:c={}}){const u=t(e),f=new Set(u),h=Gc(u,i);t=Zw(u,n);const[d,p]=Qw(Object.assign({elements:u,valueof:t,link:r,coordinate:l},et(c.active,"link"))),[g,y,m]=t5(Object.assign({scale:s,coordinate:l,background:a,valueof:t},et(c.active,"background"))),{setState:v,removeState:b,hasState:x}=Xw(tt(c,{active:Object.assign({},(null==(n=c.active)?void 0:n.offset)&&{transform:(...t)=>{var e=c.active.offset(...t),[,t]=t;return Jw(u[t],e,l)}})}),t);let w;const O=t=>{var e=t["target"];if(f.has(e)){w&&clearTimeout(w);var t=i(e),t=h.get(t),n=new Set(t);for(const r of u)n.has(r)?x(r,"active")||v(r,"active"):(v(r,"inactive"),p(r)),r!==e&&y(r);g(e),d(t)}},M=()=>{for(const t of u)b(t,"active","inactive"),y(t),p(t)},k=t=>{t=t.target;a&&!m(t)||(a||f.has(t))&&(0<o?(w&&clearTimeout(w),w=setTimeout(()=>{M(),w=null},o)):M())},_=()=>{M()};return e.addEventListener("pointerover",O),e.addEventListener("pointerout",k),e.addEventListener("pointerleave",_),()=>{e.removeEventListener("pointerover",O),e.removeEventListener("pointerout",k),e.removeEventListener("pointerleave",_);for(const t of u)y(t),p(t)}}function r5(t){var{delay:a,createGroup:o,background:s=!1,link:l=!1}=t,c=J(t,["delay","createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{scale:r,coordinate:i}=e;return n5(Hw(t),Object.assign({elements:zw,datum:Uw(e),groupKey:o?o(e):void 0,coordinate:i,scale:r,state:Kw(n,[["active",s?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:s,link:l,delay:a},c))}}function i5(t){return r5(Object.assign(Object.assign({},t),{createGroup:$w}))}function a5(t){return r5(Object.assign(Object.assign({},t),{createGroup:Yw}))}function o5(e,{elements:t,datum:n,groupKey:c=t=>t,link:u=!1,single:f=!1,coordinate:r,background:i=!1,scale:a,state:o={}}){const h=t(e),d=new Set(h),p=Gc(h,c);t=Zw(h,n);const[g,y]=Qw(Object.assign({link:u,elements:h,valueof:t,coordinate:r},et(o.selected,"link"))),[m,v]=t5(Object.assign({background:i,coordinate:r,scale:a,valueof:t},et(o.selected,"background"))),{setState:b,removeState:s,hasState:x}=Xw(tt(o,{selected:Object.assign({},(null==(n=o.selected)?void 0:n.offset)&&{transform:(...t)=>{var e=o.selected.offset(...t),[,t]=t;return Jw(h[t],e,r)}})}),t),w=()=>{for(const t of h)s(t,"selected","unselected"),y(t),v(t)},l=t=>{t=t.target;if(!d.has(t))return w();if(f){var e=t;if(x(e,"selected"))w();else{var n=c(e),n=p.get(n),r=new Set(n);for(const a of h)r.has(a)?b(a,"selected"):(b(a,"unselected"),y(a)),a!==e&&v(a);g(n),m(e)}}else{n=t;t=c(n),t=p.get(t);const o=new Set(t);if(x(n,"selected")){if(!h.some(t=>!o.has(t)&&x(t,"selected")))return w();for(const s of t)b(s,"unselected"),y(s),v(s)}else{var i=t.some(t=>x(t,"selected"));for(const l of h)o.has(l)?b(l,"selected"):x(l,"selected")||b(l,"unselected");!i&&u&&g(t),m(n)}}};return e.addEventListener("click",l),()=>{e.removeEventListener("click",l);for(const t of h)y(t)}}function s5(t){var{createGroup:a,background:o=!1,link:s=!1}=t,l=J(t,["createGroup","background","link"]);return t=>{var{container:t,view:e,options:n}=t,{coordinate:r,scale:i}=e;return o5(Hw(t),Object.assign({elements:zw,datum:Uw(e),groupKey:a?a(e):void 0,coordinate:r,scale:i,state:Kw(n,[["selected",o?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:o,link:s},l))}}function l5(t){return s5(Object.assign(Object.assign({},t),{createGroup:$w}))}function c5(t){return s5(Object.assign(Object.assign({},t),{createGroup:Yw}))}function u5(t){var{wait:k=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=J(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Yc(t.map(t=>d[t])),u=tt({},e),f=u.marks.find(t=>"line"===t.type);t=iu(Hc(t,t=>iu(t,t=>+h[t])/ou(t,t=>+h[t]),t=>l[t]).values());tt(f,{scale:{y:{domain:[1/t,t]}}});const p=Hw(r),g=r.getElementsByClassName(it);const y=Gc(r.getElementsByClassName(st),t=>t.__data__.key.split("-")[0]),m=new N.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},et(A,"rule"))}),v=new N.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},et(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Nc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var O;const M=$s(t=>{t=qw(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[Lc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},k,{leading:_,trailing:S});return O=[0,0],ye(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,O);x(O,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[Lc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function f5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Hw(n),a=tt({},e);for(const s of a.marks)s.animate=!1;const o=$s(t=>{var e,n,t=qw(i,t);t&&([t,e]=t,(n=function(t){var{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);return r||(n.push(r={type:"fisheye"}),e.transform=n,t.coordinate=e,r)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function h5(t,e,n,r){var{tooltipElement:i=function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new Zb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},title:" ",position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r)}=t,{items:e,title:a}=e;i.show(),i.position=[n,r],i.update({items:e,title:a}),t.tooltipElement=i}function d5(t){t=t.tooltipElement;t&&t.hide()}function p5(t){var e=t["tooltipElement"];e&&(e.destroy(),t.tooltipElement=void 0)}function g5(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>df(t)))}function y5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function m5(t){return yf(t)?t:null==t?{value:t}:{value:""+t}}function v5(n,s,l,t=n.map(t=>t.__data__)){e=t.map(t=>t.title),e=new Map(e.map(t=>[t instanceof Date?+t:t,t]));var e=Array.from(e.values()).filter(df),t=t.flatMap((a,t)=>{var t=n[t],e=J(a,["title"]);const o=y5(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=l[t].getOptions(),e=m5(e),{field:r=void 0,color:i=o,name:r=function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof Xp)&&!(t instanceof qp);return i(t)?t.invert(e):i(n)?n.invert(r):null}(l,a)||r||n,value:n}=e,e=J(e,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},e),{name:r,color:i,value:n}),g5(s({channel:t,value:n})))}).filter(({value:t})=>df(t))});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function b5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function x5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function w5(t,e){return void 0===t?e:t}function O5(f,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:h,coordinate:d,crosshairs:p,item:g,startX:y=0,startY:m=0}=t,t=J(t,["elements","wait","leading","trailing","scale","coordinate","crosshairs","item","startX","startY"]),e=e(f);const[,v]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(f),b=[],x=[];for(const l of e){var a=l["__data__"],a=a["seriesX"];(a?b:x).push(l)}const w=new Map(b.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Yc(n.map((t,e)=>e),t=>n[+t]),n]]}));e=x.map((t,e)=>e);const O=x.map(t=>{t=t.__data__;return t.x}),M=Yc(e,t=>O[t]),k=et(t,"crosshairs");e=h.x;const _=null!=e&&e.getBandWidth?e.getBandWidth()/2:0,o=$s(t=>{t=qw(f,t);if(t){var e=f.getBounds(),n=e.min[0],e=e.min[1];const o=[t[0]-y,t[1]-m];o;var r=((t,e,n)=>{var r=e.length;if(0===r)return[];var[t]=d.invert(t),t=t-_,i=(0,Lc(t=>n[+t]).center)(e,t);let a=i,o=i;for(;0<a-1&&n[e[a-1]]==n[e[i]];)a--;for(;o+1<r&&n[e[o+1]]===n[e[i]];)o++;return gu(a,o+1).map(t=>e[t])})(o,M,O).map(t=>x[t]),i=b.map(t=>{var[e,n]=w.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Bs(t.replace("series","")),e]}))})(t,((t,e,n)=>{var[t]=d.invert(t);return e[(0,Lc(t=>n[+t]).center)(e,t-_)]})(o,e,n)),{x:e,y:n}=t;return[t,d.map([e+_,n])]}),a=[...i.map(t=>t[0]),...r.map(t=>t.__data__)],r=v5([...b,...r],g,h,a);if(h5(f,r,t[0]+n,t[1]+e),p){a=i.map(t=>t[1]);{var r=f,n=a,{height:e,startX:i,startY:a}=t=Object.assign(Object.assign({},k),{height:v,startX:y,startY:m}),t=J(t,["height","startX","startY"]);const s=(n=hu(n.map(t=>t[0])))+i,l=n+i,c=a,u=e-a;(i=r.ruleY||(n=new N.Line({style:Object.assign({x1:s,x2:l,y1:c,y2:u,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),r.appendChild(n),n)).style.x1=s,i.style.x2=l,i.style.y1=c,i.style.y2=u,r.ruleY=i}}}},n,{leading:r,trailing:i}),s=()=>{d5(f),p&&b5(f)};return f.addEventListener("pointerenter",o),f.addEventListener("pointermove",o),f.addEventListener("pointerleave",s),()=>{f.removeEventListener("pointerover",o),f.removeEventListener("pointerout",o),f.removeEventListener("pointerleave",s),p5(f),p&&b5(f)}}function M5(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=Gc(t,o),u=$s(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,a,o){var e=(n=t["__data__"])["title"],n=J(n,["title"]);const s=y5(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions(),e=m5(e),{field:r=void 0,color:i=s,name:r=r||n,value:n}=e,e=J(e,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},e),{color:i,name:r,value:n}),g5(a({channel:t,value:n})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):v5(n,s,i),{offsetX:t,offsetY:e}=t,h5(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&d5(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f),p5(r)}}function k5(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,g=J(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=x5(a,"seriesTooltip"),l=x5(a,"crosshairs"),n=Hw(n),s=w5(h,s);if(s&&!p)return O5(n,Object.assign(Object.assign({},g),{elements:zw,scale:i,coordinate:o,crosshairs:w5(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=Ww(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return O5(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:w5(f,l),item:d,startX:s,startY:t}))}return M5(n,Object.assign(Object.assign({},g),{elements:zw,scale:i,coordinate:o,groupKey:u?$w(r):void 0,item:d}))}}Dw.props={};const _5="legend-category",S5="items-item",E5="legend-category-item-marker",A5="legend-category-item-label";function L5(t){return t.getElementsByClassName(E5)[0]}function T5(t){return t.getElementsByClassName(A5)[0]}function P5(t){return t.getElementsByClassName(S5)}function C5(t){return t.getElementsByClassName(_5)}function j5(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function N5(t){const e=function(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}(t)["data"];t=j5(t).scales[0].name;return[t,{legends:P5,marker:L5,label:T5,datum:t=>{t=t.__data__,t=t.index;return e[t].label}}]}function B5(t,{legends:e,marker:i,label:a,datum:o,filter:n,setAttribute:r,state:s={}}){const l=new Map,c=new Map,u=new Map;var{unselected:s={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=s,f={unselected:et(s,"marker")},s={unselected:et(s,"label")};const{setState:h,removeState:d}=Xw(f,void 0,r),{setState:p,removeState:g}=Xw(s,void 0,r),y=Array.from(e(t)),m=y.map(o),v=()=>{for(const r of y){var t=o(r),e=i(r),n=a(r);(m.includes(t)?(d(e,"unselected"),g):(h(e,"unselected"),p))(n,"unselected")}};for(const O of y){var b=()=>{e5(t,"pointer")},x=()=>{e5(t,"default")},w=()=>ye(this,void 0,void 0,function*(){var t=o(O),e=m.indexOf(t);-1===e?m.push(t):m.splice(e,1),0===m.length&&m.push(...y.map(o)),yield n(m),v()});O.addEventListener("click",w),O.addEventListener("pointerenter",b),O.addEventListener("pointerout",x),l.set(O,w),c.set(O,b),u.set(O,x)}return()=>{for(const t of y)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",u.get(t))}}function F5(t){var s=t["channel"],l=J(t,["channel"]);return t=>{const{container:e,view:i,options:a,update:o}=t;var t=C5(e),t=s?t.find(t=>{t=t.parentNode.__data__;return t.scale.name===s}):t[0],[n,r]=t?N5(t):[null,{}];return n&&(s=n),B5(e,Object.assign(Object.assign(Object.assign({},r),{filter:r=>ye(this,void 0,void 0,function*(){var t=i["scale"];const{[s]:n}=t;t=a.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[s]:r},...e];return tt({},t,{transform:e,scale:{[s]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},a),{marks:t});return o(t)}),state:t.attributes.state}),l))}}function R5(){return t=>{const{container:e,view:n,options:r}=t;t=C5(e);const i=zw(e);var a=Kw(r,["active","inactive"]),o=Zw(i,Uw(n));for(const u of t){const f=t=>{var e=u.attributes["data"],t=t["__data__"],t=t["index"];return e[t].label},h=j5(u).scales[0].name,d=P5(u),p=(t=>{var{scale:{[t]:t}}=n;return t})(h),g=Gc(i,t=>p.invert(t.__data__[h]));var{state:s={}}=u.attributes,{inactive:s={}}=s;const{setState:y,removeState:m}=Xw(a,o);var l={inactive:et(s,"marker")},s={inactive:et(s,"label")};const{setState:v,removeState:b}=Xw(l),{setState:x,removeState:w}=Xw(s),O=t=>{for(const r of d){var e=L5(r),n=T5(r);(r===t||null===t?(b(e,"inactive"),w):(v(e,"inactive"),x))(n,"inactive")}},M=new Map;for(const _ of d){var c=()=>{var t=f(_),e=new Set(g.get(t));for(const n of i)e.has(n)?y(n,"active"):y(n,"inactive");O(_)};_.addEventListener("pointerover",c),M.set(_,c)}const k=()=>{for(const t of i)m(t,"inactive","active");O(null)};return u.addEventListener("pointerleave",k),()=>{u.removeEventListener(k);for(var[t,e]of M)t.removeEventListener(e)}}}}function I5(a,t){var{brushed:i=()=>{},brushended:e=()=>{},brushcreated:o=()=>{},extent:s=function(t){var{width:t,height:e}=t.getBBox();return[0,0,t,e]}(a),brushRegion:l=(t,e,n,r,i)=>[t,e,n,r],reverse:c=!1,fill:n="#777",fillOpacity:r="0.3",stroke:u="#fff"}=t,f=J(t,["brushed","brushended","brushcreated","extent","brushRegion","reverse","fill","fillOpacity","stroke"]);let h=null,d=null,p=null,g=null,y=null,m=!1;const[v,b,x,w]=s,O=(e5(a,"crosshair"),a.style.draggable=!0,()=>{y=new N.Path({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,pointerEvents:"none"})}),g=new N.Rect({style:{draggable:!0,fill:"transparent"},className:"mask"}),a.appendChild(y),a.appendChild(g)}),M=()=>{g=new N.Rect({style:Object.assign(Object.assign({},f),{fill:n,fillOpacity:r,stroke:u,draggable:!0}),className:"mask"}),a.appendChild(g)},k=()=>{g&&g.remove(),y&&y.remove(),h=null,d=null,p=null,m=!1,g=null,y=null,e()},_=(t,e)=>{var[t,e,n,r]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,n,r]=l(t,e,n,r,s);return(c?E:S)(t,e,n,r),i(t,e,n,r),[t,e,n,r]},S=(t,e,n,r)=>{g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},E=(t,e,n,r)=>{y.style.d=`
|
|
8
|
+
M${v},${b}L${x},${b}L${x},${w}L${v},${w}Z
|
|
9
|
+
M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
|
|
10
|
+
`,g.style.x=t,g.style.y=e,g.style.width=n-t,g.style.height=r-e},A=t=>{var e=t["target"],[t,n]=Vw(a,t);e===g?p=[t,n]:(((t,e)=>{if(g&&g.remove(),y&&y.remove(),h=[t,e],c)return O();M()})(t,n),m=!0)},L=t=>{var e,n,r,t=Vw(a,t);h&&(p?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-p[0],e=e[1]-p[1],r=n(r,h[0],d[0],v,x),n=n(e,h[1],d[1],b,w),e=[h[0]+r,h[1]+n],r=[d[0]+r,d[1]+n],_(e,r)):_(h,t))},T=t=>{var e,n,r,i;p?(p=null,{x:e,y:r,width:n,height:i}=g.style,h=[e,r],d=[e+n,r+i]):(d=Vw(a,t),[e,n,r,i]=_(h,d),m=!1,o(e,n,r,i))},P=t=>{t=t.target;g&&t!==g&&k()},C=t=>{t=t.target;t!==g||m?e5(a,"crosshair"):e5(a,"move")},j=()=>{e5(a,"default")};return a.addEventListener("dragstart",A),a.addEventListener("drag",L),a.addEventListener("dragend",T),a.addEventListener("click",P),a.addEventListener("pointermove",C),a.addEventListener("pointerleave",j),{mask:g,remove(){g&&k()},destroy(){g&&k(),a.removeEventListener("dragstart",A),a.removeEventListener("drag",L),a.removeEventListener("dragend",T),a.removeEventListener("click",P),a.removeEventListener("pointermove",C),a.removeEventListener("pointerleave",j)}}}function D5(e,t,n){return t.filter(t=>{return t!==e&&({interaction:t={}}=t.options,Object.values(t).find(t=>t.brushKey===n))})}function z5(t,e){var{elements:n,siblings:r=t=>[],datum:i,brushRegion:a,extent:o,reverse:s,series:l=!1,key:d=t=>t,bboxOf:c=t=>{var{x:t,y:e,width:n,height:r}=t.style;return{x:t,y:e,width:n,height:r}},state:u={}}=e,e=J(e,["elements","siblings","datum","brushRegion","extent","reverse","series","key","bboxOf","state"]);const p=n(t),g=r(t),y=g.flatMap(n);r=Zw(p,i),n=et(e,"mask");const{setState:m,removeState:f}=Xw(u,r),h=new Map,{width:v,height:b,x,y:w}=c(t);i=o||[0,0,v,b];return I5(t,Object.assign(Object.assign({},n),{extent:i,brushRegion:a,reverse:s,brushended:l?()=>{for(const t of p)f(t,"inactive");for(const e of h.values())e.remove();h.clear()}:()=>{for(const t of[...p,...y])f(t,"active","inactive")},brushed:l?(t,e,n,r)=>{var i;for(const o of p){var a=h.get(o)||(a=o,i=void 0,(i=a.cloneNode()).__data__=a.__data__,a.parentNode.appendChild(i),h.set(a,i),i);a.style.clipPath=new N.Rect({style:{x:t+x,y:e+w,width:n-t,height:r-e}}),m(o,"inactive"),m(a,"active")}}:(t,e,n,r)=>{var i;for(const u of g)null!=(i=u.brush)&&i.remove();var a=new Set;for(const f of p){var{min:o,max:s}=f.getLocalBounds(),[o,l]=o,[s,c]=s;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([o,l,s,c],[t,e,n,r])?m(f,"inactive"):(m(f,"active"),a.add(d(f)))}for(const h of y)a.has(d(h))?m(h,"active"):m(h,"inactive")}}))}function W5(t){var{facet:h,brushKey:d}=t,p=J(t,["facet","brushKey"]);return(t,e)=>{var n,r,i,a,{container:o,view:s,options:l}=t,o=Hw(o),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},u=["active",["inactive",{opacity:.5}]];if(h)return n=(a=o.getBounds()).min[0],r=a.min[1],i=a.max[0],a=a.max[1],z5(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>Ww(t,e),datum:Uw(Gw(t,e).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,r,i,a],state:Kw(Gw(t,e).map(t=>t.options),u)},c),p));const f=z5(o,Object.assign(Object.assign({elements:zw,key:t=>t.__data__.key,siblings:()=>{return D5(t,e,d).map(t=>Hw(t.container))},datum:Uw([s,...D5(t,e,d).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:Kw([l,...D5(t,e,d).map(t=>t.options)],u)},c),p));return o.brush=f,()=>f.destroy()}}function G5(t,e,n,r,i){var[,i,,a]=i;return[t,i,n,a]}function H5(t){return W5(Object.assign(Object.assign({},t),{brushRegion:G5}))}function q5(t,e,n,r,i){var[i,,a]=i;return[i,e,a,r]}function V5(t){return W5(Object.assign(Object.assign({},t),{brushRegion:q5}))}const Y5="axis",$5="axis-hot-area";function U5(t){return t.getElementsByClassName(Y5)}function X5(t){return t.getElementsByClassName("axis-line")[0]}function K5(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function Z5(t,e){var{cross:n,offsetX:i}=e,e=J(e,["cross","offsetX","offsetY"]),r=K5(t),[t]=X5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=2*(s-a);return{brushRegion:q5,hotZone:new N.Rect({className:$5,style:Object.assign({x:n?a:t-r/2,width:n?r/2:r,y:o,height:l-o},e)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,r)=>[Math.floor(a-i),e,Math.ceil(s-i),r]}}function Q5(t,e){var{offsetY:i,cross:n=!1}=e,e=J(e,["offsetY","offsetX","cross"]),r=K5(t),[,t]=X5(t).getLocalBounds().min;const[a,o]=r.min,[s,l]=r.max;r=l-o;return{brushRegion:G5,hotZone:new N.Rect({className:$5,style:Object.assign({x:a,width:s-a,y:n?o:t-r,height:n?r:2*r},e)}),extent:n?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,n,r)=>[t,Math.floor(o-i),n,Math.ceil(l-i)]}}function J5(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={}}=e,e=J(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state"]);const f=r(t);r=n(t);const h=Xw(u,Zw(f,o))["setState"],d=new Map;var p=et(e,"mask");const g=()=>{for(const t of f)(t=>Array.from(d.values()).every(([n,r,i,a])=>t.some(([t,e])=>n<=t&&t<=i&&r<=e&&e<=a)))(i(t))?h(t,"active"):h(t,"inactive")};var y=r.some(a)&&r.some(t=>!a(t));for(const m of r){const{hotZone:v,brushRegion:b,extent:x}=(a(m)?Q5:Z5)(m,{offsetY:s,offsetX:l,cross:y,zIndex:999,fill:"transparent"});m.parentNode.appendChild(v),I5(v,Object.assign(Object.assign({},p),{reverse:c,brushRegion:b,brushended(){d.delete(m),g()},brushed(t,e,n,r){d.set(m,x(t,e,n,r)),g()}}))}}function t3(a){return t=>{var{container:t,view:e,options:n}=t,{x:r,y:i}=Hw(t).getBBox();return J5(t,Object.assign({elements:zw,axes:U5,offsetY:i,offsetX:r,points:t=>t.__data__.points,horizontal:t=>{var{startPos:[t,e],endPos:[n,r]}=t.attributes;return t!==n&&e===r},datum:Uw(e),state:Kw(n,["active",["inactive",{opacity:.5}]])},a))}}function e3(t,e){var{filter:i,reset:n,brushRegion:r,extent:a,reverse:o}=e,e=et(J(e,["filter","reset","brushRegion","extent","reverse","series"]),"mask"),{width:s,height:l}=t.getBBox(),a=a||[0,0,s,l];const c=function(e=300){let n=null;return t=>{t=t.timeStamp;return null!==n&&t-n<e?(n=t,!0):(n=t,!1)}}(),u=I5(t,Object.assign(Object.assign({},e),{extent:a,brushRegion:r,reverse:o,brushcreated:function(t,e,n,r){i(t,e,n,r),u.remove()}}));function f(t){c(t)&&n()}return t.addEventListener("click",f),()=>{u.destroy(),t.removeEventListener("click",f)}}function n3(t){var{hideX:y=!0,hideY:m=!0}=t,i=J(t,["hideX","hideY"]);return(t,e)=>{const{container:n,view:r,options:f,update:h}=t;t=Hw(n);let d=!1,p=!1,g=r;return e3(t,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],filter:(s,l,c,u)=>ye(this,void 0,void 0,function*(){if(!p){p=!0;const{scale:e,coordinate:r}=g,{x:i,y:a}=e;var t=(t,e)=>{var[t,n]=r.invert(t);return[lw(i,t,e),lw(a,n,e)]};const n=t([s,l],!0),o=t([c,u],!1);t=f["marks"],t=t.map(t=>tt({axis:Object.assign(Object.assign({},y&&{x:{labelTransforms:[{type:"hide"}]}}),m&&{y:{labelTransforms:[{type:"hide"}]}})},t,{scale:{x:{domain:cw(i,[n[0],o[0]])},y:{domain:cw(a,[n[1],o[1]])}}})),t=Object.assign(Object.assign({},f),{marks:t,clip:!0}),t=yield h(t);g=t.view,p=!1,d=!0}}),reset:()=>{!p&&d&&(d=!1,g=r,h(f))},extent:void 0},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),i))}}function r3(t){return n3(Object.assign(Object.assign({hideX:!0},t),{brushRegion:G5}))}function i3(t){return n3(Object.assign(Object.assign({hideY:!0},t),{brushRegion:q5}))}const a3="slider";function o3({wait:p=50,leading:g=!0,trailing:y=!1}){return t=>{const{container:e,view:n,options:l,update:c}=t;t=e.getElementsByClassName(a3);if(t.length){let s=!1;const u=n["scale"];var{x:r,y:i}=u;const o=new Map,f={x:r.getOptions().domain,y:i.getOptions().domain};for(const h of t){const d=h.attributes["orient"];var a=$s(o=>ye(this,void 0,void 0,function*(){var t,e,n,r,i,a=o.detail["value"];s||(s=!0,i="vertical"===d?"y":"x",a=function(t,e){var[t,n]=t;return cw(e,[lw(e,t,!0),lw(e,n,!1)])}(a,u[i]),f[i]=a,t="vertical"===d?"x":"y",e=f[t],n=l,r={[i]:{domain:a},[t]:{domain:e}},i=(i=n["marks"]).map(t=>tt({axis:{x:{labelTransforms:[{type:"hide"}]},y:{labelTransforms:[{type:"hide"}]}}},t,{scale:r,slider:Object.assign(Object.assign({},t.slider.x&&{x:{preserve:!0}}),t.slider.y&&{y:{preserve:!0}}),animate:!1})),a=Object.assign(Object.assign({},n),{marks:i,clip:!0,animate:!1}),yield c(a),s=!1)}),p,{leading:g,trailing:y});h.addEventListener("valuechange",a),o.set(h,a)}return()=>{for(var[t,e]of o)t.removeEventListener("valuechange",e)}}}}const s3={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function l3(t){return"text"===t.nodeName&&!!t.isOverflowing()}function c3(t){var{offsetX:h=8,offsetY:d=8}=t,r=J(t,["offsetX","offsetY"]);return t=>{const s=t["container"],[l,c]=s.getBounds().min,u=et(r,"tip"),f=new Set,e=t=>{var e,n,r,i,a,o=t["target"];l3(o)?({offsetX:e,offsetY:n}=t,e=e+h-l,n=n+d-c,o.tip?(o.tip.style.x=e,o.tip.style.y=n):(i=o.style["text"],a=new N.HTML({className:"poptip",style:{innerHTML:(r="div",i=i,a=Object.assign(Object.assign({},s3),u),`<${r} style="${Object.entries(a).map(([t,e])=>t.replace(/([A-Z])/g,"-$1").toLowerCase()+":"+e).join(";")}">${i}</${r}>`),x:e,y:n}}),s.appendChild(a),o.tip=a,f.add(a))):t.stopPropagation()},n=t=>{var e=t["target"];l3(e)?e.tip&&(e.tip.remove(),e.tip=null,f.delete(e.tip)):t.stopPropagation()};return s.addEventListener("pointerover",e),s.addEventListener("pointerout",n),()=>{s.removeEventListener("pointerover",e),s.removeEventListener("pointerout",n),f.forEach(t=>t.remove())}}}function u3(n){return(t,...e)=>tt({},n(t,...e),t)}function f3(n){return(t,...e)=>tt({},t,n(t,...e))}function h3(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=J(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const d3=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=J(t,["data"]);return Object.assign(Object.assign({},t),{data:h3(e,o),x:n,y:r,width:i,height:a})})},p3=(d3.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=J(g,["data"]),y=h3(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),g3=(p3.props={},()=>t=>{var e=t["children"],t=J(t,["children"]);if(!Array.isArray(e))return[];const{data:s,scale:l={},axis:c={},legend:u={},encode:f={},transform:h=[]}=t,n=J(t,["data","scale","axis","legend","encode","transform"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={},encode:a={},transform:o=[]}=t,t=J(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:h3(e,s),scale:tt({},l,n),encode:tt({},f,a),transform:[...h,...o],axis:!(!r||!c)&&tt({},c,r),legend:!(!i||!u)&&tt({},u,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),y3=(g3.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinate:b,theme:x,component:w,interaction:O,x:M,y:k,key:_,frame:S,title:E,labelTransform:A,parentKey:L,clip:T}=t,t=J(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","key","frame","title","labelTransform","parentKey","clip"]);return[{type:"standardView",x:M,y:k,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinate:b,component:w,interaction:O,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:L,clip:T,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),m3=(y3.props={},u3(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Gc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),v3=u3(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:tt({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:tt({title:i},o)}}}),b3=u3(()=>({animate:{enterType:"fadeIn"}})),x3=f3(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),w3=f3(()=>({type:"cell"})),O3=f3(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),M3=f3((t,c=function(t){t=t.points;return Y1(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?k3(a,e):(t=e.length?void 0:null,tt({title:r===i-1&&void 0,grid:t},a))}},O=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?k3(r,e):(n=e.length?void 0:null,tt({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:k=0,y:_=0,shareData:f=!1,key:S}=t,E=e["value"],{x:A,y:L}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=X1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[L]:e}=t,t=void 0===A||t===n,e=void 0===L||e===r;return t&&e}).map(t=>E.filter(t)),v=f?iu(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:L,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=J(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:L?5:void 0}},r=r?g:0===g.length?[]:E,l={color:{domain:T}},o={x:_3(o,w)(p,r),y:_3(a,O)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+k,y:f+m+_,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:tt(s,e,l),axis:tt({},i,o),legend:!1},t),M)})})}}});function k3(t,e){return e.length?tt({title:!1,tick:null,label:null},t):tt({title:!1,tick:null,label:null,grid:null},t)}function _3(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const S3=()=>t=>{return[yw.of(t).call(w3).call(v3).call(b3).call(m3).call(x3).call(O3).call(M3).value()]},E3=(S3.props={},u3(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),A3=f3(t=>{const{data:w,children:c,x:O=0,y:M=0,key:k}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=X1(t);const s=t.map(({points:t})=>Y1(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=J(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return k3(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return k3(n,e)})(y,w)};return Object.assign({data:w,parentKey:k,key:i+"-"+c,x:u+m+O,y:f+v+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:tt({x:{facet:!1},y:{facet:!1}},e),axis:tt({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:tt({},a,{x:p,y:g})},t)})})}}}),L3=f3(t=>{var e=t["encode"],t=J(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=J(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const T3=()=>t=>{return[yw.of(t).call(w3).call(v3).call(A3).call(L3).call(b3).call(x3).call(E3).value()]},P3=u3(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),C3=u3(t=>({coordinate:{type:"polar"}})),j3=t=>{var e=t["encode"],t=J(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function N3(t){return t=>null}function B3(t){var t=t["points"],[t,e,n,r]=t,i=G1(t,r),t=W1(t,r),r=V1(t,W1(e,n)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=q1(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const F3=()=>t=>{return[yw.of(t).call(w3).call(j3).call(v3).call(C3).call(O3).call(M3,B3,N3,N3,{frame:!1}).call(b3).call(x3).call(P3).value()]};const R3=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=tt({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function I3(t,e){if(null!==t)return{type:"column",value:t,field:e}}function D3(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function z3(t,e){var n=[];for(const r of t)n[r]=e;return n}function B(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function W3(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=B(t,i);if(null!==n)return[n,r]}return[null,null]}function G3(t){return!(t instanceof Date)&&"object"==typeof t}R3.props={};const H3=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{y1:I3(z3(t,0))}})]};function q3(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=B(r,t))?void 0:t[0]]}).filter(([,t])=>df(t));return Array.from(Gc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function V3(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Ac(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>Q3(t=>r(e[t]))):"series"===t?U3:"value"===t?X3:"sum"===t?K3:"maxIndex"===t?Z3:()=>null}function Y3(t,e){for(const n of t)n.sort(e)}function $3(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function U3(t,e,n){return Q3(t=>n[t])}function X3(t,e,n){return Q3(t=>e[t])}function K3(t,n,e){t=X1(t),t=Array.from(Gc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return Q3(t=>r.get(e[t]))}function Z3(t,n,e){t=X1(t),t=Array.from(Gc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,au(e,t=>n[t])]));return Q3(t=>r.get(e[t]))}function Q3(n){return(t,e)=>Ac(n(t),n(e))}H3.props={};const J3=(t={})=>{const{groupBy:L="x",orderBy:T=null,reverse:P=!1,y:C="y",y1:j="y1",series:N=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=B(r,"y"),[s,l]=B(r,"y1"),[r]=N?W3(r,"series","color"):B(r,"color"),c=q3(L,t,e),n=V3(T)(n,a,r),u=(n&&Y3(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){P&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const S of _){var v=h[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=g;for(const A of y){var O=h[A];0<O?r=u[A]=(f[A]=r)+O:u[A]=f[A]=r}}const M=new Set(d),k=new Set(p);r="y"===C?u:f,n="y"===j?u:f;return[t,tt({},e,{encode:{y:I3(r,o),y1:I3(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>k.has(e)},i)})]}};function tO(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}J3.props={};const eO=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(tO)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",J3({groupBy:r})(t,e,n))},nO=(eO.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=B(n,i),[t,tt({},e,{encode:{title:I3(r,n)}})])}}),rO=(nO.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{x:I3(z3(t,0))},scale:{x:{guide:null}}})]}),iO=(rO.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{y:I3(z3(t,0))},scale:{y:{guide:null}}})]}),aO=(iO.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,tt({},e,{encode:{size:D3(z3(t,3))}})]}),oO=(aO.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=J(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,tt({},e,{encode:{key:I3(r)}})]}),sO=(oO.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=B(n,"color"),[t,tt({},e,{encode:{series:I3(r,i)}})])}),lO=(sO.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(G3)?[t,e]:[t,tt({},e,{encode:{y:I3(n)}})]}),cO=(lO.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(G3)?[t,e]:[t,tt({},e,{encode:{x:I3(n)}})]}),uO=(cO.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=B(n,"y"),[t,tt({},e,{encode:{y1:I3([...r])}})])}),fO=(uO.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=B(n,"x"),[t,tt({},e,{encode:{x1:I3([...r])}})])}),hO=(fO.props={},t=>{const r=t["channel"];return(t,e)=>{const i=e["encode"];var n=i["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(r)?r:[r];let a=0;n=n.flatMap(e=>Object.entries(i).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{const[e,n]=B(i,t);var r,t=[[t,I3(e)]];return e&&null!==n&&(r=e.map(t=>({value:t,field:n})),t.push(["tooltip"+(0===a?"":a),I3(r,n)]),a++),t}));return[t,tt({},e,{encode:Object.fromEntries(n)})]}}),dO=(hO.props={},()=>(t,e)=>[t,tt({scale:{x:{padding:0},y:{padding:0}}},e)]),pO=(dO.props={},()=>(t,e)=>{var{style:n={}}=e,r=J(e,["data","style"]),{x:i,y:a}=n,n=J(n,["x","y"]);return null==i||null==a?[t,e]:[[0],tt({},r,{data:[0],cartesian:!0,encode:{x:I3([i||0]),y:I3([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),gO=(pO.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,tt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),yO=(gO.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(G3)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,tt({},e,{encode:{x:I3(n),y:I3(r)}})])}),mO=(yO.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,tt({},e,{encode:{series:D3(z3(t,void 0))}})]:[t,e]}),vO=(mO.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return J(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=B(r,"y"),[r]=W3(r,"series","color"),o=$3(r,i),i=q3(c,t,e),n=V3(f)(n,a,r),s=(n&&Y3(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,tt({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:I3(s)}})]}}),bO=(vO.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,B(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Gc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=B(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[z3(n,r)]:W3(e,"enterDuration",z3(n,r));var[l]=W3(e,"enterDelay",z3(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=iu(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,tt({},t,{encode:{enterDuration:D3(s),enterDelay:D3(c)}})]}});bO.props={};const xO=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=J(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,B(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=q3(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>ou(t,t=>e[+t]),max:(t,e)=>iu(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>hu(t,t=>e[+t]),median:(t,e)=>du(t,t=>e[+t]),sum:(t,e)=>yu(t,t=>e[+t]),deviation:(t,e)=>Fc(t,t=>e[+t])}[r]||iu;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,tt({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,I3(e,B(n,t)[1])]))})]}};function wO(t,e,n){return null===t?[-.5,.5]:(t=$3(t,e),[-(e=new Gp({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function OO(t,e,n){return e*(1-t)+n*t}xO.props={};const MO=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=B(n,"x"),[n]=B(n,"y");const o=wO(a,r,l),s=wO(n,i,c);a=t.map(()=>OO(u(),...s)),r=t.map(()=>OO(u(),...o));return[t,tt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:I3(a),dx:I3(r)}})]}},kO=(MO.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=B(n,"x");const i=wO(n,r,a);n=t.map(()=>OO(o(),...i));return[t,tt({scale:{x:{padding:.5}}},e,{encode:{dx:I3(n)}})]}}),_O=(kO.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=J(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,B(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=q3(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Rc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,tt({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,I3(e,B(n,t)[1])]))})]}}),SO=(_O.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=B(n,"y");var[,i]=B(n,"y1"),n=(f?W3(n,"series","color"):B(n,"color"),q3(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,tt({},e,{encode:{y1:I3(a,i)}})]}});function EO(t,e){return[t[0]]}function AO(t,e){return[t[t.length-1]]}function LO(t,e){return[t[au(t,t=>e[t])]]}function TO(t,e){return[t[su(t,t=>e[t])]]}SO.props={};const PO=(t={})=>{const{groupBy:a="series",channel:o,selector:s}=t;return(t,e)=>{var n=e["encode"],t=q3(a,t,e);const[r]=B(n,o),i="function"==typeof(n=s)?n:{first:EO,last:AO,max:LO,min:TO}[n]||EO;return[t.flatMap(t=>i(t,r)),e]}},CO=(PO.props={},(t={})=>{var e=t["selector"],t=J(t,["selector"]);return PO(Object.assign({channel:"x",selector:e},t))}),jO=(CO.props={},(t={})=>{var e=t["selector"],t=J(t,["selector"]);return PO(Object.assign({channel:"y",selector:e},t))});function NO(e){return t=>null===t?e:e+" of "+t}function BO(){return[(t,e)=>hu(t,t=>+e[t]),NO("mean")]}function FO(){return[(t,e)=>du(t,t=>+e[t]),NO("median")]}function RO(){return[(t,e)=>iu(t,t=>+e[t]),NO("max")]}function IO(){return[(t,e)=>ou(t,t=>+e[t]),NO("min")]}function DO(){return[(t,e)=>t.length,NO("count")]}function zO(){return[(t,e)=>yu(t,t=>+e[t]),NO("sum")]}function WO(){return[(t,e)=>e[t[0]],NO("first")]}function GO(){return[(t,e)=>e[t[t.length-1]],NO("last")]}jO.props={};const HO=(t={})=>{const a=t["groupBy"],c=J(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=a(t,e);var n,r,i;return l?(n=Object.entries(c).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:BO,max:RO,count:DO,first:WO,last:GO,sum:zO,min:IO,median:FO}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=B(s,t);return[t,I3(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),r=Object.keys(s).map(t=>{const[e,n]=B(s,t);return[t,I3(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>o[t[0]]),[X1(l),tt({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},qO=(HO.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=J(t,["channels"]);return HO(Object.assign(Object.assign({},e),{groupBy:(t,e)=>q3(n,t,e)}))}),VO=(qO.props={},(t={})=>qO(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),YO=(VO.props={},(t={})=>qO(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),$O=(YO.props={},(t={})=>qO(Object.assign(Object.assign({},t),{channels:["color"]})));function UO(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=J(n,["reverse","slice","channel"]),o=e["encode"];const[s]=B(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=B(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>iu(t,t=>+a[t]);if("min"===i)return t=>ou(t,t=>+a[t]);if("sum"===i)return t=>yu(t,t=>+a[t]);if("median"===i)return t=>du(t,t=>+a[t]);if("mean"===i)return t=>hu(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?Yc(Hc(o,l,c),([t,e],[n,r])=>Ac(e,r)||Ac(t,n)):Yc(Gc(o,c),([t,e],[n,r])=>l(e,r)||Ac(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,tt(e,{scale:{[a]:{domain:c}}})]}$O.props={};const XO=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=J(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return UO(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=B(i,r);return i=Yc(t,t=>a[t]),n&&i.reverse(),[i,e]}}},KO=(XO.props={},(t={})=>XO(Object.assign(Object.assign({},t),{channel:"x"}))),ZO=(KO.props={},(t={})=>XO(Object.assign(Object.assign({},t),{channel:"color"}))),QO=(ZO.props={},(t={})=>XO(Object.assign(Object.assign({},t),{channel:"y"})));QO.props={};const JO=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=B(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):B(r,s)[0],r=qc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>yu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,tt({},e,{scale:{x:{flex:r}}})]}};function tM(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Y1(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}JO.props={};const eM=()=>(t,e)=>[t,tt({},e,{modifier:tM,axis:!1})],nM=(eM.props={},"thresholds");function rM(t){var[e,n]=Rc(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Bc(t))/(3.49*Fc(t)))))}const iM=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=J(t,["groupChannels","binChannels"]),u={};return HO(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(nM)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=B(n,t);return t}),a=et(c,nM),o=t.filter(e=>i.every(t=>df(t[e]))),r=[...s.map(t=>{var[t]=B(n,t);return t}).filter(df).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||rM(n),e=ru().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Gc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},aM=(iM.props={},(t={})=>{var e=t["thresholds"];return iM(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});function oM(e,n,r,t){var a=e.length;if(a<=t||0===t)return e;var o,s=t=>+n[e[t]],l=t=>+r[e[t]],c=[],u=(a-2)/(t-2);let f=0,h,d;c.push(f);for(let i=0;i<t-2;i++){let t=0,e=0,n=Math.floor((i+1)*u)+1;for(var p=Math.floor((i+2)*u)+1,g=(p=Math.min(p,a))-n;n<p;n++)t+=s(n),e+=l(n);t/=g,e/=g;let r=Math.floor((i+0)*u)+1;var y=Math.floor((i+1)*u)+1,m=[s(f),l(f)];for(h=-1;r<y;r++)(o=.5*Math.abs((m[0]-t)*(s(r)-m[1])-(m[0]-l(r))*(e-m[0])))>h&&(h=o,d=r);c.push(d),f=d}return c.push(a-1),c.map(t=>e[t])}function sM(t){if("function"==typeof t)return t;if("lttb"===t)return oM;var e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[su(t,t=>n[t])]],max:(t,e,n)=>[t[au(t,t=>n[t])]],median:(t,e,n)=>{return[t[fu(t,.5,t=>n[t])]]}};const i=e[t]||e.median;return(t,e,n,r)=>{return function(t,e){var n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}(t,Math.max(1,Math.floor(t.length/r))).flatMap(t=>i(t,e,n))}}aM.props={};const lM=(t={})=>{const{strategy:e="median",thresholds:a=2e3,groupBy:o=["series","color"]}=t,s=sM(e);return(t,e)=>{var n=e["encode"],t=q3(o,t,e);const[r]=B(n,"x"),[i]=B(n,"y");return[t.flatMap(t=>s(t,r,i,a)),e]}},cM=(lM.props={},(s={})=>(t,e)=>{const i=e["encode"],n=Object.entries(s).map(([t,e])=>{const[n]=B(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(df);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);var o=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[t,tt({},e,{encode:Object.fromEntries(o)})]});function uM(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function fM(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}cM.props={};const hM=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{t.attr("visibility","visible");const i=t.getLocalBounds();n.some(t=>{var e=uM(i),t=uM(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?t.attr("visibility","hidden"):n.push(t)}),t}};function dM(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const pM=t=>{const{maxIterations:O=10,maxError:M=.1,padding:k=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=dM(),[m,v]=dM();var a,o,s,l,[c,t]=dM(),[u,n]=dM();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<O;t++){i.sort((t,e)=>Ac(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<k&&(d=(k-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function gM(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function yM(t,e,n){return.2126*gM(t)+.7152*gM(e)+.0722*gM(n)}function mM(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=yM(t,n,r),n=yM(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function vM(e,t){return t[au(t,t=>{return mM(e,"object"==typeof(t=t)?t:N.parseColor(t))})]}const bM=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;mM(t.parsedStyle.fill,e)<n&&t.attr("fill",vM(e,r))}),t)},xM=t=>(t,e)=>(t.forEach(t=>{t.attr("visibility","visible");var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(fM(t,e)&&fM(n,e))}(uM(t.getLocalBounds()),e)||t.attr("visibility","hidden")}),t);var T=1e-6,wM=1e-12,E=Math.PI,OM=E/2,MM=E/4,kM=2*E,_M=180/E,SM=E/180,EM=Math.abs,AM=Math.atan,LM=Math.atan2,L=Math.cos,TM=Math.ceil,PM=Math.exp,CM=Math.log,jM=Math.pow,P=Math.sin,NM=Math.sign||function(t){return 0<t?1:t<0?-1:0},BM=Math.sqrt,FM=Math.tan;function RM(t){return 1<t?0:t<-1?E:Math.acos(t)}function IM(t){return 1<t?OM:t<-1?-OM:Math.asin(t)}function DM(){}function zM(t,e){t&&GM.hasOwnProperty(t.type)&&GM[t.type](t,e)}var WM={Feature:function(t,e){zM(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)zM(n[r].geometry,e)}},GM={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){HM(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)HM(n[r],e,0)},Polygon:function(t,e){qM(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)qM(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)zM(n[r],e)}};function HM(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function qM(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)HM(t[n],e,1);e.polygonEnd()}function VM(t,e){t&&WM.hasOwnProperty(t.type)?WM[t.type](t,e):zM(t,e)}function YM(t){return[LM(t[1],t[0]),IM(t[2])]}function $M(t){var e=t[0],t=t[1],n=L(t);return[n*L(e),n*P(e),P(t)]}function UM(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function XM(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 KM(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ZM(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function QM(t){var e=BM(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function JM(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function tk(t,e){return EM(t)>E&&(t-=Math.round(t/kM)*kM),[t,e]}function ek(t,e,n){return(t%=kM)?e||n?JM(rk(t),ik(e,n)):rk(t):e||n?ik(e,n):tk}function nk(n){return function(t,e){return EM(t+=n)>E&&(t-=Math.round(t/kM)*kM),[t,e]}}function rk(t){var e=nk(t);return e.invert=nk(-t),e}function ik(t,e){var i=L(t),a=P(t),o=L(e),s=P(e);function n(t,e){var n=L(e),r=L(t)*n,t=P(t)*n,n=P(e),e=n*i+r*a;return[LM(t*o-e*s,r*i-n*a),IM(e*o+t*s)]}return n.invert=function(t,e){var n=L(e),r=L(t)*n,t=P(t)*n,n=P(e),e=n*o-t*s;return[LM(t*o+n*s,r*i+e*a),IM(e*i-r*a)]},n}function ak(t,e){(e=$M(e))[0]-=t,QM(e);t=RM(-e[1]);return((-e[2]<0?-t:t)+kM-T)%kM}function ok(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:DM,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function sk(t,e){return EM(t[0]-e[0])<T&&EM(t[1]-e[1])<T}function lk(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 ck(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(sk(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*T}s.push(n=new lk(r,t,null,!0)),l.push(n.o=new lk(r,null,n,!1)),s.push(n=new lk(i,t,null,!1)),l.push(n.o=new lk(i,null,n,!0))}}),s.length){for(l.sort(e),uk(s),uk(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function uk(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function fk(t){return EM(t[0])<=E?t[0]:NM(t[0])*((EM(t[0])+E)%kM-E)}function hk(y,m,v,b){return function(s){var l,c,u,n=m(s),f=ok(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=pu(c);var t=function(t,e){var n=fk(e),r=e[1],e=P(r),i=[P(n),-L(n),0],a=0,o=0,s=new Ic;1===e?r=OM+T:-1===e&&(r=-OM-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=fk(h),p=h[1]/2+MM,g=P(p),y=L(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=fk(v),x=v[1]/2+MM,w=P(x),x=L(x),O=b-d,M=0<=O?1:-1,k=M*O,_=E<k,S=g*w;s.add(LM(S*M*P(k),y*x+S*L(k))),a+=_?O+M*kM:O,_^n<=d^n<=b&&(QM(S=XM($M(h),$M(v))),QM(k=XM(i,S)),(M=(_^0<=O?-1:1)*IM(k[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=O?1:-1)}return(a<-T||a<T&&s<-wM)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),ck(c,pk,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(dk))}return e}}function dk(t){return 1<t.length}function pk(t,e){return((t=t.x)[0]<0?t[1]-OM-T:OM-t[1])-((e=e.x)[0]<0?e[1]-OM-T:OM-e[1])}tk.invert=tk;var gk=hk(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=EM(t-f);EM(l-E)<T?(c.point(f,h=0<(h+e)/2?OM:-OM),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(EM(f-d)<T&&(f-=d*T),EM(t-s)<T&&(t-=s*T),l=h,i=e,o=P((n=f)-(r=t)),h=EM(o)>T?AM((P(l)*(a=L(i))*P(r)-P(i)*(r=L(l))*P(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*OM,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):EM(t[0]-e[0])>T?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-OM]);function yk(d){var g=L(d),p=6*SM,f=0<g,h=EM(g)>T;function y(t,e){return L(t)*L(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=XM($M(t),$M(e)),h=UM(f,f),d=f[0],p=h-d*d;return p?(r=XM(u,f),KM(u=ZM(u,g*h/p),ZM(f,-g*d/p)),(p=(f=UM(u,h=r))*f-(d=UM(h,h))*(UM(u,u)-1))<0?void 0:(KM(p=ZM(h,(-f-(r=BM(p)))/d),u),p=YM(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=EM((s=a-i)-E)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(EM(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(KM(c=ZM(h,(-f+r)/d),u),[p,YM(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return hk(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!sk(o,n)&&!sk(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&sk(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=L(r),c=P(r),u=o*a;null==n?(n=r+o*kM,s=r-u/2):(n=ak(l,n),s=ak(l,s),(0<o?n<s:s<n)&&(n+=o*kM));for(var f,h=n;0<o?s<h:h<s;h-=u)f=YM([l,-c*L(h),-c*P(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var mk=1e9,vk=-mk;function bk(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function O(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return EM(t[0]-m)<T?0<e?0:3:EM(t[0]-b)<T?0<e?2:1:EM(t[1]-v)<T?0<e?1:0:0<e?3:2}function M(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=ok(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=pu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),O(null,null,1,r),r.lineEnd()),n&&ck(i,M,t,O,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(vk,Math.min(mk,c)),u=Math.max(vk,Math.min(mk,u))],r=[t=Math.max(vk,Math.min(mk,t)),e=Math.max(vk,Math.min(mk,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function xk(t,e,n){var r=gu(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function wk(t,e,n){var r=gu(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function Ok(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=xk(s,o,90),f=wk(r,n,v),h=xk(c,l,90),d=wk(a,i,v),e):v},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return gu(TM(a/y)*y,i,y).map(h).concat(gu(TM(c/m)*m,l,m).map(d)).concat(gu(TM(r/p)*p,n,p).filter(function(t){return EM(t%y)>T}).map(u)).concat(gu(TM(s/g)*g,o,g).filter(function(t){return EM(t%m)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var Mk,kk,_k,Sk,Ek=t=>t,Ak=new Ic,Lk=new Ic,Tk={point:DM,lineStart:DM,lineEnd:DM,polygonStart:function(){Tk.lineStart=Pk,Tk.lineEnd=Nk},polygonEnd:function(){Tk.lineStart=Tk.lineEnd=Tk.point=DM,Ak.add(EM(Lk)),Lk=new Ic},result:function(){var t=Ak/2;return Ak=new Ic,t}};function Pk(){Tk.point=Ck}function Ck(t,e){Tk.point=jk,Mk=_k=t,kk=Sk=e}function jk(t,e){Lk.add(Sk*t-_k*e),_k=t,Sk=e}function Nk(){jk(Mk,kk)}var Bk=Tk,Fk=1/0,Rk=Fk,Ik=-Fk,Dk=Ik;var zk,Wk,Gk,Hk,qk={point:function(t,e){t<Fk&&(Fk=t);Ik<t&&(Ik=t);e<Rk&&(Rk=e);Dk<e&&(Dk=e)},lineStart:DM,lineEnd:DM,polygonStart:DM,polygonEnd:DM,result:function(){var t=[[Fk,Rk],[Ik,Dk]];return Ik=Dk=-(Rk=Fk=1/0),t}},Vk=0,Yk=0,$k=0,Uk=0,Xk=0,Kk=0,Zk=0,Qk=0,Jk=0,t4={point:e4,lineStart:n4,lineEnd:a4,polygonStart:function(){t4.lineStart=o4,t4.lineEnd=s4},polygonEnd:function(){t4.point=e4,t4.lineStart=n4,t4.lineEnd=a4},result:function(){var t=Jk?[Zk/Jk,Qk/Jk]:Kk?[Uk/Kk,Xk/Kk]:$k?[Vk/$k,Yk/$k]:[NaN,NaN];return Vk=Yk=$k=Uk=Xk=Kk=Zk=Qk=Jk=0,t}};function e4(t,e){Vk+=t,Yk+=e,++$k}function n4(){t4.point=r4}function r4(t,e){t4.point=i4,e4(Gk=t,Hk=e)}function i4(t,e){var n=t-Gk,r=e-Hk,n=BM(n*n+r*r);Uk+=n*(Gk+t)/2,Xk+=n*(Hk+e)/2,Kk+=n,e4(Gk=t,Hk=e)}function a4(){t4.point=e4}function o4(){t4.point=l4}function s4(){c4(zk,Wk)}function l4(t,e){t4.point=c4,e4(zk=Gk=t,Wk=Hk=e)}function c4(t,e){var n=t-Gk,r=e-Hk,n=BM(n*n+r*r);Uk+=n*(Gk+t)/2,Xk+=n*(Hk+e)/2,Kk+=n,Zk+=(n=Hk*t-Gk*e)*(Gk+t),Qk+=n*(Hk+e),Jk+=3*n,e4(Gk=t,Hk=e)}var u4=t4;function f4(t){this._context=t}f4.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(){0===this._line&&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,kM)}},result:DM};var h4,d4,p4,g4,y4,m4=new Ic,v4={point:DM,lineStart:function(){v4.point=b4},lineEnd:function(){h4&&x4(d4,p4),v4.point=DM},polygonStart:function(){h4=!0},polygonEnd:function(){h4=null},result:function(){var t=+m4;return m4=new Ic,t}};function b4(t,e){v4.point=x4,d4=g4=t,p4=y4=e}function x4(t,e){g4-=t,y4-=e,m4.add(BM(g4*g4+y4*y4)),g4=t,y4=e}var w4=v4;let O4,M4,k4,_4;class S4{constructor(t){this._append=null==t?E4:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return E4;if(e!==O4){const r=10**e;O4=e,M4=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return M4}(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(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:var n,r;this._append`M${t},${e}`,this._radius===k4&&this._append===M4||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,k4=n,M4=this._append,_4=this._,this._=r),this._+=_4}}result(){var t=this._;return this._="",t.length?t:null}}function E4(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function A4(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),VM(t,a(o))),o.result()}return s.area=function(t){return VM(t,a(Bk)),Bk.result()},s.measure=function(t){return VM(t,a(w4)),w4.result()},s.bounds=function(t){return VM(t,a(qk)),qk.result()},s.centroid=function(t){return VM(t,a(u4)),u4.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,Ek):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new S4(r)):new f4(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new S4(r)),s},s.projection(e).digits(r).context(n)}function L4(r){return function(t){var e,n=new T4;for(e in r)n[e]=r[e];return n.stream=t,n}}function T4(){}function P4(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),VM(n,t.stream(qk)),e(qk.result()),null!=r&&t.clipExtent(r),t}function C4(i,a,t){return P4(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function j4(t,e,n){return C4(t,[[0,0],e],n)}function N4(r,i,t){return P4(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function B4(i,a,t){return P4(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}T4.prototype={constructor:T4,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()}};var F4=16,R4=L(30*SM);function I4(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=$M([t,e]),e=E(t,e);L(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],F4,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){L(u,f,c,h,d,p,i,a,n,o,s,l,F4,r),g.lineEnd=m,m()}return g}):(n=t,L4({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function L(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,O,M,k=o-t,_=s-e,S=k*k+_*_;4*A<S&&h--&&(y=a+f,x=IM(y/=m=BM((p=r+c)*p+(g=i+u)*g+y*y)),v=EM(EM(y)-1)<T||EM(n-l)<T?(n+l)/2:LM(g,p),b=(x=E(v,x))[0],x=x[1],A<(M=_*(w=b-t)-k*(O=x-e))*M/S||.3<EM((k*w+_*O)/S-.5)||r*c+i*u+a*f<R4)&&(L(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),L(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var D4=L4({point:function(t,e){this.stream.point(t*SM,e*SM)}});function z4(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=L(e),e=P(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function W4(t){return G4(function(){return t})()}function G4(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,O=null,M=gk,k=null,_=Ek,S=.5;function E(t){return l(t[0]*SM,t[1]*SM)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*_M,t[1]*_M]}function L(){var t=z4(f,0,0,x,w,b).apply(null,e(p,g)),t=z4(f,h-t[0],d-t[1],x,w,b);return r=ek(y,m,v),s=JM(e,t),l=JM(r,s),o=I4(s,S),T()}function T(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=D4((n=r,L4({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,O=void 0,T()):M},E.postclip=function(t){return arguments.length?(_=t,k=n=i=a=null,T()):_},E.clipAngle=function(t){return arguments.length?(M=+t?yk(O=t*SM):(O=null,gk),T()):O*_M},E.clipExtent=function(t){return arguments.length?(_=null==t?(k=n=i=a=null,Ek):bk(k=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==k?null:[[k,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,L()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],L()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*SM,g=t[1]%360*SM,L()):[p*_M,g*_M]},E.rotate=function(t){return arguments.length?(y=t[0]%360*SM,m=t[1]%360*SM,v=2<t.length?t[2]%360*SM:0,L()):[y*_M,m*_M,v*_M]},E.angle=function(t){return arguments.length?(b=t%360*SM,L()):b*_M},E.reflectX=function(t){return arguments.length?(x=t?-1:1,L()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,L()):w<0},E.precision=function(t){return arguments.length?(o=I4(s,S=t*t),T()):BM(S)},E.fitExtent=function(t,e){return C4(E,t,e)},E.fitSize=function(t,e){return j4(E,t,e)},E.fitWidth=function(t,e){return N4(E,t,e)},E.fitHeight=function(t,e){return B4(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,L()}}function H4(t){var e=0,n=E/3,r=G4(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*SM,n=t[1]*SM):[e*_M,n*_M]},t}function q4(t,e){var n,r,i,a=P(t),o=(a+P(e))/2;return EM(o)<T?(n=L(t),s.invert=function(t,e){return[t/n,IM(e*n)]},s):(i=BM(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=LM(t,EM(e))*NM(e);return e*o<0&&(n-=E*NM(t)*NM(e)),[n/o,IM((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,P(e)/n]}function l(t,e){e=BM(r-2*o*P(e))/o;return[e*P(t*=o),i-e*L(t)]}}function V4(){return H4(q4).scale(155.424).center([0,33.6442])}function Y4(){return V4().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function $4(i){return function(t,e){var n=L(t),r=L(e),n=i(n*r);return n===1/0?[2,0]:[n*r*P(t),n*P(e)]}}function U4(a){return function(t,e){var n=BM(t*t+e*e),r=a(n),i=P(r),r=L(r);return[LM(t*i,n*r),IM(n&&e*i/n)]}}var X4=$4(function(t){return BM(2/(1+t))});X4.invert=U4(function(t){return 2*IM(t/2)});var K4=$4(function(t){return(t=RM(t))&&t/P(t)});function Z4(t,e){return[t,CM(FM((OM+e)/2))]}function Q4(r){var i,a,o,s=W4(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=ek((e=s.rotate())[0]*SM,e[1]*SM,2<e.length?e[2]*SM:0),function(t){return(t=e.invert(t[0]*SM,t[1]*SM))[0]*=_M,t[1]*=_M,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===Z4?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function J4(t){return FM((OM+t)/2)}function t6(t,e){var n=L(t),i=t===e?P(t):CM(n/L(e))/CM(J4(e)/J4(t)),a=n*jM(J4(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=NM(i)*BM(t*t+e*e),r=LM(t,EM(e))*NM(e);return e*i<0&&(r-=E*NM(t)*NM(e)),[r/i,2*AM(jM(a/n,1/i))-OM]},r):Z4;function r(t,e){0<a?e<-OM+T&&(e=-OM+T):OM-T<e&&(e=OM-T);e=a/jM(J4(e),i);return[e*P(i*t),a-e*L(i*t)]}}function e6(t,e){return[t,e]}function n6(t,e){var n=L(t),r=t===e?P(t):(n-L(e))/(e-t),i=n/r+t;return EM(r)<T?e6:(a.invert=function(t,e){var e=i-e,n=LM(t,EM(e))*NM(e);return e*r<0&&(n-=E*NM(t)*NM(e)),[n/r,i-NM(r)*BM(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*P(t),i-e*L(t)]}}K4.invert=U4(function(t){return t}),Z4.invert=function(t,e){return[t,2*AM(PM(e))-OM]},e6.invert=e6;var r6=1.340264,i6=-.081106,a6=893e-6,o6=.003796,s6=BM(3)/2;function l6(t,e){var e=IM(s6*P(e)),n=e*e,r=n*n*n;return[t*L(e)/(s6*(r6+3*i6*n+r*(7*a6+9*o6*n))),e*(r6+i6*n+r*(a6+o6*n))]}function c6(t,e){var n=L(e),r=L(t)*n;return[n*P(t)/r,P(e)/r]}function u6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function f6(t,e){return[L(e)*P(t),P(e)]}function h6(t,e){var n=L(e),r=1+L(t)*n;return[n*P(t)/r,P(e)/r]}function d6(t,e){return[CM(FM((OM+e)/2)),-t]}l6.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(r6+i6*i+a*(a6+o6*i))-e)/(r6+3*i6*i+a*(7*a6+9*o6*i)))*r)*i*i,!(EM(n)<wM));++o);return[s6*t*(r6+3*i6*i+a*(7*a6+9*o6*i))/L(r),IM(P(r)/s6)]},c6.invert=U4(AM),u6.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),EM(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},f6.invert=U4(IM),h6.invert=U4(function(t){return 2*AM(t)}),d6.invert=function(t,e){return[-e,2*AM(PM(t))-OM]};var p6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=Y4(),l=V4().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=V4().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return C4(f,t,e)},f.fitSize=function(t,e){return j4(f,t,e)},f.fitWidth=function(t,e){return N4(f,t,e)},f.fitHeight=function(t,e){return B4(f,t,e)},f.scale(1070)},geoAlbers:Y4,geoAzimuthalEqualArea:function(){return W4(X4).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:X4,geoAzimuthalEquidistant:function(){return W4(K4).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:K4,geoConicConformal:function(){return H4(t6).scale(109.5).parallels([30,30])},geoConicConformalRaw:t6,geoConicEqualArea:V4,geoConicEqualAreaRaw:q4,geoConicEquidistant:function(){return H4(n6).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:n6,geoEqualEarth:function(){return W4(l6).scale(177.158)},geoEqualEarthRaw:l6,geoEquirectangular:function(){return W4(e6).scale(152.63)},geoEquirectangularRaw:e6,geoGnomonic:function(){return W4(c6).scale(144.049).clipAngle(60)},geoGnomonicRaw:c6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=L4({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=Ek;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,Ek):bk(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=P(d=t%360*SM),r=L(d),b()):d*_M},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return C4(x,t,e)},x.fitSize=function(t,e){return j4(x,t,e)},x.fitWidth=function(t,e){return N4(x,t,e)},x.fitHeight=function(t,e){return B4(x,t,e)},x},geoProjection:W4,geoProjectionMutator:G4,geoMercator:function(){return Q4(Z4).scale(961/kM)},geoMercatorRaw:Z4,geoNaturalEarth1:function(){return W4(u6).scale(175.295)},geoNaturalEarth1Raw:u6,geoOrthographic:function(){return W4(f6).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:f6,geoStereographic:function(){return W4(h6).scale(250).clipAngle(142)},geoStereographicRaw:h6,geoTransverseMercator:function(){var t=Q4(d6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:d6});function g6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function y6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(v6),e.find(t=>t.sphere)?{type:"Sphere"}:g6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=A4(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function m6(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[Ok()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function v6(t){return"geoPath"===t.type}var b6,ga=()=>t=>{var{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=J(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Ws(t);if(e=p6[e])return e;throw new Error("Unknown coordinate: "+t)}(r),p=e.map(m6);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(y6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=A4(i);const u=new t0({domain:[t,t+n]}),f=new t0({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}},children:p.flatMap(t=>{return v6(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>g(t)})})):t;var e})})]},ya=(ga.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=J(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});ya.props={};const x6={"composition.geoView":ga,"composition.geoPath":ya};function w6(){return Object.assign({"data.fetch":Dh,"data.inline":Yh,"data.sortBy":Vh,"data.sort":Gh,"data.filter":Wh,"data.pick":Hh,"data.rename":qh,"data.fold":zh,"data.slice":wd,"data.custom":$h,"data.map":Uh,"data.cluster":kh,"data.tree":_h,"data.sankey":lf,"data.arc":Qh,"data.wordCloud":vd,"data.join":xd,"transform.maybeZeroY1":H3,"transform.maybeZeroX":rO,"transform.maybeStackY":eO,"transform.maybeTitle":nO,"transform.maybeSeries":sO,"transform.maybeZeroPadding":dO,"transform.stackY":J3,"transform.binX":aM,"transform.bin":iM,"transform.dodgeX":vO,"transform.jitter":MO,"transform.jitterX":kO,"transform.symmetryY":_O,"transform.diffY":SO,"transform.stackEnter":bO,"transform.normalizeY":xO,"transform.select":PO,"transform.selectX":CO,"transform.selectY":jO,"transform.groupX":VO,"transform.groupY":YO,"transform.groupColor":$O,"transform.group":qO,"transform.maybeSize":aO,"transform.maybeZeroY":iO,"transform.maybeKey":oO,"transform.sortX":KO,"transform.sortY":QO,"transform.sortColor":ZO,"transform.flexX":JO,"transform.maybeTupleY":lO,"transform.maybeTupleX":cO,"transform.maybeIdentityY":uO,"transform.maybeIdentityX":fO,"transform.maybeTuple":yO,"transform.maybeVisualPosition":pO,"transform.maybeFunctionAttribute":gO,"transform.maybeGradient":mO,"transform.maybeTooltip":hO,"transform.pack":eM,"transform.sample":lM,"transform.filter":cM,"coordinate.cartesian":Zs,"coordinate.polar":Js,"coordinate.helix":tl,"coordinate.transpose":el,"coordinate.theta":nl,"coordinate.parallel":al,"coordinate.fisheye":ol,"coordinate.radial":il,"coordinate.radar":sl,"encode.constant":ll,"encode.field":ul,"encode.transform":cl,"encode.column":fl,"mark.interval":Sc,"mark.rect":Ec,"mark.line":Au,"mark.point":Lu,"mark.text":Tu,"mark.cell":Pu,"mark.area":Cu,"mark.link":ju,"mark.image":Nu,"mark.polygon":Bu,"mark.box":Fu,"mark.vector":Ru,"mark.lineX":Du,"mark.lineY":Iu,"mark.connector":zu,"mark.range":Hu,"mark.rangeX":qu,"mark.rangeY":Vu,"mark.sankey":mf,"mark.path":vf,"mark.treemap":Mf,"mark.pack":kf,"mark.boxplot":jf,"mark.shape":Nf,"mark.forceGraph":Oh,"mark.tree":Sh,"mark.wordCloud":Od,"palette.category10":Md,"palette.category20":kd,"palette.sequentialBlue":_d,"palette.sequentialDarkBlue":Sd,"palette.sequentialGreen":Ed,"palette.sequentialDarkGreen":Ad,"palette.sequentialGrey":Ld,"palette.sequentialOrange":Td,"palette.sequentialPink":Pd,"palette.sequentialRed":Cd,"palette.sequentialYellow":jd,"palette.sequentialPurple":Nd,"palette.sequentialYellowOrange":Bd,"palette.sequentialYellowGreen":Fd,"palette.sequentialPinkPurple":Rd,"palette.sequentialGreenBlue":Id,"palette.divergingGreenYellow":Dd,"palette.divergingRedBlue":zd,"palette.divergingGreenRed":Wd,"palette.divergingRedPurple":Gd,"scale.linear":E0,"scale.ordinal":A0,"scale.band":S0,"scale.identity":L0,"scale.point":T0,"scale.time":P0,"scale.log":C0,"scale.pow":j0,"scale.sqrt":R0,"scale.threshold":N0,"scale.quantile":B0,"scale.quantize":F0,"scale.sequential":I0,"scale.constant":D0,"shape.interval.rect":cg,"shape.interval.hollow":ug,"shape.interval.funnel":fg,"shape.interval.pyramid":dg,"shape.rect.rect":cg,"shape.rect.hollow":ug,"shape.cell.cell":cg,"shape.cell.hollow":ug,"shape.line.line":mg,"shape.line.hv":bg,"shape.line.vh":xg,"shape.line.hvh":wg,"shape.line.smooth":vg,"shape.point.bowtie":_g,"shape.point.cross":Sg,"shape.point.diamond":Eg,"shape.point.hexagon":Ag,"shape.point.hollowBowtie":Lg,"shape.point.hollowDiamond":Tg,"shape.point.hollowHexagon":Pg,"shape.point.hollow":Cg,"shape.point.hollowSquare":jg,"shape.point.hollowTriangle":Ng,"shape.point.hollowTriangleDown":Bg,"shape.point.hyphen":Fg,"shape.point.line":Rg,"shape.point.plus":Ig,"shape.point.point":Dg,"shape.point.square":zg,"shape.point.tick":Wg,"shape.point.triangle":Gg,"shape.point.triangleDown":Hg,"shape.text.text":j2,"shape.area.area":I2,"shape.area.smooth":D2,"shape.area.hvh":z2,"shape.area.vh":W2,"shape.area.hv":G2,"shape.link.smooth":q2,"shape.link.vhv":V2,"shape.link.arc":Y2,"shape.link.link":H2,"shape.image.image":$2,"shape.polygon.polygon":U2,"shape.polygon.ribbon":X2,"shape.box.box":K2,"shape.vector.vector":qg,"shape.label.label":dx,"shape.text.badge":B2,"shape.lineX.line":Z2,"shape.lineY.line":Z2,"shape.shape.shape":mx,"shape.connector.connector":tx,"shape.range.range":cg,"shape.rangeX.range":cg,"shape.rangeY.range":cg,"shape.path.path":gx,"shape.path.hollow":yx,"theme.light":bx,"theme.dark":xx,"theme.academy":Ox,"component.axisX":$x,"component.axisY":Ux,"component.axisRadar":Xx,"component.axisLinear":Vx,"component.axisArc":Yx,"component.legendCategory":Jx,"component.legendContinuous":tw,"component.legendContinuousBlock":ew,"component.legendContinuousBlockSize":nw,"component.legendContinuousSize":rw,"component.title":ow,"component.sliderX":fw,"component.sliderY":hw,"component.scrollbarX":pw,"component.scrollbarY":gw,"animation.scaleInX":ww,"animation.scaleOutX":Ow,"animation.scaleInY":Mw,"animation.scaleOutY":kw,"animation.waveIn":Nw,"animation.fadeIn":_w,"animation.fadeOut":Sw,"animation.zoomIn":Bw,"animation.zoomOut":Fw,"animation.pathIn":Rw,"animation.morphing":jw,"animation.growInX":Iw,"animation.growInY":Dw,"interaction.elementHighlight":r5,"interaction.elementHighlightByX":i5,"interaction.elementHighlightByColor":a5,"interaction.elementSelect":s5,"interaction.elementSelectByX":l5,"interaction.elementSelectByColor":c5,"interaction.fisheye":f5,"interaction.chartIndex":u5,"interaction.tooltip":k5,"interaction.legendFilter":F5,"interaction.legendHighlight":R5,"interaction.brushHighlight":W5,"interaction.brushXHighlight":H5,"interaction.brushYHighlight":V5,"interaction.brushAxisHighlight":t3,"interaction.brushFilter":n3,"interaction.brushXFilter":r3,"interaction.brushYFilter":i3,"interaction.sliderFilter":o3,"interaction.poptip":c3,"composition.spaceLayer":d3,"composition.spaceFlex":p3,"composition.mark":y3,"composition.view":g3,"composition.facetRect":S3,"composition.repeatMatrix":T3,"composition.facetCircle":F3,"composition.timingKeyframe":R3,"labelTransform.overlapHide":hM,"labelTransform.overlapDodgeY":pM,"labelTransform.overflowHide":xM,"labelTransform.contrastReverse":bM},x6)}function O6(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}(va=b6=b6||{}).BEFORE_RENDER="beforerender",va.AFTER_RENDER="afterrender",va.BEFORE_PAINT="beforepaint",va.AFTER_PAINT="afterpaint",va.BEFORE_CHANGE_DATA="beforechangedata",va.AFTER_CHANGE_DATA="afterchangedata",va.BEFORE_CLEAR="beforeclear",va.AFTER_CLEAR="afterclear",va.BEFORE_DESTROY="beforedestroy",va.AFTER_DESTROY="afterdestroy",va.BEFORE_CHANGE_SIZE="beforechangesize",va.AFTER_CHANGE_SIZE="afterchangesize";function M6(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function k6(t,e,n,r,i){var a=new t0({range:[e,e+r]}),o=new t0({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function _6(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function S6(t,e,n,r,i){return t[0]}function E6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new t0({range:[s,t]}),c=new t0({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=O6(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function A6(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function L6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return B6.apply(void 0,F6([[-1,-1]],e,!1))}function T6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return B6.apply(void 0,F6([[-1,1]],e,!1))}function P6(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return B6.apply(void 0,F6([[1,-1]],e,!1))}function C6(t,e,n,r,i){var a,t=t[0],o=ct();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function j6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new t0({range:[s,s+.99*l]}),f=new t0({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=O6(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function N6(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new t0({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new e0({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var B6=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},F6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function R6(t){return 1/Math.tan(t)}function I6(t,e,n,r,i){var a=R6(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function D6(t,e,n,r,i){var a=R6(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function z6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function W6(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function G6(t,e,n){return n?new t0({range:[0,1],domain:[0,e]}).map(t):t}function H6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=G6(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[z6(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[W6(e,s,o,0,1),t]}}}function q6(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=G6(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],z6(t[1],s,o,0,1)]},untransform:function(t){return[t[0],W6(t[1],s,o,0,1)]}}}function V6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=G6(a,r,t=void 0!==t&&t),u=G6(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[z6(e,c,s,0,1),z6(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[W6(e,c,s,0,1),W6(t,u,l,0,1)]}}}function Y6(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new t0({range:[0,r]}),u=new t0({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=z6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=W6(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var $6=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},U6=(X6.prototype.update=function(t){this.options=tt({},this.options,t),this.recoordinate()},X6.prototype.clone=function(){return new X6(this.options)},X6.prototype.getOptions=function(){return this.options},X6.prototype.clear=function(){this.update({transformations:[]})},X6.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},X6.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},X6.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:$6($6([],n,!0),[$6([],t,!0)],!1)}),this},X6.prototype.map=function(t){return this.output(t)},X6.prototype.invert=function(t){return this.input(t)},X6.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},X6.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?$6([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p($6([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Hs,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Hs}.apply(void 0,a)},X6.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return ut(p,p,t)}),e&&(e=t=p,(d=new Q(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},X6);function X6(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:k6,translate:M6,custom:_6,matrix:S6,polar:E6,transpose:A6,scale:B6,"shear.x":I6,"shear.y":D6,reflect:L6,"reflect.x":T6,"reflect.y":P6,rotate:C6,helix:j6,parallel:N6,fisheye:V6,"fisheye.x":H6,"fisheye.y":q6,"fisheye.circular":Y6},this.update(t)}function K6(t,e){var{coordinate:n={}}=t,t=J(t,["coordinate"]),{type:r,transform:i=[]}=n,n=J(n,["type","transform"]);if(!r)return Object.assign(Object.assign({},t),{coordinates:i});var[,e]=Kx("coordinate",e),{transform:e=!1}=e(r).props||{};if(e)throw new Error(`Unknown coordinate: ${r}.`);return Object.assign(Object.assign({},t),{coordinates:[Object.assign({type:r},n),...i]})}function Z6(t,e){return t.filter(t=>t.type===e)}function Q6(t){return 0<Z6(t,"polar").length}function J6(t){return Z6(t,"transpose").length%2==1}function t8(t){return 0<Z6(t,"theta").length}function e8(t){return 0<Z6(t,"radial").length}function g(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}ma=g("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ba=g("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),u=g("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),xa=g("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),fa=g("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),l=g("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),fs=g("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),ka=g("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),gs=g("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),ds=g("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function n8(t,e,n){(t.prototype=e.prototype=n).constructor=t}function r8(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function i8(){}var a8=1/.7,xs="\\s*([+-]?\\d+)\\s*",la="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o8=/^#([0-9a-f]{3,8})$/,s8=new RegExp(`^rgb\\(${xs},${xs},${xs}\\)$`),l8=new RegExp(`^rgb\\(${oc},${oc},${oc}\\)$`),c8=new RegExp(`^rgba\\(${xs},${xs},${xs},${la}\\)$`),u8=new RegExp(`^rgba\\(${oc},${oc},${oc},${la}\\)$`),f8=new RegExp(`^hsl\\(${la},${oc},${oc}\\)$`),h8=new RegExp(`^hsla\\(${la},${oc},${oc},${la}\\)$`),d8={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function p8(){return this.rgb().formatHex()}function g8(){return this.rgb().formatRgb()}function y8(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=o8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?m8(e):3===n?new w8(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?v8(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?v8(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=s8.exec(t))?new w8(e[1],e[2],e[3],1):(e=l8.exec(t))?new w8(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=c8.exec(t))?v8(e[1],e[2],e[3],e[4]):(e=u8.exec(t))?v8(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=f8.exec(t))?E8(e[1],e[2]/100,e[3]/100,1):(e=h8.exec(t))?E8(e[1],e[2]/100,e[3]/100,e[4]):d8.hasOwnProperty(t)?m8(d8[t]):"transparent"===t?new w8(NaN,NaN,NaN,0):null}function m8(t){return new w8(t>>16&255,t>>8&255,255&t,1)}function v8(t,e,n,r){return new w8(t=r<=0?e=n=NaN:t,e,n,r)}function b8(t){return(t=t instanceof i8?t:y8(t))?new w8((t=t.rgb()).r,t.g,t.b,t.opacity):new w8}function x8(t,e,n,r){return 1===arguments.length?b8(t):new w8(t,e,n,null==r?1:r)}function w8(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function O8(){return"#"+S8(this.r)+S8(this.g)+S8(this.b)}function M8(){var t=k8(this.opacity);return(1===t?"rgb(":"rgba(")+_8(this.r)+`, ${_8(this.g)}, `+_8(this.b)+(1===t?")":`, ${t})`)}function k8(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _8(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function S8(t){return((t=_8(t))<16?"0":"")+t.toString(16)}function E8(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new L8(t,e,n,r)}function A8(t){var e,n,r,i,a,o,s,l;return t instanceof L8?new L8(t.h,t.s,t.l,t.opacity):(t=t instanceof i8?t:y8(t))?t instanceof L8?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new L8(o,s,l,t.opacity)):new L8}function L8(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function T8(t){return(t=(t||0)%360)<0?t+360:t}function P8(t){return Math.max(0,Math.min(1,t||0))}function C8(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}n8(i8,y8,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:p8,formatHex:p8,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return A8(this).formatHsl()},formatRgb:g8,toString:g8}),n8(w8,x8,r8(i8,{brighter(t){return t=null==t?a8:Math.pow(a8,t),new w8(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new w8(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new w8(_8(this.r),_8(this.g),_8(this.b),k8(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:O8,formatHex:O8,formatHex8:function(){return"#"+S8(this.r)+S8(this.g)+S8(this.b)+S8(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:M8,toString:M8})),n8(L8,function(t,e,n,r){return 1===arguments.length?A8(t):new L8(t,e,n,null==r?1:r)},r8(i8,{brighter(t){return t=null==t?a8:Math.pow(a8,t),new L8(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new L8(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new w8(C8(240<=t?t-240:120+t,n,e),C8(t,n,e),C8(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new L8(T8(this.h),P8(this.s),P8(this.l),k8(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(){var t=k8(this.opacity);return(1===t?"hsl(":"hsla(")+T8(this.h)+`, ${100*P8(this.s)}%, ${100*P8(this.l)}%`+(1===t?")":`, ${t})`)}}));const j8=Math.PI/180,N8=180/Math.PI;var B8=1.78277,F8=-.29227,R8=-.90649,I8=1.97294,D8=I8*R8,z8=I8*B8,W8=B8*F8- -.14861*R8;function G8(t,e,n,r){return 1===arguments.length?(i=t)instanceof H8?new H8(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof w8?i:b8(i)).r/255,o=i.g/255,l=i.b/255,l=(I8*(o-(a=(W8*l+D8*a-z8*o)/(W8+D8-z8)))-F8*(o=l-a))/R8,new H8((l=(s=Math.sqrt(l*l+o*o)/(I8*a*(1-a)))?Math.atan2(l,o)*N8-120:NaN)<0?l+360:l,s,a,i.opacity)):new H8(t,e,n,null==r?1:r);var i,a,o,s,l}function H8(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}n8(H8,G8,r8(i8,{brighter(t){return t=null==t?a8:Math.pow(a8,t),new H8(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new H8(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*j8,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new w8(255*(e+n*(-.14861*r+B8*t)),255*(e+n*(F8*r+R8*t)),255*(e+I8*r*n),this.opacity)}}));var q8=t=>()=>t;function V8(e,n){return function(t){return e+t*n}}function Y8(a){return 1==(a=+a)?$8:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):q8(isNaN(t)?e:t);var n,r,i}}function $8(t,e){var n=e-t;return n?V8(t,n):q8(isNaN(t)?e:t)}!function t(e){var o=Y8(e);function n(e,t){var n=o((e=x8(e)).r,(t=x8(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=$8(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);U8=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var U8,X8=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=x8(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=U8(r),i=U8(i),a=U8(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function K8(s){return function t(o){function e(e,t){var n=s((e=G8(e)).h,(t=G8(t)).h),r=$8(e.s,t.s),i=$8(e.l,t.l),a=$8(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}K8(function(t,e){var n=e-t;return n?V8(t,180<n||n<-180?n-360*Math.round(n/360):n):q8(isNaN(t)?e:t)});var r=K8($8),o=t=>X8(t[t.length-1]),as=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(g),us=o(as),Sa=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(g),ss=o(Sa),Kb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(g),ls=o(Kb),e=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(g),n=o(e),os=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(g),aa=o(os),ca=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(g),cs=o(ca),ua=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(g),a=o(ua),c=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(g),da=o(c),ha=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(g),pa=o(ha),ga=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(g),ya=o(ga),va=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(g),xs=o(va),oc=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(g),la=o(oc),Z8=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(g),Q8=o(Z8),J8=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(g),t_=o(J8),e_=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(g),n_=o(e_),r_=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(g),i_=o(r_),a_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(g),o_=o(a_),s_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(g),l_=o(s_),c_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(g),u_=o(c_),f_=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(g),h_=o(f_),d_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(g),p_=o(d_),g_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(g),y_=o(g_),m_=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(g),v_=o(m_),b_=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(g),x_=o(b_),w_=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(g),O_=o(w_),M_=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(g),k_=o(M_),__=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(g),o=o(__);var S_=r(G8(300,.5,0),G8(-240,.5,1)),E_=r(G8(-100,.75,.35),G8(80,1.5,.8)),r=r(G8(260,.75,.35),G8(80,1.5,.8)),A_=G8();var L_=x8(),T_=Math.PI/3,P_=2*Math.PI/3;function C_(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var j_=C_(g("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),N_=C_(g("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),B_=C_(g("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),F_=C_(g("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),R_=Object.freeze({__proto__:null,schemeCategory10:ma,schemeAccent:ba,schemeDark2:u,schemePaired:xa,schemePastel1:fa,schemePastel2:l,schemeSet1:fs,schemeSet2:ka,schemeSet3:gs,schemeTableau10:ds,interpolateBrBG:us,schemeBrBG:as,interpolatePRGn:ss,schemePRGn:Sa,interpolatePiYG:ls,schemePiYG:Kb,interpolatePuOr:n,schemePuOr:e,interpolateRdBu:aa,schemeRdBu:os,interpolateRdGy:cs,schemeRdGy:ca,interpolateRdYlBu:a,schemeRdYlBu:ua,interpolateRdYlGn:da,schemeRdYlGn:c,interpolateSpectral:pa,schemeSpectral:ha,interpolateBuGn:ya,schemeBuGn:ga,interpolateBuPu:xs,schemeBuPu:va,interpolateGnBu:la,schemeGnBu:oc,interpolateOrRd:Q8,schemeOrRd:Z8,interpolatePuBuGn:t_,schemePuBuGn:J8,interpolatePuBu:n_,schemePuBu:e_,interpolatePuRd:i_,schemePuRd:r_,interpolateRdPu:o_,schemeRdPu:a_,interpolateYlGnBu:l_,schemeYlGnBu:s_,interpolateYlGn:u_,schemeYlGn:c_,interpolateYlOrBr:h_,schemeYlOrBr:f_,interpolateYlOrRd:p_,schemeYlOrRd:d_,interpolateBlues:y_,schemeBlues:g_,interpolateGreens:v_,schemeGreens:m_,interpolateGreys:x_,schemeGreys:b_,interpolatePurples:O_,schemePurples:w_,interpolateReds:k_,schemeReds:M_,interpolateOranges:o,schemeOranges:__,interpolateCividis:function(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-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:S_,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return A_.h=360*t-100,A_.s=1.5-1.5*e,A_.l=.8-.9*e,A_+""},interpolateWarm:E_,interpolateCool:r,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,L_.r=255*(e=Math.sin(t))*e,L_.g=255*(e=Math.sin(t+T_))*e,L_.b=255*(e=Math.sin(t+P_))*e,L_+""},interpolateTurbo:function(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-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:j_,interpolateMagma:N_,interpolateInferno:B_,interpolatePlasma:F_});function I_(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return X_(t,yf)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?q_(t):void 0===r?$_(e)?q_(t):U_(e)?"time":V_(t,i):$_([r])?q_(t):U_(e)?"time":V_(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)df(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return Y_(e);case"quantile":return function(t){return Y_(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)df(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Tp,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:t8(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Ws(e),i=R_["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":var u=H_(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return H_(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function D_(t,e){var[e]=Kx("scale",e),n=t["relations"],[n]=function(o){if(!o||!Array.isArray(o))return[cf,cf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(n);return n(e(t))}function z_(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(W_)?Rc(e):t.every(G_)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function W_(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function G_(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function H_(t,e,n,r,i){var[i]=Kx("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=Ws(t),i=R_["scheme"+e],a=R_["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function q_(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function V_(t,e){return"color"!==t||e?"linear":"sequential"}function Y_(t){return Array.from(new Set(t.flat()))}function $_(t){return X_(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function U_(t){return X_(t,t=>t instanceof Date)}function X_(t,e){for(const n of t)if(n.some(e))return!0;return!1}const K_={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},Z_={threshold:"threshold",quantize:"quantize",quantile:"quantile"},Q_={ordinal:"ordinal",band:"band",point:"point"};function J_(t,e,n){const{component:r=[],coordinates:d=[],title:i}=e,[,p]=Kx("component",n),g=t.filter(({guide:t})=>null!==t);var a,e=function(t,e,n){const[,o]=Kx("component",n),s=t["coordinates"];function i(t,e,n,r){[e,t,i=[]]=[e,t,s];var i,a,e="x"===e?J6(i)?t+"Y":t+"X":"y"===e?J6(i)?t+"X":t+"Y":null;if(r&&e)return i=o(e)["props"],{defaultPosition:t,defaultSize:i,defaultOrder:a}=i,Object.assign(Object.assign({position:t,size:i,order:a,type:e},r),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{var{slider:e,scrollbar:n,name:r}=t;return[i("slider",r,t,e),i("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);const y=[...r,...e];return i&&(t=p("title")["props"],{defaultPosition:n,defaultOrientation:e,defaultOrder:t,defaultSize:a}=t,y.push(Object.assign({type:"title",position:n,orientation:e,order:t,size:a},"string"==typeof i?{title:i}:i))),function(t,e){t=t.filter(t=>{return!!((t=t)&&t.type&&("function"==typeof t.type||({type:t,domain:n,range:r,interpolator:e}=t,n=n&&0<n.length,r=r&&0<r.length,["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&n&&r)||["sequential"].includes(t)&&n&&(r||e)||["constant","identity"].includes(t)&&r));var e,n,r});return[...function(t){const e=Gc(t,t=>t.field||t.name),n=(t,e)=>{t=Q1(t);return t.forEach(t=>t.unshift(e)),t.push([e]),t.sort((t,e)=>e.length-t.length)},s=[["legendCategory",n([["shape","discrete"],["size","discrete"],["opacity","discrete"]],["color","discrete"])],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",n([["opacity","continuous"]],["color","distribution"])],["legendContinuous",n([["opacity","continuous"]],["color","continuous"])]];t=Array.from(e).map(([,t])=>{var e,n,r=Q1(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>{return[t.name,"string"!=typeof(t=(t=t).type)?null:t in K_?"continuous":t in Q_?"discrete":t in Z_?"distribution":null]})}));const i=t=>t.sort((t,e)=>t[0].localeCompare(e[0]));for([e,n]of s)for(const{option:a,combination:o}of r)if(n.some(t=>Ys(i(t),i(a))))return[e,o];return null}).filter(df);return t}(t),...function(t,n){return t.map(t=>{var e=t["name"];if(!(0<Z6(n,"helix").length||t8(n))&&(!J6(n)||!Q6(n)&&!e8(n))){if(e.startsWith("x"))return Q6(n)?["axisArc",[t]]:e8(n)?["axisLinear",[t]]:[J6(n)?"axisY":"axisX",[t]];if(e.startsWith("y"))return Q6(n)?["axisLinear",[t]]:e8(n)?["axisArc",[t]]:[J6(n)?"axisX":"axisY",[t]];if(e.startsWith("position")){if(0<Z6(n,"radar").length)return["axisRadar",[t]];if(!Q6(n))return["axisY",[t]]}}return null}).filter(df)}(t,e)]}(g,d).forEach(([t,e])=>{var n=p(t)["props"],{defaultPosition:r,defaultOrientation:i,defaultSize:a,defaultOrder:o}=n,{guide:n,field:s}=Object.assign({},...e);for(const h of Array.isArray(n)?n:[n]){var l,c,[u,f]=function(t,e,n,r,i,a,o){var[s]=eS(o),e=[r.position||e,null!=s?s:n];if("string"==typeof t&&t.startsWith("axis"))return function(t,e,n,r,i){n=n[0].name;{var a,o;if("axisRadar"===t)return r=r.filter(t=>t.name.startsWith("position")),a=nS(n),n===r.slice(-1)[0].name||null===a?[null,null]:([o,s]=eS(i),["center",(s-o)/(r.length-1)*a+o])}{var s;if("axisY"===t&&function(t){return 0<Z6(t,"parallel").length}(i))return null===(s=nS(n))?e:J6(i)?0===s?["top",null]:["center","horizontal"]:0===s?e:["center","vertical"]}if("axisLinear"===t)return[r]=eS(i),["center",r];if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(Q6(i))return["center",null];if(e8(i))return["center",null];if("axisX"===t&&function(t){return 0<Z6(t,"reflect").length}(i)||"axisX"===t&&function(t){return 0<Z6(t,"reflectY").length}(i))return["top",null];return e}(t,e,i,a,o);if("string"==typeof t&&t.startsWith("legend")&&Q6(o)&&"center"===r.position)return["center","vertical"];return e}(t,r,i,h,e,g,d);(u||f)&&({size:l=a,order:c=o}=h,y.push(Object.assign(Object.assign({title:s},h),{position:u,orientation:f,order:c,size:l,type:t,scales:e})))}}),y}function tS(t,e,n,r){var[i]=Kx("component",r),{scales:a=[],bbox:o}=t,t=J(t,["scales","bbox"]),s=a.map(t=>D_(t,r)),o={bbox:o,scales:a,library:r};return i(t)(s,o,e,n)}function eS(t){var e,n=Z6(t,"polar");return n.length?(n=n[n.length-1],{startAngle:n,endAngle:e}=Qs(n),[n,e]):(n=Z6(t,"radial")).length?(e=n[n.length-1],{startAngle:t,endAngle:n}=rl(e),[t,n]):[-Math.PI/2,Math.PI/2*3]}function nS(t){t=/position(\d*)/g.exec(t);return t?+t[1]:null}function rS(t,e){var t=function(t,e){var n=Gc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]){var o="padding"+uf(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function iS(t,F,e){var R=Gc(t,t=>t.position),{paddingLeft:t,paddingRight:e,paddingTop:n,paddingBottom:I,marginLeft:r,marginTop:i,marginBottom:D,marginRight:z,innerHeight:a,innerWidth:o,height:s,width:W}=e,t=t+r,r=n+i,n=e+z,i=I+D,G={top:[t,0,o,r,"vertical",!0,Ac],right:[W-n,r,n,a,"horizontal",!1,Ac],bottom:[t,s-i,o,i,"vertical",!1,Ac],left:[0,r,t,a,"horizontal",!0,Ac],"top-left":[t,0,o,r,"vertical",!0,Ac],"top-right":[t,0,o,r,"vertical",!0,Ac],"bottom-left":[t,s-i,o,i,"vertical",!1,Ac],"bottom-right":[t,s-i,o,i,"vertical",!1,Ac],center:[t,r,o,a,"center",null,null],inner:[t,r,o,a,"center",null,null],outer:[t,r,o,a,"center",null,null]};for(const[N,t]of R.entries()){var l=G[N],[c,H]=K1(t,t=>"string"==typeof t.type&&("center"===N||!(!t.type.startsWith("axis")||!["inner","outer"].includes(N))));if(c.length){p=d=h=f=u=void 0;var u=c,f=F,h=l,d=N,[u,p]=K1(u,t=>!("string"!=typeof t.type||!t.type.startsWith("axis"))),c=(m=y=g=c=void 0,u),g=f,y=h,m=d;if("center"===m)if(!function(t){return wu(t)&&vu(t)}(g)){if(vu(g)){u=void 0;d=void 0;v=void 0;b=void 0;x=void 0;w=void 0;u=c;d=y;var[v,b,x,w]=d;for(const tt of u)tt.bbox={x:v,y:b,width:x,height:w}}else if(wu(g)){d=void 0;u=void 0;O=void 0;M=void 0;d=c;u=g;var O=y;var M=c[0].orientation;"horizontal"===M?function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(d,u,O):"vertical"===M&&function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(d,u,O)}}else{k=void 0;M=void 0;_=void 0;S=void 0;E=void 0;A=void 0;var k=c;M=y;var[_,S,E,A]=M;for(const B of k)B.bbox={x:_,y:S,width:E,height:A},B.radar={index:k.indexOf(B),count:k.length}}else if("inner"===m){L=void 0;d=void 0;u=void 0;q=void 0;V=void 0;O=void 0;T=void 0;P=void 0;Y=void 0;$=void 0;var L=c;d=g;u=y;var[q,V,,u]=u,[O,T]=d.getCenter(),[d]=ku(d),u=u/2,P=d*u,Y=O-P,$=T-P;for(let t=0;t<L.length;t++)L[t].bbox={x:q+Y,y:V+$,width:2*P,height:2*P}}else if("outer"===m){g=void 0;d=void 0;U=void 0;X=void 0;K=void 0;Z=void 0;g=c;d=y;var[U,X,K,Z]=d;for(const et of g)et.bbox={x:U,y:X,width:K,height:Z}}J=Q=j=y=c=m=T=u=C=void 0;var C=p,u=f,T=h;if(0!==C.length){var[T,m,c,y]=T,[u]=ku(u),j=y/2*u/Math.sqrt(2),Q=T+c/2,J=m+y/2;for(let t=0;t<C.length;t++)C[t].bbox={x:Q-j,y:J-j,width:2*j,height:2*j}}}H.length&&!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]="vertical"===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>null===l||void 0===l?void 0:l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function aS(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=J(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function oS(t,i,a){return ye(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=Kx("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=J(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ye(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),cf)}([J(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?X1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function sS(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function lS(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=U1(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return df(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function cS(t,e,n){var r=e["encode"];return r?(r=U1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function uS(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=Kx("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=U1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function fS(l,t,e){var n,r=t["encode"],i=J(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=J(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function hS(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var l="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return tt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(t=>[t,{guide:s(r,t),slider:s(a,t),scrollbar:s(o,t)}]))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")}})}),[t,e]}function dS(t,e,n){var r=e["animate"];return r||void 0===r||tt(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function pS(s,l,c){return ye(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ye(this,void 0,void 0,function*(){var t=c["library"],[t]=Kx("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[aS,oS,sS,lS,cS,uS,fS,dS,hS,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:h,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=qc(Object.entries(n).filter(([,t])=>df(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:c,scaleKey:u,range:f}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=e.some(t=>t.constant),a=h[t]||{},{independent:o=!1,key:s=u||t,type:i=i?"constant":r?"identity":c}=a,r=J(a,["independent","key","type"]),a="constant"===i,l=a?void 0:f;return{name:t,values:e,scaleKey:o||a?Symbol("independent"):s,scale:Object.assign({type:i,range:l},r)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function gS(I,D,z,W){return ye(this,void 0,void 0,function*(){const[n]=Kx("composition",z);var[t]=Kx("interaction",z);const r=new Set(Object.keys(z).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(df)),i=t=>{t=t.type;if("function"==typeof t){var{props:e={}}=t,{composite:e=!0}=e;if(e)return"mark"}return"string"==typeof t&&r.has(t)?"mark":t};const a=t=>"standardView"===i(t);var e=t=>{var e;return a(t)?[t]:(e=i(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[I],u=[];c.length;){var f=c.shift();if(a(f)){var h=l.get(f),[h,d]=h?bS(h,f,z):yield mS(f,z),p=(s.set(h,f),o.push(h),d.flatMap(e).map(t=>K6(t,z)));if(c.push(...p),p.every(a)){var g=yield Promise.all(p.map(t=>vS(t,z)));z_(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),z_(h,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===i(f)?f:yield ES(f,z),h=e(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}W.emitter.emit(b6.BEFORE_PAINT);const v=new Map,b=new Map,x=[];D.selectAll(PS(G)).data(o,t=>t.key).join(t=>t.append("g").attr("className",G).attr("id",t=>t.key).call(yS).each(function(t){xS(t,nt(this),x,z),v.set(t,this)}),t=>t.call(yS).each(function(t){xS(t,nt(this),x,z),b.set(t,this)}),t=>t.each(function(){for(const t of this.nameInteraction.values())t.destroy()}).remove());var w=t=>Array.from(t.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>ye(this,void 0,void 0,function*(){var[t,e]=yield mS(r,a);xS(t,i,[],a);for(const n of e)gS(n,i,a,o);return{options:r,view:t}})}(nt(e),z,W)})),O=w(v);for(const T of O){const I=T["options"];var M=new Map;T.container.nameInteraction=M;for(const P of SS(I)){var k=t(P)(T,O);M.set(P.type,{destroy:k})}}var _=w(b);for(const C of _){const{options:I,container:j}=C;var S=j.nameInteraction;for(const N of SS(I)){var E=S.get(N.type);E&&E.destroy();E=t(N)(C,_);S.set(I.type,{destroy:E})}}const{width:A,height:F}=I;var L=[];for(const B of u){var R=new Promise(e=>ye(this,void 0,void 0,function*(){for(const t of B)yield gS(Object.assign({width:A,height:F},t),D,z,W);e()}));L.push(R)}W.views=o,W.animations=x,W.emitter.emit(b6.AFTER_PAINT);w=x.filter(df).map(kS).map(t=>t.finished);return Promise.all([...w,...L])})}function yS(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function mS(e,n){return ye(this,void 0,void 0,function*(){var t=K6(function(t){var{coordinate:e={},interaction:n={},marks:r}=t,t=J(t,["coordinate","interaction","marks"]),i=r.map(t=>t.coordinate||{}),a=r.map(t=>t.interaction||{}),i=[...i,e].reduceRight((t,e)=>tt(t,e),{}),e=[n,...a].reduce((t,e)=>tt(t,e),{});return Object.assign(Object.assign({},t),{marks:r,coordinate:i,interaction:e})}(yield function(c,u){return ye(this,void 0,void 0,function*(){var[t,e]=Kx("mark",u);const n=c["marks"];for(var r=[],i=[...n];i.length;){var[a]=i.splice(0,1),a=yield ES(a,u);const{type:s=ff("G2Mark type is required."),key:l}=a;var{props:o={}}=e(s),{composite:o=!0}=o;if(o){const n=yield t(a)(c);o=Array.isArray(n)?n:[n];i.unshift(...o.map((t,e)=>Object.assign({key:l+"-"+e},t)))}else r.push(a)}return Object.assign(Object.assign({},c),{marks:r})})}(e,n)),n);return bS(yield vS(t,n),t,n)})}function vS(p,g){return ye(this,void 0,void 0,function*(){var[t]=Kx("theme",g),[,e]=Kx("mark",g),{theme:n,marks:r,coordinates:i=[]}=p,a=t(_S(n)),o=new Map;for(const f of r){var s,l=f["type"],{props:l={}}=e(l),l=yield pS(f,l,g);l&&([l,s]=l,o.set(l,s))}for(const h of Gc(Array.from(o.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var c=h.reduce((t,{scale:e})=>tt(t,e),{}),u=h[0]["values"],u=Array.from(new Set(u.map(t=>t.field).filter(df)));const p=tt({guide:{title:0===u.length?void 0:u},field:u[0]},c);u=h[0]["name"];const d=I_(u,h.flatMap(({values:t})=>t.map(t=>t.value)),p,i,a,g);h.forEach(t=>t.scale=d)}return o})}function bS(t,e,n){var[r]=Kx("mark",n),[i]=Kx("theme",n),[a]=Kx("labelTransform",n);const{key:o,frame:s=!1,theme:l,clip:c,style:u={},labelTransform:f=[]}=e;var h,d,i=i(_S(l)),p=Array.from(t.values()),p=Array.from(new Set(p.flatMap(t=>t.channels.map(t=>t.scale)))),p=J_(Array.from(p),e,n),g=rS(p,e),y=function(t,e,n){var[n]=Kx("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new U6(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(g,e,n),e=s?tt({mainLineWidth:1,mainStroke:"#000"},u):u,m=(iS(p,y,g),{}),v=[];for([h,d]of t.entries()){const{children:O,dataDomain:M,modifier:k,key:_}=h;var{index:b,channels:x}=d,w=U1(Object.fromEntries(x.map(({name:t,scale:e})=>[t,e])),t=>D_(t,n));Object.assign(m,w);const S=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(x,w),[E,A,L]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>df(t)&&df(e))&&(r.push(a),i.push(o))}return[r,i]}(r(h)(b,w,S,y));x=M||E.length;const T=k?k(A,x,g):[];b=E.map((t,e)=>{var n={points:A[e],transform:T[e],index:t,markKey:_,viewKey:o};for(const[r,i]of Object.entries(S))n[r]=i[t],L&&(n["series"+Ws(r)]=L[e].map(t=>i[t]));return L&&(n.seriesIndex=L[e]),n}),x=(d.data=b,d.index=E,null==O?void 0:O(b,w,g));v.push(...x||[])}return[{layout:g,theme:i,coordinate:y,components:p,markState:t,key:o,clip:c,scale:m,style:e,labelTransform:wS(f.map(a))},v]}function xS(X,K,Z,Q){ye(this,void 0,void 0,function*(){const{components:F,theme:n,layout:t,markState:e,coordinate:r,key:i,style:R,clip:a}=X,{width:I,height:D}=t,z=J(t,["x","y","width","height"]),o=["view","plot","main","content"];var s=o.map((t,e)=>e);const l=o.map(t=>pf(Object.assign({},n,R),t)),W=["a","margin","padding","inset"].map(t=>et(z,t)),c=t=>t.style("x",t=>p[t].x).style("y",t=>p[t].y).style("width",t=>p[t].width).style("height",t=>p[t].height).each(function(t){var e,n,r=nt(this),t=l[t];for([e,n]of Object.entries(t))r.style(e,n)});let u=0,f=0,h=I,d=D;const p=s.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return u+=t,f+=e,h-=t+r,d-=e+n,{x:u,y:f,width:h,height:d}}),g=(K.selectAll(PS(lt)).data(s.filter(t=>df(l[t])),t=>o[t]).join(t=>t.append("rect").attr("className",lt).style("zIndex",-2).call(c),t=>t.call(c),t=>t.remove()),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:g=o,updateDelay:y=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:O=f}=M;void 0!==p&&!p||(e=Math.max(e,g+y),n=Math.min(n,y)),void 0!==O&&!O||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),y=!!g&&{duration:g[1]};var m,v,b,s=K.selectAll(PS(ot)).data(F,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",ot).append(t=>tS(tt({animate:y},t),r,n,Q)),t=>t.transition(function(t){var{preserve:e=!1}=t;if(!e)return e=tS(tt({animate:y},t),r,n,Q)["attributes"],[t]=this.childNodes,t.update(e)})).transitions();Z.push(...s.flat().filter(df));const x=K.selectAll(PS(at)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",at).call(AS).call(TS,Array.from(e.keys())).call(CS,a),t=>t.call(TS,Array.from(e.keys())).call(t=>{if(!g)return AS(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(CS,a)).transitions();Z.push(...x.flat());for([m,v]of e.entries()){var G=v["data"];const{key:i,class:E}=m,A=function(l,t,e,n){const[c]=Kx("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=J(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=U1(y,t=>OS(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:LS(l,n)}))(r,t,p,d,h)}}(m,v,X,Q),L=(w=m,b=v,MS("enter",w,b,X,Q)),T=(w=m,b=v,MS("update",w,b,X,Q)),H=(w=m,b=v,MS("exit",w,b,X,Q));var w=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(K,E,"element");const x=K.select("#"+i).selectAll(PS(it)).selectFacetAll(w).data(G,t=>t.key,t=>t.groupKey).join(t=>t.append(A).attr("className",it).transition(function(t){return L(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=A(t,e),s=T(t,[this],[o]);return null===s&&hf(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return H(t,[this])}).remove(),t=>t.append(A).attr("className",it).transition(function(t){var e=this["__fromElements__"],t=T(t,e,[this]);return new z1(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new z1([],this.__toData__,this.parentNode).append(A).attr("className",it).nodes();return T(t,[this],e)}).remove()).transitions();Z.push(...x.flat())}{var O=X,M=K,k=Q,_,S;const[q]=Kx("labelTransform",k),{markState:V,labelTransform:P}=O,Y=M.select(PS(rt)).node(),C=new Map,j=new Map,$=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=Kx("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t,style:a}=t,t=J(t,["formatter","transform","style"]),t=U1(Object.assign(Object.assign({},t),a),t=>OS(t,r,e,l)),{shape:a=c,text:o}=t,t=J(t,["shape","text"]),i="string"==typeof i?Px(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,O,k),a=M.select("#"+r).selectAll(PS(it)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=J(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{C.set(t,i),j.set(t,e)}),t})})}),N=nt(Y).selectAll(PS(st)).data($,t=>t.key).join(t=>t.append(t=>C.get(t)(t)).attr("className",st),t=>t.each(function(t){hf(this,C.get(t)(t))}),t=>t.remove()).nodes(),U=Gc(N,t=>j.get(t.__data__)),B=O["coordinate"];for([_,S]of U){var{transform:_=[]}=_;wS(_.map(q))(S,B)}P&&P(N,B)}})}function wS(r){return(t,e)=>{for(const n of r)t=n(t,e);return t}}function OS(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function MS(o,t,e,n,r){var[,i]=Kx("shape",r);const[s]=Kx("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Ws(o)}Animation`;const{[e]:c}=i(LS(t,r)).props,{[o]:u={}}=a,f=et(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function kS(t){return t.finished.then(()=>{t.cancel()}),t}function _S(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function SS(t){var{interaction:t={}}=t;return Object.entries(tt({},t)).filter(t=>!!t[1]).map(([t,e])=>Object.assign({type:t},e))}function ES(r,i){return ye(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=J(r,["data"]);return null==e?r:([,{data:e}]=yield oS(0,{data:e},t),Object.assign({data:e},n))})}function AS(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function LS(t,e){t=t.type;return t+"."+e}function TS(t,e){const n=t=>void 0!==t.class?""+t.class:"";0===t.nodes().length||(t.selectAll(PS(C)).data(e,t=>t.key).join(t=>t.append("g").attr("className",C).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{return null!=(t=t.zIndex)?t:0}),t=>t.remove()),t.select(PS(rt)).node())||t.append("g").attr("className",rt)}function PS(...t){return t.map(t=>"."+t).join("")}function CS(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;return i?({paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new N.Rect({style:{x:e,y:t,width:n,height:r}})):null})}function jS(t){for(var t=tt({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function NS(t,e={},n){const{width:r=640,height:i=480}=t,a=jS(t),{canvas:o=(t=r,c=i,u=new S.Renderer,u.registerPlugin(new Ls),new N.Canvas({width:t,height:c,container:document.createElement("div"),renderer:u})),library:s=w6(),emitter:l=new Xs}=e;var c,u;e.canvas=o,e.library=s,e.emitter=l,o.resize(r,i),l.emit(b6.BEFORE_RENDER);const f=nt(o.document.documentElement);return o.ready.then(()=>gS(Object.assign(Object.assign({},a),{width:r,height:i}),f,s,e)).then(()=>{l.emit(b6.AFTER_RENDER),null!=n&&n()}),"string"==typeof(t=o.getConfig().container)?document.getElementById(t):t}function BS(t,e={}){var{canvas:e,emitter:n}=e;e&&e.destroy(),n.off()}function FS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function RS(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function IS(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length&&"string"!=typeof t?this.attr(r,t):((n=this.attr(r)||{})[t]=1===arguments.length||e,this.attr(r,n))}}function y(r){return t=>{for(const n of r){var e=n["type"];"value"===e?FS(t,n):"array"===e?RS(t,n):"object"===e?IS(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e&&function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n)}return t}}function DS(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}function zS(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class WS{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return zS(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return zS(this,t=>{e===t.type&&n.push(t)}),n}call(t,...e){return t(this.map(),...e),this}root(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}class GS extends WS{changeData(t){var e=this.root();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t,e=null==(e=this.root())?void 0:e.getView();if(e)return e=e["markState"],t=Array.from(e.keys()).find(t=>t.key===this.attr("key")),e.get(t)}getScale(){var t=null==(t=this.root())?void 0:t.getView();return!t||null==t?void 0:t.scale}getScaleByChannel(t){var e=null==(e=this.root())?void 0:e.getView();return!e||null==(e=null==e?void 0:e.scale)?void 0:e[t]}getGroup(){var t=this.attr("key");if(t)return this.root().context().canvas.getRoot().getElementById(t)}}ma=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"object"},{name:"interaction",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"},{name:"scrollbar",type:"object"},{name:"state",type:"object"}];let HS=class extends GS{constructor(){super({},"interval")}},qS=(HS=t([y(ma)],HS),class extends GS{constructor(){super({},"rect")}}),VS=(qS=t([y(ma)],qS),class extends GS{constructor(){super({},"point")}}),YS=(VS=t([y(ma)],VS),class extends GS{constructor(){super({},"area")}}),$S=(YS=t([y(ma)],YS),class extends GS{constructor(){super({},"line")}}),US=($S=t([y(ma)],$S),class extends GS{constructor(){super({},"cell")}}),XS=(US=t([y(ma)],US),class extends GS{constructor(){super({},"vector")}}),KS=(XS=t([y(ma)],XS),class extends GS{constructor(){super({},"link")}}),ZS=(KS=t([y(ma)],KS),class extends GS{constructor(){super({},"polygon")}});ZS=t([y(ma)],ZS);ba=t([y(ma)],class extends GS{constructor(){super({},"image")}});let QS=class extends GS{constructor(){super({},"text")}},JS=(QS=t([y(ma)],QS),class extends GS{constructor(){super({},"box")}}),tE=(JS=t([y(ma)],JS),class extends GS{constructor(){super({},"lineX")}}),eE=(tE=t([y(ma)],tE),class extends GS{constructor(){super({},"lineY")}}),nE=(eE=t([y(ma)],eE),class extends GS{constructor(){super({},"range")}}),rE=(nE=t([y(ma)],nE),class extends GS{constructor(){super({},"rangeX")}}),iE=(rE=t([y(ma)],rE),class extends GS{constructor(){super({},"rangeY")}}),aE=(iE=t([y(ma)],iE),class extends GS{constructor(){super({},"connector")}}),oE=(aE=t([y(ma)],aE),class extends GS{constructor(){super({},"shape")}}),sE=(oE=t([y(ma)],oE),class extends GS{constructor(){super({},"sankey")}}),lE=(sE=t([y([...ma,{name:"layout",type:"value"}])],sE),class extends GS{constructor(){super({},"treemap")}}),cE=(lE=t([y([...ma,{name:"layout",type:"value"}])],lE),class extends GS{constructor(){super({},"boxplot")}}),uE=(cE=t([y(ma)],cE),class extends GS{constructor(){super({},"pack")}}),fE=(uE=t([y([...ma,{name:"layout",type:"value"}])],uE),class extends GS{constructor(){super({},"forceGraph")}}),hE=(fE=t([y([...ma,{name:"layout",type:"value"}])],fE),class extends GS{constructor(){super({},"tree")}}),dE=(hE=t([y([...ma,{name:"layout",type:"value"}])],hE),class extends GS{constructor(){super({},"wordCloud")}});dE=t([y([...ma,{name:"layout",type:"object"}])],dE);u={interval:HS,rect:qS,point:VS,area:YS,line:$S,cell:US,vector:XS,link:KS,polygon:ZS,image:ba,text:QS,box:JS,lineX:tE,lineY:eE,range:nE,rangeX:rE,rangeY:iE,connector:aE,sankey:sE,treemap:lE,boxplot:cE,shape:oE,pack:uE,forceGraph:fE,tree:hE,wordCloud:dE};let pE=class extends WS{getView(){var t=this.root().context()["views"];if(null!=t&&t.length)return t.find(t=>t.key===this.attr("key"))}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?void 0:t.theme}getGroup(){var t=this.attr("key");if(t)return this.root().context().canvas.getRoot().getElementById(t)}show(){var t=this.getGroup();t&&!t.isVisible()&&t.setAttribute("visibility","visible")}hide(){var t=this.getGroup();t&&t.isVisible()&&t.setAttribute("visibility","hidden")}},gE=class extends(pE=t([y([{name:"on",type:"event"}])],pE)){constructor(t={},e="view"){super(t,e)}},yE=(gE=t([y([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...DS(u)])],gE),class extends pE{constructor(){super({},"spaceLayer")}}),mE=(yE=t([y([{type:"value",name:"data"},...DS(u)])],yE),class extends pE{constructor(){super({},"spaceFlex")}}),vE=(mE=t([y([{type:"value",name:"data"},...DS(u)])],mE),class extends pE{constructor(){super({},"facetRect")}}),bE=(vE=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...DS(u)])],vE),class extends pE{constructor(){super({},"facetCircle")}}),xE=(bE=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...DS(u)])],bE),class extends pE{constructor(){super({},"repeatMatrix")}}),wE=(xE=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...DS(u)])],xE),class extends pE{constructor(){super({},"timingKeyframe")}}),OE=(wE=t([y([...DS(u)])],wE),class extends pE{constructor(){super({},"geoView")}}),ME=(OE=t([y([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...DS(u)])],OE),class extends pE{constructor(){super({},"geoPath")}});ME=t([y([{type:"value",name:"data"},{type:"value",name:"coordinate"},{type:"object",name:"interaction"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...DS(u)])],ME);var kE={view:gE,spaceLayer:yE,spaceFlex:mE,facetRect:vE,facetCircle:bE,repeatMatrix:xE,timingKeyframe:wE,geoView:OE,geoPath:ME};for(const EE of Object.values(kE))y(DS(kE))(EE);const _E=w6();function SE(t){return Object.assign(Object.assign({},t.value),{type:t.type})}xa=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"value"},{name:"interaction",type:"object"},{name:"theme",type:"object"},{name:"title",type:"value"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...DS(u),...Object.entries(kE).map(([t,e])=>({type:"container",name:t,ctor:e}))];m.Chart=class extends gE{constructor(t={}){var r,i,a,o,{container:e,canvas:n}=t;super(J(t,["container","canvas"]),"view"),this.onResize=(r=()=>{this.forceFit()},i=300,function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._emitter=new Xs,this._context={library:_E,emitter:this._emitter,canvas:n},this.bindAutoFit()}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=xf(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new S.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new Ls),o.forEach(t=>a.registerPlugin(t)),new N.Canvas({container:n,width:r,height:i,renderer:a}))),new Promise(t=>{NS(this.options(),this._context,()=>t(this))})}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,SE(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=SE(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}destroy(){var t,e;this.options();this.emit(b6.BEFORE_DESTROY),this.unbindAutoFit(),BS(0,this._context),t=this._container,(e=t.parentNode)&&e.removeChild(t),this.emit(b6.AFTER_DESTROY)}clear(){this.options();this.emit(b6.BEFORE_CLEAR),BS(0,this._context),this.emit(b6.AFTER_CLEAR)}forceFit(){var{width:t,height:e,autoFit:n}=this.options(),{width:n,height:t}=xf(this._container,n,t,e);t&&n&&this.changeSize(n,t)}changeSize(t,e){var{width:n,height:r}=this.options();if(n===t&&r===e)return Promise.resolve(this);this.emit(b6.BEFORE_CHANGE_SIZE),this.width(t),this.height(e);n=this.render();return n.then(()=>{this.emit(b6.AFTER_CHANGE_SIZE)}),n}bindAutoFit(){var t=this.options()["autoFit"];t&&window.addEventListener("resize",this.onResize)}unbindAutoFit(){var t=this.options()["autoFit"];t&&window.removeEventListener("resize",this.onResize)}},m.Chart=t([y(xa)],m.Chart),m.AREA_CLASS_NAME=lt,m.COMPONENT_CLASS_NAME=ot,m.ELEMENT_CLASS_NAME=it,m.LABEL_CLASS_NAME=st,m.LABEL_LAYER_CLASS_NAME=rt,m.MAIN_LAYER_CLASS_NAME=C,m.PLOT_CLASS_NAME=at,m.VIEW_CLASS_NAME=G,m.createLibrary=w6,m.destroy=BS,m.register=function(t,e){Object.assign(_E,{[t]:e})},m.render=NS,m.renderToMountedElement=function(t,e={},n){var r,{width:i=640,height:a=480}=t,t=jS(t);const{library:o=w6(),group:s=new N.Group,emitter:l=new Xs}=e;if(null!=s&&s.parentElement)return r=nt(s),e.group=s,e.library=o,(e.emitter=l).emit(b6.BEFORE_RENDER),gS(Object.assign(Object.assign({},t),{width:i,height:a}),r,o,e).then(()=>{l.emit(b6.AFTER_RENDER),null!=n&&n()}),s;throw new Error("renderToMountedElement can't render chart to unmounted group.")},Object.defineProperty(m,"__esModule",{value:!0})});
|